1/27
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
T/F: Deadlock requires mutual exclusion, hold and wait, no preemption, and circular wait conditions to occur.
True
T/F: Preemptible resources, such as RAM, can be released mid-use without causing contention.
True
T/F: A Holt Graph is ineffective for modeling and detecting deadlocks in small resource allocation scenarios.
False
T/F: Depth-First Traversal is the most efficient method to detect cycles in a graph for deadlock detection.
False
T/F: The "Ostrich" method to deadlock management involves intentionally ignoring potential deadlocks because addressing them may not be worth the effort
True
T/F: The Banker's Algorithm is used for deadlock detection in operating systems.
False
T/F: A system state is considered safe if there exists a sequence of processes that allows all processes to complete without entering a deadlock.
True
T/F: In the Banker's Algorithm, it is assumed that resources can fail during allocation.
False
T/F: Deadlock prevention involves strategies such as spooling to avoid mutual exclusion for certain types of resources.
True
T/F: In two-phase locking, locks are acquired and released simultaneously to avoid hold-and-wait conditions
False
T/F: A livelock occurs when processes are stuck in a state where they appear active but fail to make progress.
True
T/F: In a starvation scenario, no processes make progress due to an absence of a scheduling policy.
False
T/F: Deadlock can occur when processes are waiting on events that never happen due to mutual dependencies.
True
T/F: Starvation differs from livelock because some processes make progress in a starvation scenario.
True
T/F: Starvation can occur in systems with bad timing and unfair precedence policies.
True
What are the necessary conditions for a deadlock to occur?
Mutual exclusion - Only one process can use a resource at a time.
Hold and wait - A process holds one resource and waits for another.
No preemption - Resources cannot be forcibly taken from a process.
Circular wait - Processes form a cycle where each process is waiting for a resource held by the next.
What is the "ostrich approach" to deadlock handling?
The "ostrich approach" involves ignoring deadlock issues, assuming they won't occur often enough to justify the cost of addressing them. In case of a deadlock, the system is rebooted to resolve the issue.
How can Holt graphs be used to detect deadlocks?
Holt graphs model processes and resources where arrows represent resource requests and allocations. A cycle in the graph indicates a deadlock, as processes are waiting for resources that are held by other processes in the cycle.
Resource Contention
Conflict over a shared resource between several components
What role do matrices play in detecting deadlocks?
Matrices such as "existing," "current," "available," and "requests" are used to represent the state of resources and processes. By analyzing these matrices, such as by calculating the available resources or comparing requests with available resources, deadlocks can be detected.
What is dynamic avoidance in deadlock management?
Dynamic avoidance involves categorizing states as safe or unsafe. In a safe state, resources can be allocated without causing deadlocks, while in an unsafe state, future allocations may lead to deadlock.
What is the Banker's Algorithm used for in deadlock avoidance?
The Banker's Algorithm ensures resources can be allocated safely by simulating the maximum allocation of resources and determining if a system can proceed without causing deadlocks.
How does the Banker's Algorithm determine if a process can proceed?
The algorithm checks if the available resources, added to the resources held by a process, are sufficient for that process to meet its maximum demand. If the result is non-negative, the process can proceed.
What is deadlock prevention?
Deadlock prevention involves designing systems that avoid at least one of the four necessary conditions for deadlock: mutual exclusion, hold and wait, no preemption, and circular wait.
How does spooling help prevent deadlocks?
Spooling eliminates mutual exclusion by storing tasks in a non-exclusive intermediate store (e.g., printer queue), allowing processes to continue without waiting for resource availability, thus preventing deadlocks.
What is two-phase locking in deadlock prevention?
Two-phase locking requires processes to acquire all necessary locks during the "growth" phase and release them during the "shrinking" phase. This prevents non-preemption and ensures resources are released if the process cannot proceed with all its locks.
What is livelock in the context of deadlocks?
A livelock occurs when processes repeatedly fail to acquire locks due to interference from overlapping shared locks, preventing them from completing tasks. Though the processes are alive, they do not make progress, constantly changing states without doing meaningful work.
How does starvation differ from deadlock and livelock?
Starvation occurs when a process never makes progress due to others constantly advancing, typically due to priority or scheduling policies. Unlike deadlock, where processes are stuck, and livelock, where they keep changing states, starvation means the process is perpetually blocked from execution.