A) Suppose each nonshareable resource in a computer system isclassified as a lev
ID: 3607884 • Letter: A
Question
A) Suppose each nonshareable resource in a computer system isclassified as a level 1, level 2 or level 3 resource. Moreover,suppose each process in the system is required to request theresource it needs according to this classification. That is, itmust request all the required level 1 resources at once beforerequesting any level 2 resources. Once it receives the level 1resource, it can request all the required level 2 resources, and soon. a) Can deadlock occur in such a system? Why or why not? B) A process that is waiting for a time slice is said tosuffer starvation if it is never given a time slice. (b) The pavement in the middle of an intersection can beconsidered as a non-shareable resource for wich carsapproaching the intersection complete. If the light is able tosense the amount of traffic arriving from each direction and isprogrammed to give green light to the heavier traffic, the lightermight suffer from starvation. How is starvation avoided? (c) In what sense can a process starve is the dispatcheralways assigns time slices according to a priority system in wichthe priority of each process remains fixed? (Hint: What is thepriority of the process that just completed its time slice incomparision to the processes that are waiting, and consequentlywich routine gets the next time slice?) How, would you guess, domany operating systems avoid this problem? A) Suppose each nonshareable resource in a computer system isclassified as a level 1, level 2 or level 3 resource. Moreover,suppose each process in the system is required to request theresource it needs according to this classification. That is, itmust request all the required level 1 resources at once beforerequesting any level 2 resources. Once it receives the level 1resource, it can request all the required level 2 resources, and soon. a) Can deadlock occur in such a system? Why or why not? B) A process that is waiting for a time slice is said tosuffer starvation if it is never given a time slice. (b) The pavement in the middle of an intersection can beconsidered as a non-shareable resource for wich carsapproaching the intersection complete. If the light is able tosense the amount of traffic arriving from each direction and isprogrammed to give green light to the heavier traffic, the lightermight suffer from starvation. How is starvation avoided? (c) In what sense can a process starve is the dispatcheralways assigns time slices according to a priority system in wichthe priority of each process remains fixed? (Hint: What is thepriority of the process that just completed its time slice incomparision to the processes that are waiting, and consequentlywich routine gets the next time slice?) How, would you guess, domany operating systems avoid this problem?Explanation / Answer
Dear, Case A : a. Deadlock occurs in this system,because if a process(P1) receives level 1 resources then it canrequest level 2 resources. If level 2 resources is already in useby another process say P2 then P1 has to wait until P2 releases theresources. in this case deadlock occurs. Case B : b. Here inorder to avoid thestarvation the non-sharable resourse must be made sharable. So,that this system can be avoided from starvation. c. Here in this case as the priority issaid to be fixed, the priority of the process remain unchangedafter the completion of the time slice. Next time slice will begiven for the process with highest priority. " I hope this will help you "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.