Which of the following statements is correct about Peterson's algorithm for…
Which of the following statements is correct about Peterson's algorithm for process synchronisation?
- A.
It works for 3 processes only.
- B.
It uses one bool type array of size 3 bool flag [3] and int variable turn.
- C.
If flag[i] is true, then process Pi is ready to enter the critical section.
- D.
It fails when two processes want to enter the critical section at the same time.
Attempted by 161 students.
Sign up free to check your answer
Sign up freeLoading lesson…

