09-Chap06-Deadlocks-2slots

09-Chap06-Deadlocks-2slots - OS 9 Deadlocks(2 lots Chapter...

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

OS 9 Deadlocks (2 lots) Chapter 6 Resources Introduction To Deadlocks The Ostrich Algorithm Deadlock Dectection & Recovery Deadlock Avoidance Deadlock Prevention Other Issues
Image of page 1

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

OS Objectives Resources Preemptable ( u tiên) and Nonpreemptable Resources ư Resource Acquisition – Giành tài nguyên Introduction To Deadlocks Conditions for Resource Deadlocks Deadlock Modeling The Ostrich Algorithm (đà đi u có thói quen t m cát) Deadlock Detection & Recovery Deadlock Detection with One Resource of Each Type Deadlock Detection with Multiple Resources of Each Type Recovery from Deadlock 2 Deadlocks (61 slides)
Image of page 2
OS Objectives … Deadlock avoidance Resource Trajectories – Đ ng đi c a tài nguyên ườ Safe and Unsafe States The Banker’s Algorithms for a Single Resource The Banker’s Algorithms for a Multiple Resource Deadlock Prevention Attacking the Mutual Exclusion Condition – Kh lo i tr h t ng ươ Attacking the Hole and Wait Condition Attacking the No Preemption Condition Attacking the Circular Wait Condition Other Issues Two-Phase Locking Communication Deadlocks Live Lock Starvation 3 Deadlocks (61 slides)
Image of page 3

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

OS Overviews A resource can only be used by one process at a time. All OS have the ability to (temporarily) grant a process exclusive access to certain resources. A process needs exclusive access some resources. A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set, thus they will remain so forever ( deadlocks ). Deadlock does not occur only on local machine but also across machines. Deadlocks can occur in a variety of different situations such as requesting dedicated I/O devices, on hardware or software resources. 4 Deadlocks (61 slides)
Image of page 4
OS Resources Refer the objects as hardware devices, data records, files, etc .. that must be granted, acquired, used and released. A computer will normally have many different resources Some resource is the identical instances may be available Some resource is copied of a resource available There are two type resources Preemptable ( u tiên)/ nonpreemptable resource ư 5 Deadlocks (61 slides)
Image of page 5

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

OS Resources: Preemptable Resource that can be taken away from the process owning it with no ill effects (either on system or others). Preemptable resources can be resolved deadlocks by reallocating resources from one process to another. Ex : A system with 256 MB of user memory, one printer, and two 256- MB processes that each wants to print some thing. Process A requests and gets the printer, then starts to compute the values to print. Before it has finished with the computation, it exceeds its time quantum and is swapped out (Process A has the printer, but it locates on disk) Process B now runs and tries, unsuccessfully to acquire the printer (Process B locates on memory, but it cannot access the printer)
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '16
  • abc
  • OS

{[ 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