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
Garbage collectors trade space for time. If we collect all the time (which requires a lot of processing time), the GC allocator will use the least memory possible. On the other han

Demand paging gives that pages could only be brought into memory if the running process acts them. This is usually referred to as lazy evaluation as only those pages operated by

Assume that P A , P B and P C are three distinguished program s . When P A is executed, it needs 10 ticks to complete its execution and it forks new processes executing P B at tick

Q. What is the basic function of Assembler ? Input to an assembler is an assembly language program. Output is an object program and information which enables the loader to prep

What is meant by context switch? Switching the CPU to another process needs saving the state of the old process and loading the saved state for the latest process. This task is

Q. Why High level languages need Compiler? High level languages - illustrations are COBOL, FORTRAN, PL/I andALGOL - are processed by interpreters andcompilers. A compilers is a

Question: (a) (i) What is a microkernel? Describe the benefits of using microkernels. (ii) How does a microkernel-based operating system differ from a traditional operating

how the system call is work?

Hashed page table method A general approach for managing address spaces larger than 32 bits is to use a hashed page table with the hash values being the virtual-page number.

Describe the following allocation algorithms: a. First fit b. Best fit c. Worst fit   a. First-fit: search the list of available memory and all