Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question: What is the largest possible value of M so that the system is certain

ID: 3817949 • Letter: Q

Question

Question: What is the largest possible value of M so that the system is certain to be deadlock free? Explain?

Consider a system with 12 resources of the same type shared by 5 processes. Let M be the maximum number of resources that can be held by a process at one time (i.e., one is certain that a process will never try to acquire a resource if it already holds M of them).


Consider that each process runs the following pseudo-code:

while (true) {

for   (int i=0; i < M; i++) {

acquire a resource;

}

Do some work

for   (int i=0; i < M; i++) {

release a resource;

}

}

Explanation / Answer

For a system to be deadlock free, Sum of max resources needed by processes < No. of processes + No. of resources

5*M < 12+5

5*M <17

maximum value of M should be 3

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote