Test #3 Flashcards
(48 cards)
Deadlock
Condition where a set of 2 or more procs are blocked and waiting for something from another proc in that set to do
4 Necessary Conditions for Deadlock
- mutex
- hold and wait
- no preemption (cant take away resource I have)
- circular wait
4 Ways to deal with deadlock
- Ignore it
- detect and recover
- prevent
- avoid
To prevent deadlock, which condition should you prevent
- circular wait
How does detect and recover work
- delete one process and reallocate resources
- rollback
- tough decision will have to be made
How does Prevent work
Remove one of the four conditions that cause deadlock
1) Mutex BAD - lost update
2) hold and wait INEFFICIENT - get all resources before you start
3) no preemption BAD
4) Circular wait BEST - put priority on resources and allocate accordingly
Know the Bankers algorithm safety algorithm
R -> P
resource allocated to process
P -> R
Process requesting resource
when you find a cycle in a resource allocation graph
deadlock
easiest way to recover from deadlock
kill all processes
Know the resource allocation graphs
Know the seven state process state diagram
Start, ready, ready suspended, run, blocked, blocked suspended, exit
Variable sized blocks/partitions
RAM partitions have varying size
Fixed sized blocks/partitions
RAM partitions are equally sized
Internal Fragmentation
small slivers of unusable RAM between processes in fixed sized partitions
External Fragmentation
small slivers of unusable RAM between processes in variable sized partitions
Job placement first fit
first slot
Job placement worst fit
free space that is largest
Job placement next fit
first fit AFTER previous job
Job placement best fit
Non-swapping
RAM only, logarithmic dmp graph
swapping
swapping between RAM and disk, bell curve dmp graph
Know how paging memory management works