Lecture 05 - - Understanding Operating Systems Sixth...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Understanding Operating Systems Sixth Edition Chapter 5 Process Management
Background image of page 1

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

View Full DocumentRight Arrow Icon
Understanding Operating Systems, Sixth Edition Learning Objectives After completing this chapter, you should be able to describe: Several causes of system deadlock and livelock The difference between preventing and avoiding deadlocks How to detect and recover from deadlocks 2
Background image of page 2
Understanding Operating Systems, Sixth Edition Learning Objectives (cont’d.) The concept of process starvation and how to detect and recover from it The concept of a race and how to prevent it The difference between deadlock, starvation, and race 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Understanding Operating Systems, Sixth Edition Deadlock In early OS, deadlock was known by the more descriptive phrase - “deadly embrace”. Happens when the system freezes. A system-wide tangle of resource requests that begins when two or more jobs are put on HOLD, each waiting for a vital resource to become available. The problem builds when the resources needed by those jobs are the resources held by other jobs that are also waiting to run but cannot because they’re waiting for other unavailable resources. The tangled jobs come to a standstill. 4
Background image of page 4
Understanding Operating Systems, Sixth Edition Deadlock (cont’d) The deadlock is complete if the remainder of the system comes to a standstill as well. When the situation can’t be resolved by the OS, intervention is required. Deadlock affects more than one job. Because resources are being tied up, the entire system, not just a few programs, is affected. Deadlocks became prevalent with the introduction of interactive systems, which generally improve the use of resources through dynamic resource sharing, but this capability also increases the possibility of deadlocks. 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Understanding Operating Systems, Sixth Edition Deadlock (cont'd.) 6
Background image of page 6
Understanding Operating Systems, Sixth Edition Deadlock (cont'd.) In some computer systems, deadlocks are regarded as a mere inconvenience that causes delays. But for real-time systems, deadlocks cause critical situations. Regardless of the environment, the OS must either prevent deadlocks or resolve them when they happen. 7
Background image of page 7

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

View Full DocumentRight Arrow Icon
Understanding Operating Systems, Sixth Edition Seven Cases of Deadlock A deadlock usually occurs when nonshareable, nonpreemptable resources, such as files, printers or scanners are allocated to jobs that eventually require other nonshareable nonpreemptive, resources that have been locked by other jobs. Deadlocks can also occur on shareable resources that are locked, such as disks and databases. 8
Background image of page 8
Understanding Operating Systems, Sixth Edition Case 1: Deadlocks on File Requests If jobs are allowed to request and hold files for the duration of their execution, a deadlock can occur. Example (Figure 5.2)
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/15/2011 for the course COMP 1210 taught by Professor M.izzo during the Spring '11 term at Community college of RI.

Page1 / 82

Lecture 05 - - Understanding Operating Systems Sixth...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online