ch05 - Chapter 5 Process Management Understanding Operating...

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

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

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

View Full Document Right Arrow Icon
Understanding Operating Systems, Fourth Edition 2 Objectives Objectives You will be able to describe: Several causes of system deadlock The difference between preventing and avoiding deadlocks How to detect and recover from deadlocks The concept of process starvation and how to detect and recover from it
Background image of page 2
Understanding Operating Systems, Fourth Edition 3 Objectives (continued) Objectives (continued) You will be able to describe: The concept of a race, and how to prevent it The difference between deadlock, starvation, and race
Background image of page 3

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

View Full Document Right Arrow Icon
Understanding Operating Systems, Fourth Edition 4 Overview Overview A lack of process synchronization results into deadlock or starvation Deadlock: A system-wide tangle of resource requests that begins when two or more jobs are put on hold Each job waiting for a vital resource to become available The jobs come to a standstill Resolved via external intervention Starvation: Infinite postponement of a job
Background image of page 4
Understanding Operating Systems, Fourth Edition 5 Deadlock Deadlock Affects more than one job, hence more serious than starvation System (not just a few programs) is affected as resources are being tied up e.g., Traffic jam More prevalent in interactive systems Deadlocks quickly become critical situations in real- time systems No simple and immediate solution to a deadlock
Background image of page 5

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

View Full Document Right Arrow Icon
Understanding Operating Systems, Fourth Edition 6 Deadlock (continued) Deadlock (continued) Figure 5.1: A classic case of traffic deadlock
Background image of page 6
Understanding Operating Systems, Fourth Edition 7 Seven Cases of Deadlock Seven Cases of Deadlock Different cases of Deadlock: Deadlocks on file requests Deadlocks in databases Deadlocks in dedicated device Deadlocks in multiple device Deadlocks in spooling Deadlocks in disk sharing Deadlocks in a network
Background image of page 7

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

View Full Document Right Arrow Icon
Understanding Operating Systems, Fourth Edition 8 Case 1: Deadlocks on File Requests Case 1: Deadlocks on File Requests Occurs if jobs are allowed to request and hold files for the duration of their execution Example: Refer to Figure 5.2 (next slide) P1 has access to F1 but requires F2 also P2 has access to F2 but requires F1 also Deadlock remains until a program is withdrawn or forcibly removed and its file is released Any other programs that require F1 or F2 are put on hold as long as this situation continues
Background image of page 8
Understanding Operating Systems, Fourth Edition 9 Case 1: Deadlocks on File Requests Case 1: Deadlocks on File Requests (continued) (continued) Figure 5.2: A case of deadlock on file requests
Background image of page 9

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

View Full Document Right Arrow Icon
10 Case 2: Deadlocks in Databases Case 2: Deadlocks in Databases Occurs if two processes access and lock records in a database Example: Two processes (P1 and P2), each of which needs to update two records (R1 and R2) Following sequence leads to a deadlock: P1 accesses R1 and locks it
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 50

ch05 - Chapter 5 Process Management Understanding Operating...

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

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