BARBER SHOP PROBLEM, Operating System

Assignment Help:
a) The barber shop has one barber, one barber chair, and n chairs for waiting customers, to sit on. If there are no customers present, the barber sits down in the barber chair and falls asleep, as illustrated in Fig.1. When a customer arrives, he has to wake up the sleeping barber. If additional customers arrive while the barber is cutting a customer''s hair, they either sit down (if there are empty chairs) or leave the shop (if all chairs are full). Program the barber and the customers without getting into race conditions using C++ or Java program.

Fig. 1: Sleeping Barber

Related Discussions:- BARBER SHOP PROBLEM

What are the three main purposes of an operating system, What are the three...

What are the three main purposes of an operating system? _ To give an environment for a computer user to implement programs on computer hardware in a convenient and efficient m

Explain the resource ownership by platform, Explain the Resource Ownership ...

Explain the Resource Ownership by Platform Ownership of data items may further be complicated by concepts defined in certain operating systems. Each operating system defines "p

Index node (inode), A file system depends on data structures about the file...

A file system depends on data structures about the files, beside the file structure. The former is named metadata-data that defines data. Each file is accumulated with an inode, wh

Define properties of real time operating system, Define properties of Real ...

Define properties of Real time operating system Real time :- Often used in a dedicated application, this system reads information from sensors and must respond within a fixed a

Advantage of minimizing the file space, Q. a number of systems automaticall...

Q. a number of systems automatically delete all user files when a user logs off or a job terminates unless the user explicitly requests that they be kept other systems keep all fil

Describe why it could and how such effects could be minimize, Q. In followi...

Q. In following Section we mentioned that disabling interrupts frequently could affect the system's clock. Describe why it could and how such effects could be minimized.

Error detection in operating system, Q. Error detection in operating system...

Q. Error detection in operating system? Error detection- Error detection take places at both the hardware and software levels. At the hardware level every data transfers must b

Multiprogramming, how response times are reduced by allowing time sharing o...

how response times are reduced by allowing time sharing on top of multiprogramming

Write Your Message!

Captcha
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