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

Semispace, Semispace works by maintaining two disjoint areas from which mem...

Semispace works by maintaining two disjoint areas from which memory can be allocated. These areas are called the from-space and the to-space. At ?rst, the algorithm allocates memor

Can we call trap as an interrupt??, is there any difference between the tra...

is there any difference between the trap and interrupt??

Bounded and unbounded buffer, Ask question #Minimum 100 difference between ...

Ask question #Minimum 100 difference between bounded and unbounded buffer words accepted#

What are the various page replacement algorithms, What are the various page...

What are the various page replacement algorithms used for page replacement? FIFO page replacement Optimal page replacement LRU page replacement LRU approximat

Case studies, Did Abhinav agree to the initial timeline requested by Rebecc...

Did Abhinav agree to the initial timeline requested by Rebecca

Define caching, Define caching. A cache is a region of fast memory that...

Define caching. A cache is a region of fast memory that holds copies of data. Access to the cached copy is well-organized than access to the original. Caching and buffering are

What is independent process, What is independent process? A process is ...

What is independent process? A process is independent it cannot influence or be affected by the other processes implementing in the system. Any process does not share data with

10 marks, Differentiate between sequential access and direct access method?...

Differentiate between sequential access and direct access method?

What is the purpose of system calls, What is the purpose of system calls? ...

What is the purpose of system calls? System calls permit user-level processes to request services of the operating system.

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