Write a program to synchronize the agent, Operating System

Assignment Help:

The Cigarette-Smokers difficulty Consider a system with three smoker processes and one agent process. Every smoker continuously rolls a cigarette and then smokes it. But to roll as well as smoke a cigarette the smoker needs three ingredients: paper, tobacco and matches. One of the smoker progression has paper another has tobacco and the third has matches. The agent has an endless supply of all three materials. The agent put two of the ingredients on the table. The smoker who has the residual ingredient then makes and smokes a cigarette signalling the agent on completion. The agent then places out another two of the three ingredients and the cycle repeats. Write a program to synchronize the agent as well as the smokers using Java synchronization.

 


Related Discussions:- Write a program to synchronize the agent

What is a client server system, What is a client server system? Central...

What is a client server system? Centralized systems proceed as server systems to satisfy request generated by client systems Server system is able to be broadly div

What are race conditions?, What are race conditions? Race conditions ar...

What are race conditions? Race conditions are problems that take place due to the sharing of the same file by several processes. In such a case none of the processes is able to

How virtual memory is implemented, How Virtual memory is implemented Vi...

How Virtual memory is implemented Virtual memory can be implemented along with Segmentation and Paging

What is the purpose of the global catalog, Question: (a) i. Consider A...

Question: (a) i. Consider Active Directory as a database, then for each type and new class of objects, what is created? ii. What is the purpose of the global catalog? ii

What are the different types of semaphore?, What are the different types of...

What are the different types of semaphore? Principally the semaphore is able to be classified into two on the basis of their values a)      Counting semaphore: In counting s

Explain single-user systems, We have stressed the need for an operating sys...

We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to

Search and print between two words/patterns, what if we need the portion fr...

what if we need the portion from a text based on some keyword. For eg. My file is like below, ------------------------------------------------ Order=[ 1 2 3 4 5 Order=[ 6 7 8 9

Define rotational latency and disk bandwidth, Define rotational latency and...

Define rotational latency and disk bandwidth. Rotational latency is the additional time waiting for the disk to rotate the wanted sector to the disk head. The disk bandwidth is

Explain disadvantages of the two-level directory, How do we overcome the di...

How do we overcome the disadvantages of the two-level directory? Give links from one user directory to another, creating path names; system files become available by letting th

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