• Home
  • Write a Resume
  • Actor
  • Actress
  • Privacy Policy
  • Contact us
Facebook Twitter Instagram
  • Home
  • About us
  • Disclaimer
  • Privacy Policy
  • Terms of Use
  • Contact us
Wiki Quicky
  • Home
  • Write a Resume
  • Actor
  • Actress
  • Privacy Policy
  • Contact us
Wiki Quicky
Home»Deadlock and it's prevention»Deadlock and it’s prevention

Deadlock and it’s prevention

AdminBy AdminAugust 16, 2022No Comments Deadlock and it's prevention
Deadlock and it’s prevention
Share
Facebook Twitter LinkedIn WhatsApp Pinterest Email


To know about ways to prevent deadlock we must first know the conditions that leads deadlock to occur. Deadlock occurs when we have a set of processes (not necessarily all the process in the system), each holding some resources, each requesting some resources and none of them is able to obtain what it needs i.e. to make progress. Now, there are four necessary conditions for deadlock to occur mutual exclusion, hold and wait, no preemption and circular wait. If any of these four conditions do not hold then deadlock will never occur. Let us be briefed on each of these four factors closely.

Mutual exclusion, here the resources that can be shared can always be granted simultaneous access by processes and they are never involved in a deadlock. Some of mutual exclusion resources are read only files. The processes requesting for this kinds of shareable resources will never have to wait. So, mutual exclusion must hold for non-shareable resources. However deadlock cannot be prevented by denying mutual exclusion condition. This is because some resources are non-shareable by nature like printer.

Hold and wait is a very tough condition which is very likely to create a deadlock condition in network. To avoid such condition, the system must ensure that all process that requests for a resource does not hold on to another request. Hold and wait scheme can be explained in two approaches. The first is, a process that requests for a resource and every resources it uses should be allocated before execution begins. The second is, a process can only request for a resource when it does not hold on to any other request. But the algorithms based on these approaches have very poor resource utilization.

these approaches have very poor resource utilization. This is because every resource gets locked within the processes in much early time than they are really used and they are not available for other request to use. While the second approach is very limited and is applicable only when there exist the assurance of re-usability of data on these resources. Many times these algorithm suffers from empty response as popular resources are rarely free.

No preemption condition states that resources that are allocated to processes cannot be preempted. This condition should not hold and to ensure it resources could be preempted. When a process is requested  or when a process request for a resource,it allocates the resource if it’s available. And if it is not then a check is made to see if the process holding the wanted resource is also waiting for additional resources. Now if both the request are not true, the process ends as the resource is neither not available nor held by other process. There are alternative approach to this. Example  of CPU memory and main memory can be taken to broaden the analysis on no preemption.

Circular wait, here the resource types needs to be ordered and processed via requesting for resources in increasing order of enumeration. Here each resource type is mapped with a unique integer, this allows resource to be compared and find out the precedence order of the resources.

This were the techniques involved in preventing deadlock. However in case of deadlock, different methods are used to handle deadlock. Deadlock prevention and avoidance scheme are used to ensure that deadlock never occurs.


Share. Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp Email

Related Posts

Scope of Business Finance

August 16, 2022

Trading Strategies

August 16, 2022

Ricardo Lockette Wiki, Bio, Net Worth, Girlfriend and Married

August 16, 2022

Ann Wilson Net Worth, Weight, Height, Boy friend, Weight Loss and Bio

August 16, 2022

No Bra Day Gossip Wiki

August 16, 2022

eToro Wiki and Review

August 16, 2022
Add A Comment

Leave A Reply Cancel Reply

Recent Updates

The Most popular International jobs in Canada

November 9, 2022

Top 10 jobs in Canada for foreigners who do not have experience

November 9, 2022

Employment Opportunities in Canada|Hiring 2000+ workers from Overseas by 2022 :

November 8, 2022

What exactly is Canada Express Entry? How can I Apply for Canada Express Entry?

November 8, 2022

Fruits Picking Jobs in Canada for Foreigners|1000+ Vacancies Available

November 8, 2022
  • Home
  • About us
  • Disclaimer
  • Privacy Policy
  • Terms of Use
  • Contact us
© 2023 WikiQuicky | All Rights Reserved

Type above and press Enter to search. Press Esc to cancel.