CSE 131 Lecture Notes - Lecture 11: Resource Allocation, Mutual Exclusion, General Idea
Document Summary
Examples of computer resources: printers, semaphores/locks, memory, tables. Processes need access to resources in reasonable order. Preemptable resources: can be taken away from a process with no ill effects. Non preemptable resources: will cause the process to fail if taken away. Printer because if you take a printer away while printing, it will fail. Sequence of events required to use a resource. Can"t use the resource if request is denied. Continue (if possible) without it: may be able to use an alternate resource. Some of these may be able to prevent deadlock. Process 1 holds resource a and requests resource b. Process 2 holds resource b and requests resource a. Both can be blocked with neither able to proceed. Processes are granted exclusive access to devices or software constructs (resources) Each deadlocked process needs a resource held by another deadlocked process.