chap7 1-Discuss in which practical cases the condition of nonpreemption would no
ID: 3590223 • Letter: C
Question
chap7
1-Discuss in which practical cases the condition of nonpreemption would not hold. Give an example.
2- Explain and give examples of why deadlock may be considered worse than starvation. Is deadlock a form of starvation? Give examples.
9- A system has four resources types with (5, 3, 5, 3) and five processes with a maximum resource claim: Pl with (2, 2, 1, 1), P2 with (1, 2, 1, 2), P3 with (1, 1, 2, 1), P4 with (3, 1, 2, 0), and P5 with (2, 1, 1, 0). The resource allocations are Pl with (1, 1, 0, 0), P2 with (0, 1, 1, 0), P3 with (1, 0, 1, 1), P4 with (2, 1, 2, 0), and P5 with (1, 0, 1, 0). Is this system in a safe state? Give good arguments.
Explanation / Answer
Answer2 :
A deadlock happens when (at least two) threads have made a circumstance where they are largely obstructing each other. Envision that strings T1 and T2 need to gain the two assets An and B so as to do their work. In the event that T1 gets asset An, at that point T2 gets asset B, T1 could then sit tight for asset B while T2 was sitting tight for asset A. For this situation, the two strings will sit tight inconclusively for the asset held by the other string. These strings are said to be halted.
Starvation happens when a scheduler procedure (i.e. the working framework) declines to give a specific string any amount of a specific asset (for the most part CPU). On the off chance that there are excessively numerous high-need strings, a lower need string might be famished. This can have negative effects, however, especially when the lower-need string has a bolt on some asset.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.