Step 1: Definition of Deadlock.
Deadlock is a situation in operating systems where two or more processes are blocked, waiting for resources held by each other, resulting in a cycle of dependencies. The processes cannot continue because they are each waiting for the other to release resources.
Step 2: Explanation of other options.
- (1) Pooling: Refers to the practice of gathering multiple resources for shared access, not a situation involving blocking.
- (3) Thrashing: Refers to excessive paging and swapping between memory and disk, leading to performance degradation. It is not related to blocked processes.
- (4) Paging: Refers to the technique of managing memory by dividing it into fixed-size blocks, not related to processes waiting for resources.
Step 3: Conclusion.
Therefore, the correct answer is **Deadlock** (2).
Complete the following statement by choosing the correct option.
For a deadlock to occur, the four conditions namely Mutual Exclusion, Hold and Wait, No preemption, Circular wait __________.
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 OwnResource(Resource R)
Acquire lock L // a global lock
if R is available then
Acquire R
Release lock L
else
if R is owned by another process P then
Terminate P, after releasing all resources owned by P
Acquire R
Restart P
Release lock L
end if
end if
end function
Which of the following choice(s) about the above scheme is/are correct?