A deadlock is a situation in which two or more competing actions are each waiting for the other to finish, and thus neither ever does.
What is a deadlock in operating system? Is it a state where two ore more operations are waiting for each other, say a computing action 'A' is waiting for action 'B' to complete, while action 'B' can only execute when 'A' is completed. Such a situation would be called a deadlock. In operating systems, a deadlock situation is arrived when computer resources required for complete of a computing task are held by another task that is waiting to execute. The system thus goes into an indefinite loop resulting into a deadlock.
The deadlock in operating system seems to be a common issue in multiprocessor systems, parallel and distributed computing setups.

In order for deadlock to occur, four conditions must be true.
What is a deadlock in operating system? Is it a state where two ore more operations are waiting for each other, say a computing action 'A' is waiting for action 'B' to complete, while action 'B' can only execute when 'A' is completed. Such a situation would be called a deadlock. In operating systems, a deadlock situation is arrived when computer resources required for complete of a computing task are held by another task that is waiting to execute. The system thus goes into an indefinite loop resulting into a deadlock.
The deadlock in operating system seems to be a common issue in multiprocessor systems, parallel and distributed computing setups.
In order for deadlock to occur, four conditions must be true.
- Mutual exclusion - Each resource is either currently allocated to exactly one process or it is available. (Two processes cannot simultaneously control the same resource or be in their critical section).
- Hold and Wait - processes currently holding resources can request new resources
- No preemption - Once a process holds a resource, it cannot be taken away by another process or the kernel.
- Circular wait - Each process is waiting to obtain a resource which is held by another process.
No comments:
Post a Comment