Counting Semaphores value is initialized to 1 and no blocked processes are present in the system. If the following operations are performed in the given order then what is the final value of S: P,V,P,V,V,P,P,V,V,V,P,V,V,V,P,P,V,V?
Doubt 1: Shouldn’t the final value be 1 after successive P operations put a process in blocked state and V operations unblock processes if a process is waiting?
Doubt 2: What happens if value is already 1 and successive V operations are performed?