Deck 6: Concurrency: Deadlock and Starvation
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/45
Play
Full screen (f)
Deck 6: Concurrency: Deadlock and Starvation
1
An indirect method of deadlock prevention is to prevent the occurrence of a circular wait.
False
2
All deadlocks involve conflicting needs for resources by two or more processes.
True
3
With _________ only one process may use a resource at a time and no process may access a resource unit that has been allocated to another process.
A) hold and wait
B) mutual exclusion
C) no preemption
D) circular wait
A) hold and wait
B) mutual exclusion
C) no preemption
D) circular wait
B
4
A signal is similar to a hardware interrupt but does not employ priorities.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
5
A closed chain of processes exists, such that each process holds at least one resource needed by the next process in the chain is the condition of __________ .
A) no preemption
B) mutual exclusion
C) circular wait
D) hold and wait
A) no preemption
B) mutual exclusion
C) circular wait
D) hold and wait
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
6
Deadlock is permanent because none of the events is ever triggered.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
7
An unsafe state is one in which there is at least one sequence of resource allocations to processes that does not result in a deadlock.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
8
Once the processes have progressed into the __________ , those processes will deadlock.
A) fatal region
B) regional resources
C) spinlock
D) hold and wait
A) fatal region
B) regional resources
C) spinlock
D) hold and wait
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
9
Deadlock avoidance is more restrictive than deadlock prevention.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
10
A set of processes is _________ when each process in the set is blocked awaiting an event that can only be triggered by another blocked process in the set.
A) spinlocked
B) stagnant
C) preempted
D) deadlocked
A) spinlocked
B) stagnant
C) preempted
D) deadlocked
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
11
An atomic operation executes without interruption and without interference.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
12
Deadlock avoidance requires knowledge of future process resource requests.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
13
Examples of __________ include processors, I/O channels, main and secondary memory, devices, and data structures such as files, databases, and semaphores.
A) regional resources
B) joint resources
C) reusable resources
D) consumable resources
A) regional resources
B) joint resources
C) reusable resources
D) consumable resources
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
14
A useful tool in characterizing the allocation of resources to processes is the resource allocation graph.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
15
If access to a resource requires mutual exclusion then mutual exclusion must be supported by the OS
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
16
The dining philosophers' problem can be representative of problems dealing with the coordination of shared resources which may occur when an application includes concurrent threads of execution.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
17
Interrupts, signals, messages, and information in I/O buffers are all examples of reusable resources.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
18
For deadlock to occur, there must not only be a fatal region, but also a sequence of resource requests that has led into the fatal region.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
19
The OS may preempt the second process and require it to release its resources if a process requests a resource that is currently held by another process.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
20
A mutex is used to ensure that only one thread at a time can access the resource protected by the mutex.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
21
The strategy of resource allocation denial is referred to as the ___________ .
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
22
The __________ condition can be prevented by defining a linear ordering of resource types.
A) hold and wait
B) no preemption
C) mutual exclusion
D) circular wait
A) hold and wait
B) no preemption
C) mutual exclusion
D) circular wait
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
23
The _________ condition can be prevented by requiring that a process request all of its required resources at one time and blocking the process until all requests can be granted simultaneously.
A) mutual exclusion
B) hold and wait
C) circular wait
D) no preemption
A) mutual exclusion
B) hold and wait
C) circular wait
D) no preemption
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
24
_________ strategies are very conservative and solve the problem of deadlock by limiting access to resources and by imposing restrictions on processes.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
25
The most common technique used for protecting a critical section in Linux is the __________ .
A) signal
B) atomic bitmap operation
C) atomic integer operation
D) spinlock
A) signal
B) atomic bitmap operation
C) atomic integer operation
D) spinlock
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
26
A __________ is a software mechanism that informs a process of the occurrence of asynchronous events.
A) signal
B) message
C) mailbox
D) kernel
A) signal
B) message
C) mailbox
D) kernel
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
27
The fastest form of interprocess communication provided in UNIX is __________ .
A) shared memory
B) message
C) pipe
D) semaphore
A) shared memory
B) message
C) pipe
D) semaphore
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
28
The _________ is useful in sending a signal to a thread indicating that a particular event has occurred.
A) mutex object
B) semaphore object
C) event object
D) waitable timer object
A) mutex object
B) semaphore object
C) event object
D) waitable timer object
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
29
Three conditions of policy must be present for a deadlock to be possible: mutual exclusion, no preemption, and _________ .
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
30
One of the most significant contributions of UNIX to the development of operating systems is the _________ .
A) semaphore
B) shared memory
C) message
D) pipe
A) semaphore
B) shared memory
C) message
D) pipe
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
31
Three general approaches exist for dealing with deadlock: prevent, avoid, and __________ .
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
32
The _________ of the system reflects the current allocation of resources to processes.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
33
_________ can be defined as the permanent blocking of a set of processes that either compete for system resources or communicate with each other.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
34
The strategy of deadlock _________ is to design a system in such a way that the possibility of deadlock is excluded.
A) prevention
B) detection
C) diversion
D) avoidance
A) prevention
B) detection
C) diversion
D) avoidance
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
35
A _________ resource is one that can be created and destroyed.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
36
The _________ allows multiple threads to have simultaneous read-only access to an object protected by the lock.
A) barrier
B) condition variable
C) readers/writer lock
D) mutex
A) barrier
B) condition variable
C) readers/writer lock
D) mutex
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
37
A _________ resource is one that can be safely used by only one process at a time and is not depleted by that use.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
38
Requested resources are granted to processes whenever possible with _________ .
A) preemption
B) deadlock detection
C) mutual exclusion
D) deadlock avoidance
A) preemption
B) deadlock detection
C) mutual exclusion
D) deadlock avoidance
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
39
__________ allows the three necessary conditions but makes judicious choices to assure that the deadlock point is never reached.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
40
The _________ is a directed graph that depicts a state of the system of resources and processes, with each process and each resource represented by a node.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
41
Inspired by the concept of co-routines, a _________ is a circular buffer allowing two processes to communicate on the producer-consumer model.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
42
A program invocation, including the address space and resources required to run the program is a __________ object.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
43
Two types of atomic operations are defined in Linux: integer operations and __________ .
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
44
Linux provides three types of semaphore facilities in the kernel: binary semaphores, counting semaphores, and __________ .
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
45
An executable entity within a process is a __________ object.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck