GATEverse
← GATE CSE 2020

Q34

MCQ2 marks, −0.67

Each of a set of nn processes executes the following code using two semaphores aa and bb initialized to 11 and 00, respectively. Assume that count\text{count} is a shared variable initialized to 00 and not used in CODE SECTION P. CODE SECTION P\begin{array}{|c|} \hline \textbf{CODE SECTION P} \\ \hline \end{array} wait(a); count=count+1; if (count==n) signal (b); signal (a); wait (b) ; signal (b); CODE SECTION Q\begin{array}{|c|} \hline \textbf{CODE SECTION Q} \\ \hline \end{array} What does the code achieve?

Sign in to save attempts.

Loading…