Question Four 5 Marks Learning Outcome(s): What are the disadvantages of Peterso
ID: 3722339 • Letter: Q
Question
Question Four 5 Marks Learning Outcome(s): What are the disadvantages of Peterson's solution for critical-section problem? Code below shows the solution to two process mutual exclusion problem. Describe the OS mechanism for process management Process P timing, memory, do VO, file and aitrue; turn = j; while (lag[il&&turn; critical section nagli false; remainder section while (trne); Process Pj nagul true; turn -i while (lagil&& turni critical section lagjl false; remainder section while (true): 6- Answer True or F the following questions: (i)This algorithm satisfies the "mutual exclusion", "progress" and "bounded waiting condition. Pg. 5 Question Four ii) This algorithm has a flaw as the variable "turn" can be modified by both processes at the same time. iii) This algorithm may cause "deadlock" if both processes set their flags to True at the same time. iv) This algorithm satisfies only the "mutual exclusion" and "progress" condition.Explanation / Answer
i.True
only one process can access the critical section at any time,therefore Mutual Exclusion is assured .
a process outside the critical section does not blocks other processes from entering the critical section therefore Progress is also assured .
every process gets a fair chance so Bounded Waiting is preserved .
ii.false
iii.false
iv.false
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.