{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS3224 - 6.Deadlocks

CS3224 - 6.Deadlocks - Deadlocks What are Deadlocks How do...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
4/19/10 1 Deadlocks What are Deadlocks? How do they occur? How do we deal with them? What is a Deadlock? Formal definition : A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause Usually the event is release of a currently held resource None of the processes can … – run release resources be awakened
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4/19/10 2 Resources Examples of computer resources – printers – tape drives – tables, lists… Processes need access to resources in reasonable order Suppose a process holds resource A and requests resource B – at same time another process holds B and requests A – both are blocked Resources Deadlocks can occur when – processes are granted exclusive access to resources • Preemptable resources – can be taken away from a process with no ill effects – therefore they don’t contribute to deadlock. • Nonpreemptable resources – will cause the process to fail if taken away
Image of page 2
4/19/10 3 Deadlock Modeling Resource Allocation Graph with a single instance of each resource. a) resource R assigned to process A b) process B is requesting/waiting for resource S c) process C and D are in deadlock over resources T and U How deadlock occurs A B C Deadlock Modeling
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4/19/10 4 Deadlock Modeling How deadlock can be avoided (o) (p) (q) Resource-Allocation Graph with multiple instances of a resource Process Resource Type with 4 instances P requests instance of R P is holding an instance of R P P R R
Image of page 4
4/19/10 5 Resource Allocation Graph Resource Allocation Graph
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4/19/10 6
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern