Загрузка страницы

Deadlock in Operating System | 4 Conditions of Deadlocks | Deadlock Handling - Process Management

Support Simple Snippets by Donations -
Google Pay UPI ID - tanmaysakpal11@okicici
PayPal - paypal.me/tanmaysakpal11
--------------------------------------------------------------------------------------------- In this deadlock in OS video tutorial, we will understand what is a deadlock in Operating systems, what are the conditions that result in deadlocks & strategies for handling deadlocks.

Deadlocks in OS -
A process in operating systems uses different resources and uses resources in following way.
1) Requests a resource
2) Use the resource
2) Releases the resource
Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process.

Deadlock can arise if following four conditions hold simultaneously (Necessary Conditions) -
1) Mutual Exclusion: One or more than one resource are non-sharable (Only one process can use at a time)
2) Hold and Wait: A process is holding at least one resource and waiting for resources.
3) No Preemption: A resource cannot be taken from a process unless the process releases the resource.
4) Circular Wait: A set of processes are waiting for each other in circular form.

Methods for handling deadlock -
There are three ways to handle deadlock
1) Deadlock prevention or avoidance - The idea is to not let the system into deadlock state.
2) Deadlock detection and recovery - Let deadlock occur, then do preemption to handle it once occurred.
3) Ignore the problem all together - If deadlock is very rare, then let it happen and reboot the system. This is the approach that both Windows and UNIX take.

Following three strategies can be used to remove deadlock after its occurrence -
1) Preemption - We can take a resource from one process and give it to other. This will resolve the deadlock situation, but sometimes it does causes problems.
2) Rollback - In situations where deadlock is a real possibility, the system can periodically make a record of the state of each process and when deadlock occurs, roll everything back to the last checkpoint, and restart, but allocating resources differently so that deadlock does not occur.
3) Kill one or more processes - This is the simplest way, but it works.

Simple Snippets Official Website -
http://simplesnippets.tech/
Simple Snippets on Facebook -
https://www.facebook.com/simplesnippets/
Simple Snippets on Instagram -
https://www.instagram.com/simplesnippets/
Simple Snippets on Twitter -
https://twitter.com/simplesnippet
Simple Snippets Google Plus Page -
https://plus.google.com/+SimpleSnippets
Simple Snippets email ID -
simplesnippetsinfo@gmail.com

For More Technology News, Latest Updates and Blog articles visit our Official Website - http://simplesnippets.tech/
#Deadlock #OperatingSystems #OS

Видео Deadlock in Operating System | 4 Conditions of Deadlocks | Deadlock Handling - Process Management канала Simple Snippets
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
16 сентября 2018 г. 18:30:00
00:15:45
Яндекс.Метрика