For how many processes which are sharing common data, the Dekker’s algorithm implements mutual exclusion? A. 1 B. 2 C. 3 D. 4 E. None of the above

[amp_mcq option1=”1″ option2=”2″ option3=”3″ option4=”4 E. None of the above” correct=”option2″]

The correct answer is B. Dekker’s algorithm implements mutual exclusion for two processes. It is a simple algorithm that uses two shared variables, turn and proc, to ensure that only one process can access the shared data at a time.

Option A is incorrect because Dekker’s algorithm can only be used to implement mutual exclusion for two processes.

Option C is incorrect because Dekker’s algorithm does not use three shared variables.

Option D is incorrect because Dekker’s algorithm does not use four shared variables.

Option E is incorrect because Dekker’s algorithm is a correct algorithm that implements mutual exclusion for two processes.

Exit mobile version