GATEverse
← GATE IT 2004

Q65

MCQ2 marks, −0.5

The semaphore variables full, empty and mutex are initialized to 00, nn and 11, respectively. Process P1 repeatedly adds one item at a time to a buffer of size nn, and process P2 repeatedly removes one item at a time from the same buffer using the programs given below. In the programs, KK, LL, MM and NN are unspecified statements. P1P_1 while (1) { K; P(mutex); Add an item to the buffer; V(mutex); L; } P2P_2 while (1) { M; P(mutex); Remove an item from the buffer; V(mutex); N; } The statements KK, LL, MM and NN are respectively

Sign in to save attempts.

Loading…