CS381 Homework - Suraj @ LUMS
CS381 Homework - Suraj @ LUMS
CS381 Homework - Suraj @ LUMS
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Summer 2005-2006<br />
5. [10]<br />
Consider a system consisting of m resources of the same type being shared by n<br />
processes. Resources can only be requested and released by processes one at a time (i.e.<br />
they are non-sharable type). Show that the system is deadlock free if the following two<br />
conditions hold:<br />
• The maximum need of each process is between 1 and m resources<br />
• The sum of all maximum needs is less than m+n<br />
Hint: Show that the there exists a process P i whose Need i is zero. (I.e. it has at least one<br />
resource it can release and hence the system cannot be in a deadlock state.)<br />
Submission Instructions:<br />
o Instructions about how and where to submit your homework will be posted on the<br />
course website.