Write a program to synchronize the agent, Operating System

Assignment Help:

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.

 


Related Discussions:- Write a program to synchronize the agent

Producer - consumer synchronization, This assignment is based on Programmin...

This assignment is based on Programming Project 6.40 in Silbershatz. Implement the ProducerXConsumer program according to the instructions for Project 6.40 for both Linux and Win32

Explain tightly coupled systems and loosely coupled system, Differentiate t...

Differentiate tightly coupled systems and loosely coupled systems? Loosely coupled systems:-  Every processor has its own local memory  Every processor can communicate

Write a short note on disk scheduling, Write a short note on disk schedulin...

Write a short note on disk scheduling   One of the responsibities of operating system O/S is to use the hardware efficiently. Whenever a process requires I/O to or from the

How does dma raise system concurrency, Q. How does DMA raise system concurr...

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

Explain types of file allocation- linked list allocation, Linked list alloc...

Linked list allocation: At this time the blocks are stored using linked lists. The block size require not be the same. Thus internal fragmentation is avoided. Consider

Mechanism by which one segment belong to two address spaces, Q. Explain a m...

Q. Explain a mechanism by which one segment could belong to the address space of two different processes. Answer: Because segment tables are a collection of base-limit register

Explain kernel-level threads (klt), KERNEL-LEVEL THREADS (KLT) In this...

KERNEL-LEVEL THREADS (KLT) In this level every thread management is done by kernel .No thread library except an API system calls to the kernel thread facility exists. The kern

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd