Create algorithm which prevents deadlock using one semaphore

Assignment Help Operating System
Reference no: EM1369676

1. A single-lane pedestrian bridge connects the two villages of Village1 and Village2. People in the two villages use this bridge to go to other village. The bridge can become deadlocked if people both from Village1 and Village2 get on the bridge at the same time Once a person get on the bridge, he/she is unable to back up.

a. Using exactly one semaphore, design an algorithm that prevents deadlock. Do not be concerned about starvation and inefficiency.

b. Provide a solution using Monitor that is starvation-free.

c. What would be the value of semaphore before entering into Critical Section and after leaving it?

Reference no: EM1369676

Questions Cloud

Recruitment of employees and explain : What factors would you consider most important in recruitment of employees and explain
Mpc change : Assume that economy starts at equilibrium and the mpc= 0.75. Determine what would be the effect of a $300 increase in government spending once all the rounds of the multiplier process are complete?
Plan for implementation of net product : Describe the market at which the new product/service will be implemented.
Explain the executive and the independent administrative : Explain the "executive" and the "independent" administrative agencies. The primary distinction between the two types of agencies is that the heads of executive administrative agencies are appointed by the president and serve
Create algorithm which prevents deadlock using one semaphore : Using exactly one semaphore, create an algorithm which prevents deadlock. Do not be concerned about starvation and inefficiency.
Survey or questionnaire for employees and managers : Survey Questionnaire - Survey or questionnaire for employees and managers at the USPS office
Pricing by monopolistic competition : Assume there are only two automobile companies, Ford and Chevrolet. Ford believes that Chevrolet will match any value it sets, but Chevrolet too is interested in maximizing profit.
Mary kay cosmetics case study : This is a complete business case study on Mary Kay Cosmetics along with recommendations for improving employee moral and bottom line numbers.
Write pseudocode for procedure construct-optimal-bst : Write pseudocode for procedure Construct-Optimal-BST (root) which, table root, outputs structure of the optimal bimary search tree.

Reviews

Write a Review

Operating System Questions & Answers

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Computing effective memory access time

Assume that 80 percent of the accesses are in the associative memory and that, of the remaining, 10 percent (or 2 percent of the total) cause page faults.What is the effective memory access time?

  What percentage of memory-s total operating time refreshes

Consider a dynamic RAM that must be given a refresh cycle 64 times per ms. What percentage of the memory's total operating time must be given to refreshes?

  Write list of three known vulnerabilities for sql server

Using the internet as a source, compile a list of three known vulnerabilities for SQL Server on Windows operating systems and three vulnerabilities for Oracle on Unix.

  Write a short report on page replacement algorithms

Select one of two possible short reports,  Subject 1. Page Replacement Algorithms and Block Caching,  Subject 2. Storing Blocks and Remembering Where You Stored Them

  Describe how to prevent race condition from occurring

Function and wife calls deposit (). Explain how a race condition is possible and what might be done to prevent race condition from occurring.

  Specify the order in which processes execute

Specify the order in which processes execute and determine the mean process turnaround time for each of the scheduling algorithms.

  What are some ways to integrate linux servers

What are some ways you could integrate Linux servers into a Windows network to share information? What would be the advantages and disadvantages?

  Explain decision variables in relation to linear programming

Explain the following terms in relation to linear programming problems- (1) decision variables (2) objective function

  Multilevel feedback queues and fcfs

What (if any) relation holds between the following pairs of sets of algorithms (a) Priority and SJF (b) Multilevel feedback queues and FCFS

  Challenges os faces-passing parameter among user-kernel mode

Write two challenges an OS faces when passing parameters between user and kernel mode. Describe how an OS can overcome them

  Explain the concepts of consumable and reusable resources

Explain the concepts of consumable and reusable resources

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