Professional Documents
Culture Documents
Jawad Shaf Jawadshaf@ciitlahore - Edu.pk: Assistant Professor CS
Jawad Shaf Jawadshaf@ciitlahore - Edu.pk: Assistant Professor CS
jawadshaf@ciitlahore.edu.pk
Assistant Professor CS
COMSATS Institute of Information Technology,
Lahore
Resource instances:
Deadlock prevention
is a set of methods for ensuring that at least
Mutual Exclusion
The
Deadlock avoidance
on the other hand, requires that the operating
system
be given in advance additional information
concerning which resources a process will
request and use during its lifetime.
22
23
24
25
26
27
28
29
deadlock.
Safe state A state is safe if a sequence of
processes exist such that there are enough
resources for the first to finish, and as each
finishes and releases its resources there are
enough for the next to finish.
Page 254_
To illustrate, we consider a system with 12
Page 273
36
010
200
302
211
002
7
3
9
2
4
5
2
0
2
3
3
2
2
2
3
332
No deadlock, because
R1 is allocated to P2, which is not part of the
cycle.
Also R2 is allocated to P4, which is not part of
the cycle.
so once the resources are released by P2 and/or
P4, they can be allocated to P1 and P3.
Questions ??
?
Operating System Concepts