Chapter 8 ( Deadlock ) Terms

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Unsafe State ( in deadlock avoidance )

When implementing deadlock avoidance on a resource allocation graph, an unsafe state, means that, even if you are not currently deadlocked, processes could create a deadlock if they start asking for more resources. Whether or not we get a deadlock is up to the OS.

Safe State ( in deadlock avoidance )

When implementing deadlock avoidance on a resource allocation graph, safe state, is a state that can't cause deadlock, no matter what processes do.

Hold and Wait ( as a necessary condition for deadlock )

When processes can have some resources and ask for more.

Request ( on a resource )

When processes work with resources, first they ask for a resource instance from the OS who will then assign them one.

Mutual Exclusion ( as a necessary condition for a deadlock )

When some resources can only be used by one process at a time.

No Preemption ( as a necessary condition for deadlock )

When the OS gets a resource back only when a process is done using it.

Necessary Conditions ( for deadlock )

1. Mutual Exclusion 2. Hold and Wait 3. No Preemption 4. Circular wait

Release ( on a resource )

Finally, a process can relinquish a resource and give it back to the OS.

Victim Selection ( in deadlock recovery )

Which resources and which processes are to be preempted? As in process termination, we must determine the order of preemption to minimize cost: - young process - process with a lot of resources - process on multiple cycles

Claim Edge

Pi → Rj indicates that process Pi may request resource Rj at some time in the future. It is notated with a dashed line.

Recovery ( from deadlock )

Process for resolving a deadlock. Involves killing a process. It should be a process that is on a cycle that the deadlock detection algorithm can't finish.

Request Edge

A directed edge from a process to a resource. It is when a process asks for a resource but, isn't currently using a resource.

Assignment Edge

A directed edge from the resource to the process. This is for when a process is currently using a resource.

Resource Allocation Graph

A notation for showing the instantaneous state of a system's resources. We have resource types: R1, R2, ... Rm. Each resource may have multiple instances. Resources are notated as a box, with dots inside for instances. We have processes: P1, P2, ... Pn. They are noted as little circles. Process work with resources by either requesting, using, or releasing a resource type.

Livelock

A situation in which two or more processes continuously change their states in response to changes in the other process(es) without doing any useful work. These processes are not in the waiting state, and they are running concurrently. This is different from a deadlock because in a deadlock all processes are in the waiting state.

Wait-For Graph

A variation on a resource allocation graph where each resource has only one instance. Resources have been removed and the edges collapsed to directly show which process another is waiting on.

Use ( on a resource )

After the process requests a resource, the process can operate on the resource.

Banker's Algorithm

Banker's algorithm is an algorithm for implementing deadlock avoidance. Before the OS grants a request, it must check to see if the resulting graph is in a safe state. If so, it grants the request. If not, it makes the process wait.

Deadlock

It is when there is a set, S, of blocked processes - each holding resources, each waiting to acquire a resource, and desired resources all held by other processes in S. In other words, a standstill b/w processes.

Deadlock Detection

It is when you let deadlocks happen, notice when they occur, and then respond to them somehow.

Circular Wait ( as a necessary condition for deadlock )

It's possible to build a cycle of processes, P1, P2, ... Pn such that: - P1 is waiting for a resource held by P2 - Pn-1 is waiting for a resource held by Pn - Pn is waiting for a resource held by P1

Deadlock Avoidance

Requires that the operating system be given additional information in advance concerning which resources a process will request and use during its lifetime. The idea is to stay on the safe path by never granting a request that could lead to a deadlock in the future. When a process is admitted, it has to report how many of each resource type it may need. For each request, decide whether the process should wait. The OS must consider resources currently available, allocated and the possibility of future requests.

Deadlock Prevention

Resolving deadlocks by having a system where deadlocks can't occur. Recall that there are four necessary conditions for deadlock and to have deadlock all of these must occur. To prohibit one of them is deadlock prevention.

Rollback ( in deadlock recovery )

Some transaction will have to be rolled back ( made victim ) to break deadlock. This can be done through total rollback - aborting the transaction and then restarting it, or partial rollback - more effective rollback transaction only as far as necessary to break deadlock. In other words, it is to return to some safe state and restart process for that state.


Kaugnay na mga set ng pag-aaral

What date is today 今天是几月几日?

View Set

HAZWOPER 40 - Lesson 19: Fire Protection

View Set

Wordly Wise Book 7 Lesson 8 Review Exercise

View Set