operating system - Deeadlock prevention :Mutual Exclusion -


deadlock prevention :

all four of conditions necessary deadlock occur, follows deadlock might prevented denying 1 of conditions.

condition

  1. mutual exclusion

  2. hold , wait

  3. no premption

  4. circular wait

now

let deny first 1

  1. mutual exclusion

there many examples prove mutual exclusion may lead deadlock here .

now let prevent mutual exclusion .but problem

the mutual exclusion condition must hold non-sharable resources. is, several processes cannot simultaneously share single resource. condition difficult eliminate because resources, such tap drive , printer, inherently non-shareable.check this.

question/doubt

we cannot elimainate mutual exclusion **why 1 of condition **??

we cannot elimainate mutual exclusion why 1 of condition ??

we cannot eliminate mutual exclusion in cases dealing non-shareable resources. so, emphasizes special cases when dealing resources tap drive , printer, inherently non-shareable, have @ eliminating 1 of other 3 options prevent deadlock.

now critical section not mean talking physical resources. can mean talking piece of code. , variables resources inherently shareable resources. in such cases we can eliminate mutual exclusion prevent deadlock. keep in mind thats done, because if had ensured mutual exclusion in initial design, there ensure correct implementation. make aware deadlock prevented preventing mutual exclusion, not mean practically prevalent.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -