Q34
MCQ2 marks, −0.67A shared variable , initialized to zero, is operated on by four concurrent processes as follows. Each of the processes and reads from memory, increments by one, stores it to memory, and then terminates. Each of the processes and reads from memory, decrements by two, stores it to memory, and then terminates. Each process before reading invokes the operation (i.e., wait) on a counting semaphore and invokes the operation (i.e., signal) on the semaphore after storing to memory. Semaphore is initialized to two. What is the maximum possible value of after all processes complete execution?
Sign in to save attempts.
Loading…