retagged by
616 views
6 votes
6 votes
We want to use semaphores to implement a shared critical section (CS) among three threads $\mathrm{T} 1$, $\mathrm{T} 2$, and $\mathrm{T} 3$.

We want to enforce the execution in the CS in this order: First $\text{T}2$ must execute in the CS. When it finishes, $\mathrm{T} 1$ will then be allowed to enter the CS; and when it finishes $\text{T}3$ will then be allowed to enter the CS; when $\text{T}3$ finishes then $\text{T}2$ will be allowed to enter the CS, and so on, $(\text{T2, T1, T3, T2, T1, T3}, \ldots).$

What is the minimum number of binary semaphores we need in order to enforce this ordering?
retagged by

1 Answer

Answer:

No related questions found