subject
Engineering, 15.04.2020 20:22 ethanyayger

A group of N faculty members are sitting around a bowl of candy, which holds M pieces of candy. Each of the N faculty members spends his life thinking and eating candy. They must have a piece of candy to think. One Teaching Assistant spends his life sleeping except that when the bowl is empty he is woken up and fills the candy bowl. Only one faculty member can access the bowl at a time.

1) Write a Java solution to the above program using a semaphore implementation for synchronization and mutual exclusion. Each faculty member should be a thread. The Teaching Assistant should be a thread.

2) Write a Java solution using a synchronized class representing the bowl.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:20
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
Answers: 2
question
Engineering, 04.07.2019 19:10
Aplate of dimensions 3 m x 3 m is placed 0.37 mm apart from a fixed plate. the plate requires a force of 2n to move at speed of 45 cm/s. evaluate the viscosity of the fluid in between the plates
Answers: 3
question
Engineering, 06.07.2019 02:30
A75mm diameter shaft is supported in a journal bearing 75mm long with a diametral clearance of 0. 1mm. it supports a radial load of 1000 n and is lubricated with sae 50 oil at 70°c. find the friction torque and the power loss when the crankshaft rotates at 2900 rev/min.
Answers: 1
You know the right answer?
A group of N faculty members are sitting around a bowl of candy, which holds M pieces of candy. Each...
Questions
question
Mathematics, 02.10.2019 05:00
Questions on the website: 13722360