kind of resource Memory Explicit deadlock handling is unnecessary IO devices

Kind of resource memory explicit deadlock handling is

This preview shows page 38 - 41 out of 41 pages.

kind of resource – Memory: Explicit deadlock handling is unnecessary I/O devices: Resources are not limited (virtual devices) – Files: Deadlocks are handled by processes, not OS Control blocks: Resource ranking or all-resources-together
Image of page 38
Deadlock Handling in Unix Most operating systems simply ignore the possibility of deadlocks involving user processes Unix is no exception Unix addresses deadlocks due to sharing of kernel data structures by user processes Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 8.39 Operating Systems, by Dhananjay Dhamdhere 39 Kernel uses resource ranking (deadlock prevention) by requiring processes to set locks on kernel data structures in a standard order There are exceptions to this rule; deadlocks can arise Special deadlock handling for buffer cache and file system
Image of page 39
Deadlock Handling in Windows Vista has feature called wait chain traversal (WCT) Assists applications and debuggers in detecting deadlocks A wait chain starts on a thread and is analogous to a path in the RRAG Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 8.40 Operating Systems, by Dhananjay Dhamdhere 40 Debugger can investigate cause of a freeze by invoking getthreadwaitchain with the id of a thread to retrieve a chain starting on that thread
Image of page 40
Summary Deadlock: set of processes wait indefinitely for events because each of the events can be caused only by other processes in the set Resource deadlock arises when: Resources are nonshareable and nonpreemptible Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 8.41 Operating Systems, by Dhananjay Dhamdhere 41 Hold-and-wait Circular wait exists OS can discover a deadlock by analyzing the allocation state of a system Use RRAG, WFG or matrix model Deadlocks can be detected, prevented and avoided
Image of page 41

You've reached the end of your free preview.

Want to read all 41 pages?

  • One '20
  • Dhananjay Dhamdhere

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

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors