GATEverse
← GATE CSE 2009

Q33

MCQ2 marks, −0.67

The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows: void enter_CS(X) { while(test-and-set(X)); } void leave_CS(X) { X = 0; } In the above solution, XX is a memory location associated with the CSCS and is initialized to 00. Now consider the following statements: Which of the above statements are TRUE? (I) only (I) and (II) (II) and (III) (IV) only

Sign in to save attempts.

Loading…