It is given that in a system, processes P and C communicate by means of 3 semaphores and one buffer. The buffer size is given as 10. A semaphore M is used to implement mutual exclusion. Initial value of M is 1.
The value of M is decremented by any process that wants to enter its critical region (the code that adds or removes items from the buffer), and incremented back to 1 after leaving the critical region.
The semaphore F counts the number of full slots in the buffer. It is initially 0, then it is decremented by C before entering its critical region, and incremented by P after leaving its critical region. Semaphore E counts the number of empty slots in the buffer. It is initially 10, then it is decremented by P before entering its critical region, and incremented by C after leaving its critical region.
Before entering a critical region, a process first tries to decrement E or F, and then tries to decrement M. On leaving a critical region, a process first raises M and then E or F.
Under the given assumptions, consider the following combinations :
- M = 0, E = 5, F = 3
- M = 0, E = 8, F = 0
- M = 0, E = 7, F = 1
- M = 1, E = 7, F = 0
Out of the four combinations given above, the total number of combinations which cannot exist is ____