Assignment 4
Topic: Concurrency Control
Due on or before:
(To be announced)
Maximum Marks: 5
There is a service counter which has a limited waiting queue
outside it. It works as follows:
-
The counter remains open till the waiting queue is not empty
-
If the queue is already full, the new customer simply leaves
-
If the queue becomes empty, the outlet doors will be closed
(service personel sleep)
-
Whenever a customer arrives at the closed outlet, he/she needs to
wake the person at the counter with a wake-up call
Implement the above-described problem using semaphores or
mutuexes along with threads. Also show how it works, if there are
2 service personel, and a single queue. Try to simulate all
possible events that can take place, in the above scenario.
Take-Home Message
The assignment aims to provide anopportunity to design a solution
to a realistic synchronisation problem, and implement it with
semaphores and mutexes. The experimentation is to illustrate the
correctness of the design
Demo Schedule:
(Schedule: to be announced)
Sumantra Dutta Roy
Department of Electrical Engineering, IIT Delhi, Hauz Khas,
New Delhi - 110 016, INDIA. sumantra@ee.iitd.ac.in