Q28
MCQ2 marks, −0.67Consider the two functions and shown below. incr(){ decr(){ wait(s); wait(s); X = X+1; X = X-1; signal(s); signal(s); } } There are threads each invoking once, and threads each invoking once, on the same shared variable . The initial value of is Suppose there are two implementations of the semaphore as follows: is a binary semaphore initialized to is a counting semaphore initialized to Let be the values of at the end of execution of all the threads with implementations respectively. Which one of the following choices corresponds to the minimum possible values of respectively?
Sign in to save attempts.
Loading…