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 root partition The root partition,which have the operating-system kernel and potentially other system files, is mounted at boot time. In successful mount operation, ope

As we have discussed, page tables map virtual page addresses to physical page addresses. One of the advantages of using virtual addresses is that we can achieve complete separation

Explain segmentation hardware? We define an completion to map two-dimensional user-defined addresses into one-dimensional physical addresses. This mapping is affected by means

Question: A set of processes are in a deadlock state when every process in the set is waiting for an event that can be caused by only another process in the set. (a) There

Device Drivers Communicates straight with peripheral devices (disks, tapes, etc.). Responsible for begin physical I/O operations on the device. Pro

Write a note on semaphores A semaphore is a tool meant for synchronizing multiple processes trying to access a shared variable. That is a semaphore is used to deal with the cri

Q. Compare the utilization of networking sockets with the use of shared memory as a mechanism for communicating data between processes on a single computer. What are the merits of

Operating Systems 1. Explain single Partition Allocation and Multiple Partition Allocation. 2. What do you mean by PCB? What useful information is available in PCB? 3. De

Q.  You have devised a fresh page-replacement algorithm that you think may be optimal. In a few contorted test cases Belady's anomaly occurs. Is the fresh algorithm optimal? Descr

File Organization     * Sequential     * Direct     * Indexed A file still if it is stored on a magnetic disk or CD-ROM disk may perhaps have a sequential file organiz