Q65
MCQ2 marks, −0.5The semaphore variables full, empty and mutex are initialized to , and , respectively. Process P1 repeatedly adds one item at a time to a buffer of size , and process P2 repeatedly removes one item at a time from the same buffer using the programs given below. In the programs, , , and are unspecified statements. while (1) { K; P(mutex); Add an item to the buffer; V(mutex); L; } while (1) { M; P(mutex); Remove an item from the buffer; V(mutex); N; } The statements , , and are respectively
Sign in to save attempts.
Loading…