Step 1: Deadlock Definition. Deadlock occurs in operating systems when two or more processes are suspended, each awaiting a resource that the other holds. This creates a dependency cycle, preventing any process from proceeding.
Step 2: Other Options Explained. - (1) Pooling: Involves aggregating resources for shared access, not process blocking. - (3) Thrashing: Characterized by excessive memory paging and swapping, degrading performance, but not involving blocked processes. - (4) Paging: A memory management technique that divides memory into fixed-size blocks, unrelated to processes waiting for resources.
Step 3: Conclusion. Consequently, Deadlock (2) is the accurate term.
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?