COS 318: Operating Systems Deadlocks
COS 318: Operating Systems Deadlocks
Today's Topics
Conditions for a deadlock Strategies to deal with deadlocks Announcement
Last year's midterm and solution is on the course web page
2
Definitions
Use processes and threads interchangeably Resources
Preemptable: CPU (can be taken away) Non-preemptable: Disk, files, mutex, ... (can't be taken away)
Use a resource
Request, Use, Release
Starvation
Processes wait indefinitely
Deadlocks
A set of processes have a deadlock if each process is waiting for an event that only another process in the set can cause
3
Resource Allocation Graph
Process A is holding resource R
A
R
Process B requests resource S
A cycle in resource allocation graph deadlock
If A requests for S while holding R, and B requests for R while holding S, then
A
S
B
S
R
B
How do you deal with multiple instances of a resource?
4
An Example
A utility program
Copy a file from tape to disk
Print the file to printer
Resources
A
Tape
Disk Printer
Tape
A deadlock
A holds tape and disk, then
requests for a printer
B
B holds printer, then requests for tape and disk
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- cos 2 x vs cos x 2
- computer operating systems ppt
- operating systems william stallings pdf
- free operating systems for computers
- cos x cos y identity
- evolution of operating systems pdf
- free operating systems 32 bit
- new 318 dodge crate engine
- dodge 318 crate engine complete
- 2 cfr 200 318 through 200 326
- cos 2x cos 2x
- operating systems downloads