• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/11

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

11 Cards in this Set

  • Front
  • Back
conditions for deadlock
1. mutual exclusion
2. hold-and-wait
3. no preemption
4. circular wait
what is mutual exclusion?
only one process may use a resource at a time
what is hold-and-wait?
process holds resource while waiting for another
what is preemption / what is no preemption?
no preemption: can't take a resource away from a process
what is circular wait?
waiting processes form a cycle
ways to attack deadlock problem?
- deadlock prevention
- deadlock avoidance
- deadlock detection
what is deadlock prevention?
make deadlock impossible by removing a condition
what is deadlock avoidance?
avoid getting into situations that lead to deadlock
what is deadlock detection?
- don't try to stop deadlocks
- instead, if they happen, detect and resolve
how do you prevent deadlock?
simply prevent any single condition for deadlock
1. mutual exclusion - make all resources sharable
2. hold-and-wait - get all resources simultaneously (wait until all free) AND only request resources when it has none
3. no preemption - allow resources to be taken away (at any time)
4. circular wait - order all resources, force ordered acquisition
how do you avoid deadlock?
- avoid situations that lead to deadlock. selective prevention: remove condition only when deadlock a possibility
- works with incremental resource requests: resources are asked for in increments, do not grant request that can lead to a deadlock
- requires knowledge of maximum resource requirements