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

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

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

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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