NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Necessary conditions for deadlock to occur

1. Mutual Exclusion: at least one resource must be held in non shareable mode that is only one process can access the resource and no other process can interfere.

2.Hold and wait: a process must be holding atleast one resource and waiting for other resource to be held by resource.

3 Non preemptive: resources can not be preemptive until it completes its execution.

4. Ac ircular waiting: A set {p0 }
of waiting process is held in such a way that p0 is wating resouceheld by p1 and p1 waiting for pn and pn further for p0 , so it results in hold and wait.
if hold and wait condition exist in system then circular will definately exist



Resouce allocation graph:
It is a directed graph partitioned into two sets,
verices(V representing the processes p1 p2 ...pn) and edges(representing resources r1 r2....rn) there are two type of process
Pi>Rj
it implies pi is asking for rj resource
request from rj>pi
this means rj resource is alloted to process pi nad this edge is called assignment edge.


Numerical:

circle{p1 p2 p3} rectangle{r1=1,r2=2,r3=1,r4=}

edges given: p1>r1
p2>r3
R1>p2 ||| p1>r1 R1>p2
r2>p2
r2>p1
r3>p3

if add p3>r2 there is dewadlock


DEadlock avoidence :
this algo dynamicaly exmines rag and ensures circular weight conditions should never exist and hence make the system go into safe state. it works on the concwot of maximum number of available resources maximum need of process and depending upon maximum allocations that can be made.


Safe state:
its a sequence of process p1 p2..pn is said to be safe sequence for the current allocation if a process pi can request a resource currently available plus the resource us held by resource j such that process is held by report i.
total available resource 12
Numerical:
process: p0 p1 p2
max need: 10 4 9
current need:5 2 2


consider p0p1p2 check whether system is in safe state or not


BAnkers algo:
the algo for deadlock avoidence based on banking system in which banker will never allocate cash if coustomer requirements exceed the banking cash limit.
when a new process enters the system it should declare max resource need that should not exceed total no of resources on system when allocation is to be made:
A vector of length m that represents number of available resources if a available [i]=k implies k instatnces of resource i are available
max demand of process : max is n*m matrix which definesw max demand of each process max[i,j]=k
that is process pi can request at most instances at resource j
n*m matrix that defines number of resouces currenlty allocated to each to process
need: n*m matrix remaining resource need of each process.
formulae= need[i,j]=max[i,j]
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.