Initially you have a semaphore s set to 0. Process p0 execut…
Initially you have a semaphore s set to 0. Process p0 executes the following code: s.wait();s.wait();s.signal(); Process p1 executes the following code: s.signal();s.signal(); What is the value of the semaphore s after both processes terminate? Which process will haveits first statement terminate first?
Read Details