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

Convert the hex to binary, Convert the following from hex to binary and dra...

Convert the following from hex to binary and draw it on the memory map.     RAM    = 0000 -> 00FF     EPROM = FF00  -> FFFF Answer:   0000  0000 0000  0000 (0)    RAM sta

What is external fragmentation?, What is external fragmentation? As pro...

What is external fragmentation? As process are removed from and loaded to the memory free memory space is bracken into pieces .external fragmentation take place when enough mem

Microsoft, Discuss the high barriers to entry in the market for PL operatin...

Discuss the high barriers to entry in the market for PL operating systems

Explain about memory-management scheme, Q. In the IBM/370 memory protectio...

Q. In the IBM/370 memory protection is offered through the use of keys. A key is a 4-bit quantity every 2K block of memory has a key (the storage key) associated with it. The CPU

Unix, UNIX Shell and History feature. 1.Creating a child process. 2.Creatin...

UNIX Shell and History feature. 1.Creating a child process. 2.Creating a history feature. With the notes under code. Its exactly "programming project 1 - Unix Shell and History Fea

Process, what common event leads to the creation of a process?

what common event leads to the creation of a process?

Android application development using java, This is a group project as desc...

This is a group project as described in the 'AssignmentDescription.pdf' file. I am doing a sub project which is "sub project Mobile application. Android or Apple based. Turn based

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