Filters
Question type

Study Flashcards

Describe how a safe state ensures deadlock will be avoided.

Correct Answer

verifed

verified

A safe state ensures that there is a seq...

View Answer

Deadlock prevention using preempting allocated resources cannot be used for


A) mutexes.
B) CPU registers.
C) database transactions.
D) memory.

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

What does a claim edge signify in a resource-allocation graph?

Correct Answer

verifed

verified

A claim edge indicates that a process may request a resource at some time in the future. This edge resembles a request edge in direction, but is represented in the graph by a dashed line.

Recovery from a deadlock works best when a single process can be identified whose termination will break the circular wait.

A) True
B) False

Correct Answer

verifed

verified

The Linux Lockdep tool is


A) used to verify locking order in the kernel.
B) a modeler to develop resource allocation graphs
C) a driver that can be used to prevent mutual exclusion for nonsharable resources
D) an implementation of the banker's algorithm available for most operating systems

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

A

One necessary condition for deadlock is ______, which states that a resource can be released only voluntarily by the process holding the resource.


A) hold and wait
B) mutual exclusion
C) circular wait
D) no preemption

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

Describe two protocols to ensure that the hold-and-wait condition never occurs in a system.

Correct Answer

verifed

verified

One protocol requires each process to re...

View Answer

Ordering resources and requiring the resources to be acquired in order prevents the circular wait from occurring and therefore prevents deadlock from occurring.

A) True
B) False

Correct Answer

verifed

verified

Suppose that there are two resource types (R1 and R2) with five resources each available to four processes. At time 0, the following data is collected. The table indicates the process, the number of resources of each type currently allocated to the processes, and the current request of each resource type by each process. Process Allocation Request R1 R2 R1 R2 P0 2 0 3 2 P1 1 1 1 0 P2 0 1 1 1 P3 1 1 3 2 Which of the following sentences is correct?


A) All four processes are currently deadlocked.
B) The system is not deadlocked.
C) Processes P0 and P3 are deadlocked.
D) Processes P0, P1 and P3 are deadlocked.

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

A _____ could be preempted from a process.


A) mutex lock
B) CPU registers
C) semaphore
D) file lock

E) None of the above
F) All of the above

Correct Answer

verifed

verified

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.

A) True
B) False

Correct Answer

verifed

verified

In a resource allocation graph, when a process releases a resource,


A) a request edge is inserted.
B) an assignment edge is inserted.
C) a request edge is removed.
D) an assignment edge is removed.

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

What is the difference between deadlock prevention and deadlock avoidance?

Correct Answer

verifed

verified

Deadlock prevention is a set of methods ...

View Answer

Protocols to prevent hold-and-wait conditions typically also prevent starvation.

A) True
B) False

Correct Answer

verifed

verified

Deadlocks can be prevented only if


A) all four necessary conditions cannot hold.
B) at least one of the four necessary conditions cannot hold.
C) mutual exclusion condition cannot hold.
D) circular wait condition cannot hold.

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

Describe the four conditions that must hold simultaneously in a system if a deadlock is to occur.

Correct Answer

verifed

verified

For a set of processes to be deadlocked:...

View Answer

Describe a wait-for graph and how it detects deadlock.

Correct Answer

verifed

verified

If all resources have only a single inst...

View Answer

In a system that uses deadlock detection algorithm,


A) a deadlock is detected as soon as it occurs.
B) a deadlock is detected just before it occurs.
C) a deadlock is detected sometime after it has occurred but not necessarily immediately.
D) a deadlock is detected sometime before it occurs, but not necessarily just before.

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

What is one way to ensure that a circular-wait condition does not occur?

Correct Answer

verifed

verified

One way to ensure that this condition never holds is to impose a total ordering of all resource types, and to require that each process requests resources in an increasing order of enumeration. This can be accomplished by assigning each resource type a unique integer number to determine whether one precedes another in the ordering.

Explain what has to happen for a set of processes to achieve a deadlocked state.

Correct Answer

verifed

verified

For a set of processes to exist in a dea...

View Answer

Showing 1 - 20 of 40

Related Exams

Show Answer