Operating system ch 7/8
An advantage of using transactional memory is that
All of the above
In functional programming languages,
All of the above.
Which of the following data structures in the banker's algorithm is a vector of length m, where m is the number of resource types?
Available
A critical section object in the user mode needs kernel intervention to ensure mutual exclusion
False
A system in an unsafe state will ultimately deadlock.
False
Deadlock prevention and deadlock avoidance are essentially the same approaches for handling deadlock.
False
If the sum of all needs for a resource type exceeds the available number of instances of that resource type, the system state is unsafe.
False
Recovery from a deadlock works best when a single process can be identified whose termination will break the circular wait.
False
Allowing at most four philosophers to sit simultaneously prevents deadlock.
True
Dining philosophers problem is important because it represents a class of problems where multiple processes need to share multiple resources.
True
The banker's algorithm is useful in a system with multiple instances of each resource type.
True
The circular-wait condition for a deadlock implies the hold-and-wait condition.
True
The solution for bounded buffer problem provided in Section 7.1.1 does not work correctly if there are more than one producer or consumer.
True
To lock the kernel on a single processor machine in Linux, kernel preemption is disabled.
True
Transactional memory may particularly be useful for multicore systems
True
In a system that uses deadlock detection algorithm
a deadlock is detected sometime after it has occurred but not necessarily immediately.
In a system resource-allocation graph, ____.
a directed edge from a process to a resource is called a request edge
A claim edge in a resource-allocation graph indicates that
a process may request a resource
In the monitor solution for dining-philosophers problem (Figure 7.7), a philosopher may start eating
after exiting the pickup( ) function and before entering the putdown( ) function.
In the solution for bounded buffer problem using JAVA monitors (Figure 7.9), functions insert( ) and remove( ) are synchronized to ensure that
at most one thread may enter or remove an item at any time.
One necessary condition for deadlock is ______, which states that there is a chain of waiting processes whereby P0 is waiting for a resource held by P1, P1 is waiting for a resource held by P2, and Pn is waiting for a resource held by P0.
circular wait
In a single processor system running Windows, when the kernel accesses a global resource, it
masks all interrupts.
A(n) ___________ is a sequence of read-write operations that are atomic
memory transaction
One necessary condition for deadlock is ____, which states that at least one resource must be held in a nonsharable mode.
mutual exclusion
One necessary condition for deadlock is ______, which states that a resource can be released only voluntarily by the process holding the resource.
no preemption
Which of the following is not a factor in choosing which process to terminate during recovery from a deadlock?
who the parent of the process is
Emergence of multicore systems has put greater emphasis on developing novel techniques for concurrency problems, because
with increased number of processing cores, there is an increased risk of race conditions and deadlocks.