Ch. 6 PPT Flashcards
What is deadlock?
The permanent blocking of a set of processes that either compete for system resources or communicate with each other
How can you tell if something is deadlocked?
If each element of a set is waiting an event by another element that is also blocked
What is hold and wait?
A process may hold allocated resources while awaiting assignment of others
What is no pre-emption?
No resource can be forcibly removed from a process holding it
What is circular wait?
A closed chain of processes exists, such that each process holds at least one resource needed by the next process in the chain
What is deadlock prevention?
Attempting to design a system such that deadlock is excluded
How is deadlock prevention approached?
Indirect: Prevent the three necessary conditions. Direct: precent circular wait
What is no preemption?
If a process is denied a further request, it must release its currently held resources.
How can a deadlock be avoided?
By determining if a request can lead to a future deadlock. Requires knowing future requests
What is another way of preventing deadlock?
By imposing resource restrictions on processes
How does deadlock detection work?
It gives the process whatever it asks for
What is good about deadlock detection?
The algorithm is simple and it can lead to early detection
What is bad about deadlock detection?
It consumes more processor time
What is a deadlock recovery strategy?
Abort all deadlocked processes, or abort some until the deadlock is gone, or restore to a pre-deadlock time
What is the dining philosopher problem?
Encore mutual exclusion.. No two things can use the same resource at the same time
What is a pipe?
A unix construct that allows for two processes to communicate in the producer-consumer model
What is a message?
A unix construct with system calls and accompanying types for a message and mailboxes
What is shared memory?
A block of virtual memory shared by processes. The fastest form of communication. Needs outside enforcement of mutual exclusion
What is a signal?
A software element that informs a process of asynchronous events occurring. Similar to hardware interrupt
How does a process respond to a signal?
Preforming a default action, executing a signal handler function, or ignoring the signal
What is a bitmap operation?
An atomic operation that operates on an arbitrary memory location
What is an integer operation?
An atomic operation that operates on an integer, typically in a counter
What is a spin lock?
A method of protecting a critical section in linux. It can only be acquired by one thread at a time
How does linux handle semaphores?
They are implemented in the kernel and are more powerful than user-level semaphores