- Classification of resources-I, Two general categories of resources can be distinguished:
- Reusable: something that can be safely used by one process at a time and is not depleted by that use.
- Processes obtain resources that they later release for reuse by others.
- Examples are processors, I/O channels, main and secondary memory, files, specific I/O devices, databases, and semaphores.
- In case of two processes and two resources, deadlock occurs if each process holds one resource and requests the
other.
- Consumable: these can be created and destroyed.
- When a resource is acquired by a process, the resource ceases
to exist.
- Examples are interrupts, signals, messages, and information in I/O buffers
- Deadlock may occur if a Receive message is blocking
- May take a rare combination of events to cause deadlock
- Classification of resources-II, One other taxonomy again identifies two types of resources:
- Preemptable: these can be taken away from the process owning it with no ill effects (needs save/restore). E.g., memory or CPU.
- Non-preemptable: cannot be taken away from its current owner without causing the computation to fail. E.g., printer or floppy disk.
- Deadlocks occur when sharing reusable and non-preemptable resources
2004-05-25