edited by
1,173 views
0 0 votes

In a strict alteration , we use TURN variable and turn variable is shared variable .So,my doubt is that there's synchronisation problem as it is similar to producer consumer problem. While executing turn variable  there might be preemption and it might cause inconsistency ? So how could strict alteration has this disadvantage?

1 Answer

0 0 votes
In strict alternation, only two processes are involved, so, when one process enters critical section, it changes value such that only other process will be able to enter. That is why the name Strict Alternation.
Position:
Show:

Related questions

0 0 votes
1 1 answer
938
938 views
`JEET asked Jan 16, 2019
938 views
3 3 votes
2 2 answers
156
156 views
GO Classes asked Aug 31
156 views
Suppose $\texttt{x}$ is a condition variable inside a monitor.What happens when a process executes:$\texttt{x.wait()}$Mutual exclusion is established on variable $\texttt...
4 4 votes
1 1 answer
198
198 views
GO Classes asked Jul 27
198 views
Two processes $P_i$ and $P_j$ use Peterson’s solution:$\texttt{flag[i] = TRUE;}$$\texttt{turn = j;}$$\texttt{while(flag[j] \&\& turn == j);}$$\texttt{Critical Section}$$\...
2 2 votes
1 1 answer
158
158 views
GO Classes asked Jul 27
158 views
Consider the following solution for process $P_i$:$\texttt{while (turn != i);}$$\texttt{Critical Section}$$\texttt{turn = j;}$Which of the following statements are correc...