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
Explain Deadlock Prevention-Resource allocation graph allocation Resource allocation graph algorithm :  Using this algorithm we are able to actually know if there exists in th

List three ways of allocating storage, and give advantages of each. a. Contiguous allocation. Fastest, if no changes are to be made. Also simplest for random access files. b

Define buffering. A buffer is a memory area that keeps data whereas they are transferred among two devices or among a device and an application. Buffering is done for three rea

How can deadlocks be represented? Deadlocks are able to be described in terms of a directed graph called as a system resource-allocation graph. This graph contains of the foll

Explain about demand paging? A demand paging system is same to a paging system with swapping. Processes reside on secondary memory. When we require executing a process, we chan

What are the features of Operation Research approach?

Q. What are two dreadful problems that designers should solve to implement a network-transparent system? Answer: One such issue is making all the processors as well as storag

1. Suggest some mechanism(s) to lower the dispatch latency while scheduling for a real-time system. Also, discuss any trade-off or consequent constraint associated with it, if a

Cold Backup: It is copying the three groups of files when the object is shut down. This is a straight file copy, generally from the storage disk directly to tape. You must end th

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