Deign a synchronization solution using only locks

Assignment Help Computer Engineering
Reference no: EM132085624

There is a one-lane east-west bridge in Hawaii such that when a car is on the bridge going eastbound, no westbound cars are allowed until the eastbound car has left the bridge.

Similarly when a westbound car is on the bridge, no eastbound cars are allowed until the westbound car has left the bridge.

To make matters more complicated, if an eastbound car arrives and sees another eastbound car already on the bridge, then that eastbound car will also proceed onto the bridge.

This is true even if there is a westbound car already waiting to enter the bridge.

Similarly, a westbound car can tailgate behind another westbound car already on the bridge even if an eastbound car was waiting.

Deign a synchronization solution using only locks, semaphores and integer variables that achieves the following:

allows all cars bound in a certain direction to continue crossing as long as there is at least one car still on the bridge that is bound in that direction, then toggles to allow all cars in the opposite direction to proceed in a similar manner. The solution need not be starvation-free.

Reference no: EM132085624

Questions Cloud

What factors should a computer designer take into account : What is one way to measure Cache performance and one way to improve Cache performance?
Write a class called darts : One way to estimate the value of p is to simulate a darts game. The darts player throws at a circular board with a radius of 1 foot.
The interarrival time has an exponential distribution : Cars arrive at Joe’s Service Station for an oil change every 15 minutes, and the interarrival time has an exponential distribution.
How will your team manage any conflict which may arise : How will you as a team communicate if a team member is not contributing and collaborating effectively? How will your team manage any conflict which may arise?
Deign a synchronization solution using only locks : Deign a synchronization solution using only locks, semaphores and integer variables that achieve.
Develop a crud matrix develop a crud matrix : Identify Create, Update, and Delete Privileges For each piece of information, first identify who has create, update, and delete privileges.
Calculate the net present value and profitability index : BAK Corp. is considering purchasing one of two new diagnostic machines. Calculate the net present value and profitability index of each machine
Expalin variables in java must have a declared type : For each one of the following statements about Java, indicate whether or not it is also true for Smalltalk.
Discuss about the database transaction management : The simulation times, number of data blocks, and longest read or write time period are set at the beginning of the simulation.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd