

MCQOPTIONS
Saved Bookmarks
1. |
Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and freeing of resources are done by holding a global lock (L). The following scheme is used to own a resource instance:function OWNRESOURCES(Resource R)Acquire lock L / / a global lockif R is available thenAcquire RRelease lock Lelseif R is owned by another process P thenTerminate P, after releasing all resources owned by PAcquire RRestart PRelease lock Lend ifend ifend functionWhich of the following choice(s) about the above scheme is/are correct? |
A. | The scheme may lead to starvation. |
B. | The scheme may lead to live-lock. |
C. | The scheme ensures that deadlocks will not occur. |
D. | The scheme violates the mutual exclusion property. |
Answer» B. The scheme may lead to live-lock. | |