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

Differences between symmetric and asymmetric multiprocessing, Describe the ...

Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems? Symmetric multiprocessing t

What are the various disk-scheduling algorithms, What are the various disk-...

What are the various disk-scheduling algorithms? The several disk-scheduling algorithms are a. First Come First Served Scheduling b. Shortest Seek Time First Scheduling

Explain about file allocation methods, Explain about file allocation method...

Explain about file allocation methods? The main problem in direct-access nature is how to assign space to these files so that disk space if utilized effectively and files can b

CPU sheduling, categorize the CPU scheduling algorithms and among them expl...

categorize the CPU scheduling algorithms and among them explain the non-preemptive algorithms..

Linux, Discuss the risks of having a single root user

Discuss the risks of having a single root user

Control the access of the three global variables, Give a brief introduction...

Give a brief introduction about the operation of your program and show that you understand the idea behind threads and mutual exclusion variable. Why do we need to use mutual exclu

How is memory management done using bit maps?, How is memory management don...

How is memory management done using bit maps? A bit map is here in this we signify the bit value as 0 or 1. 1-hole 0-process In this we are able to represent the proce

What is a two state process model?, What is a two state process model? ...

What is a two state process model?   At any time a process is being implementing by a processor or not. Therefore a process may be in Running or not running state. When an Ope

Locks - mutexes, Locks (also known as mutexes, short for mutual exclusion l...

Locks (also known as mutexes, short for mutual exclusion locks) provide mutual exclusion to shared data inside a critical session. They are implemented by means of two atomic routi

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