Write a program to synchronize the agent, Operating System

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.

 

Posted Date: 7/27/2013 2:46:29 AM | Location : United States







Related Discussions:- Write a program to synchronize the agent, Assignment Help, Ask Question on Write a program to synchronize the agent, Get Answer, Expert's Help, Write a program to synchronize the agent Discussions

Write discussion on Write a program to synchronize the agent
Your posts are moderated
Related Questions
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Determine the syntax of the assembler directive EQU The following is syntax of the assembler directive EQU: EQU

properies of Batch oriented and interactive operating system.

What is Demand paging? Virtual memory is commonly executed by demand paging. In demand paging, the pager brings only those essential pages into memory instead of swapping in a

What are the features of Operation Research approach?

Q. How does DMA raise system concurrency? How does it make difficult hardware design? Answer: DMA increases system concurrency by allowing the CPU to perform tasks while the

Minor page fault :I f the page is loaded in memory at the time the fault is started, but is not checked in the memory management unit as being loaded in memory, then it is named a

Q. Advantages and disadvantages of multiprogramming? Advantages 1.    High CPU utilization. 2. It appears that many programs are allotted CPU almost concurrently. D

What are the main differences between operating systems for mainframe computers and personal computers? The design goals of operating systems for those machines are quite diffe

Synchronization can be achieved by means other than locks and condition variables. One alternative is semaphores. A semaphore is used to regulate traf?c in a critical section. A se