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
Q. In some systems a subdirectory is able to be read and written by an authorized user just as ordinary files can be. a. Explain the protection problems that could arise. b.

UNIX Shell and History feature. 1.Creating a child process. 2.Creating a history feature. Its exactly "programming project 1 - Unix Shell and History Feature (p.157-159)" in the Si

What is Single-level Directory All files are constrained in the similar directory, which is simple to support and understood. One limitation is when the number of files enhance

What is critical section problem? Consider a system consists of 'n' processes. Every process has segment of code called a critical section, in which the process might be changi

Explain the TlsAlloc (VOID) This function is used to allocate a TLS index.Any subsequent TLS function calls will require  the handle returned  from TlsAlloc to be passed. The i

Q. What is the major difficulty that a programmer should overcome in writing an operating system for a real-time environment? Answer: The major difficulty is keeping the oper

Q. Presume that you have a page-reference string for a process with m frames (initially all empty). The page-reference string has length p along with n distinct page numbers

Explain what ISAM is. Indexed sequential access method. The file is stored in sorted order. ISAM has a master index file, indicating in what part of another index file the key

Q. Several CPU-scheduling algorithms are parameterized for instance the RR algorithm requires a parameter to indicate the time slice. Multilevel response queues require parameters

i need the job to be done within 3 days