Imagine a very long bridge across the Mississippi River. A car will take upwards of 15...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Imagine a very long bridge across the Mississippi River. A car will take upwards of 15 minutes to cross this bridge. Due to construction, the bridge has been reduced to a single lane that has to be shared by traffic in both, the west-east and the east-west direction. It is obviously not possible to allow traffic in both directions simultaneously and so a special traffic control mechanism is installed with the following rules: An arriving car will have to wait if the bridge is currently occupied by one or more cars moving in the opposite direction. Multiple cars are allowed to cross the bridge in the same direction (otherwise there would be little bridge utilization and arriving cars would have to wait a long time). In order to avoid starvation, the entry of cars onto the bridge in one direction must be stopped after a batch of k cars has entered the bridge to allow traffic in the opposite direction if there are any cars waiting. If there are no cars, the bridge is open in both directions and the first arriving car will determine the direction of traffic. Viewing each car as a process that is traveling in West-East (WE) or East-West (EW) direction, develop a MONITOR that implements the rules listed above. Your MONITOR must use the monitor procedures Enter_WE(), Enter_EW(), Exit_WE(), Exit_EW(), to be executed when a car enters and exits the bridge. Your solution must show all the necessary MONITOR variables and condition variables. It must not unnecessarily restrict vehicles attempting to cross the bridge, must be deadlock free, and must not starve traffic in any direction. Develop a pseudocode monitor solution; You do not have to implement the solution. Imagine a very long bridge across the Mississippi River. A car will take upwards of 15 minutes to cross this bridge. Due to construction, the bridge has been reduced to a single lane that has to be shared by traffic in both, the west-east and the east-west direction. It is obviously not possible to allow traffic in both directions simultaneously and so a special traffic control mechanism is installed with the following rules: An arriving car will have to wait if the bridge is currently occupied by one or more cars moving in the opposite direction. Multiple cars are allowed to cross the bridge in the same direction (otherwise there would be little bridge utilization and arriving cars would have to wait a long time). In order to avoid starvation, the entry of cars onto the bridge in one direction must be stopped after a batch of k cars has entered the bridge to allow traffic in the opposite direction if there are any cars waiting. If there are no cars, the bridge is open in both directions and the first arriving car will determine the direction of traffic. Viewing each car as a process that is traveling in West-East (WE) or East-West (EW) direction, develop a MONITOR that implements the rules listed above. Your MONITOR must use the monitor procedures Enter_WE(), Enter_EW(), Exit_WE(), Exit_EW(), to be executed when a car enters and exits the bridge. Your solution must show all the necessary MONITOR variables and condition variables. It must not unnecessarily restrict vehicles attempting to cross the bridge, must be deadlock free, and must not starve traffic in any direction. Develop a pseudocode monitor solution; You do not have to implement the solution.
Expert Answer:
Related Book For
Engineering Economy
ISBN: 978-0132554909
15th edition
Authors: William G. Sullivan, Elin M. Wicks, C. Patrick Koelling
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
On 1 June 2019, Manchester United Ltd bought 48 million ordinary shares in Chelsea FC Ltd paying GHS 280 million cash. The summarised statement of financial position for the two entities as at 31...
-
Using the standard reduction potentials listed in Appendix E, calculate the equilibrium constant for each of the following reactions at 298 K: (a) Fe(s) + Ni2+(aq) Fe2+ (aq) + Ni(s) (b) Co(s) + 2 H+...
-
Indifference curves analysis has revolutionised the way modern economists analyse consumer behaviour. a) With the aid of a relevant diagram explain what you understand by indifference curves in...
-
The Dallas Development Corporation is considering the purchase of an apartment project for $\$ 100,000$. They estimate that they will receive $\$ 15,000$ at the end of each year for the next 10...
-
Laura Oil Company is considering investing in a new oil well. It is expected that the oil well will increase annual revenues by $130,000 and will increase annual expenses by $80,000 including...
-
Critical values for quick reference during this activity. Confidence level Critical value 0.90 z* = 1.645 0.95 z* = 1.960 0.99 z* = 2.576 469062.3288744.qx3zqy7 Jump to level 1 A poll for a statewide...
-
The starting balance of the supplies account was $1,750. The total of consumables purchased during the period is $3,500. At the end of the period before the adjustment, $350 of material was ready....
-
Starbucks has said its goal is to expand delivery to one-quarter of its US stores and increase earnings per share by 10 percent. How will the organizing function contribute to the accomplishment of...
-
Headquartered in Boulogne-Billancourt, France, the automotive manufacturer Renault was established 120 years ago in 1899, and Japanese automotive manufacturer, Nissan, was founded in 1933,...
-
If Starbucks wanted to offer compressed workweeks, flextime, or job sharing, what would they need to consider? What are advantages and disadvantages of offering these employment options at Starbucks?
-
What possible problems could Starbucks encounter with their matrix structure? What could they do to try to minimize these problems?
-
If Starbucks wanted to implement multiperson comparisons or 360-degree appraisals as methods of evaluating employee performance, what possible issues (both positive and negative) might arise? How...
-
The data in following Table represent the number of defects detected in a series of 15 samples. Each sample contained 4 units. Sample..Defective 126 223 332 435 525 632 720 80 96 10..2 11..5 12..16...
-
The financial statements of Eastern Platinum Limited (Eastplats) are presented in Appendix A at the end of this textbook. Instructions (a) Does East plats report any investments on its statement of...
-
What other solutions could you see be effective at improving employee motivation and reducing the turnover rate? Why do you believe these solutions would be useful?
-
Should the whole team have decided on the team members schedule accommodations collectively? Why or why not?
-
In what ways do you believe providing special work arrangements or accommodations for employees impacts employee motivation? How does it help? How does it hurt?
Study smarter with the SolutionInn App