Home / Expert Answers / Computer Science / in-the-simple-solution-to-a-single-resource-monitor-solution-which-of-the-following-problems-are-po-pa686

(Solved): In the simple solution to a single resource monitor solution, which of the following problems are po ...



In the simple solution to a single resource monitor solution, which of the following problems are possible (mark as many as applicable)?

monitor ResourceAllocator
{
boolean busy;
condition x;
void acquire(int time) {
if (busy)
x.wait(time);
busy = true;
}
void release() {
busy = false;
x.signal();
}
initialization code() {
busy = false;
}
}
Figure 5.19 A monitor to allocate a single resource

1 A process might attempt to release a resource that it never requested

2 A process might request the same resource twice (without first releasing the resource).

3 A process might never release a resource once it has been granted access to the resource.

4 A process might access a resource without first gaining access permission to the resource.



We have an Answer from Expert

View Expert Answer

Expert Answer


OPTION : 1 - A process might attemp
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe