The GATE Grind

GATE 2009 CS – Question 33

Operating System · Concurrency and Synchronization · 2 marks · Multiple choice

Critical-section entry/exit are implemented with test-and-set; X starts at0. Which statements are TRUE?

void enter_CS(X) { while (test-and-set(X)); }
void leave_CS(X) { X = 0; }

I. Deadlock-free.

II. Starvation-free.

III. FIFO entry.

IV. Multiple processes can enter simultaneously.

  1. I only
  2. I and II
  3. II and III
  4. IV only

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) I only

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Concurrency and Synchronization questions

All Concurrency and Synchronization questions →