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

Explain kernel activity for ults, KERNEL ACTIVITY FOR ULTS: The kernel...

KERNEL ACTIVITY FOR ULTS: The kernel isn't aware of thread activity but it is still managing process activity. When a thread compose a system call the whole process will be bl

What are the various file operations, What are the various file operations?...

What are the various file operations? The six basic file operations are Creating a file Reading a file Writing a file Repositioning within a file Tr

System protection, what is the need-to-know principle? why is it important ...

what is the need-to-know principle? why is it important for a protection system to adhere to this principle?

Define the properties of interactive operating system, Define the propertie...

Define the properties of Interactive operating system Interactive:- This system is composed of many short transactions where the results of the next transaction may be unpred

For what reason would such a scheme be useful, Q. A Burroughs B7000/B6000 ...

Q. A Burroughs B7000/B6000 MCP file is able to be tagged as sensitive data. When such a file is removed its storage area is overwritten by some random bits. For what reason would

Factors involved in choosing the host operating system, 1. How is reliabili...

1. How is reliability enhanced with the microkernel approach to system design?  2. In a virtual machine design where guest operating systems are independent virtual machines sup

What do you mean by reference counts, Q. If each the access rights to an o...

Q. If each the access rights to an object are deleted the object can no longer be accessed. At this stage the object should also be deleted and the space it occupies should be ret

SYSTEM PROGRAMMING, advantages and disadvantages of monolithic and layered ...

advantages and disadvantages of monolithic and layered approach

Explain worst fit algorithm, Worst Fit Algorithm Here we obtain the la...

Worst Fit Algorithm Here we obtain the largest space available for the smallest. Therefore after that process entered there will be much more space remaining. In this space we

Nested Macro calls, . Nested Macro calls are expanded using the

. Nested Macro calls are expanded using the

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