Quiz 4 Flashcards

1
Q

What are the three resource types in the system model?

A

CPU cycles, memory space, I/O devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In which way does each process utilizes a resource?

A

Request
Use
Release

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the four conditions required to have a Deadlock?

A

Mutual exclusion
Hold and wait
No preemption
Circular wait

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Mutual Exclusion

A

Only one process at a time can use a resource

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Hold and Wait

A

A process holding at least one resource is waiting to acquire additional resources held by other processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

No Preemption

A

A resource can be released only voluntarily by the process holding it, after that process has completed its task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Circular Wait

A

Each waiting process is waiting for a resource held by another process, where each of said processes are reliant on the other to give up their resource

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a resource allocation graph?

A

A resource allocation graph is a graph that shows the relationship between requests and resources held between processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

If a graph contains no cycles this means what in reference to a deadlock?

A

No deadlock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

If a graph contains a cycle this means what in reference to a deadlock?

A

If only one instance per resource type then deadlock
else its only a possibility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the two methods for preventing a deadlock state?

A

Deadlock prevention and Deadlock avoidance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does Deadlock Prevention prevent deadlocks?

A

It invalidates on of the four necessary conditions for deadlocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does deadlock prevention invalidate mutual exclusion?

A

It makes it not required for sharable resources, this means non sharable resources can still result in a deadlock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does deadlock prevention invalidate Hold and Wait?

A

It must guarantee that whenever a process requests a resource it does not hold any other resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does deadlock prevention invalidate no Preemption?

A

If a process that is holding some resources requests another resource that cannot be immediately allocated to it then all resources currently being held are released

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does deadlock prevention invalidate circular wait?

A

Impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration

17
Q

What is the most common type of deadlock prevention?

A

Invalidating circular wait

18
Q

How does deadlock avoidance avoid deadlocks?

A

By requesting additional a priori information to be available

19
Q

What is the a priori info that is typically requested for deadlock avoidance?

A

Each process declares the maximum number of resources of each type that it may need

20
Q

What must the system be in for a process request to be verified when the system is using deadlock avoidance?

A

A safe state

21
Q

When you have a single instance of a resource type which algorithm should you use?

A

A resource allocation graph

22
Q

When you have multiple instances of a resource type which algorithm should you use?

A

The bankers algorithm

23
Q

When can a request be granted for a request edge to an assignment edge?

A

As long as it does not result in the formation of a cycle

24
Q

What are the attributes of the Banker’s Algorithm?

A

You have multiple instances of resources
Each process must a priori claim maximum use
When a process requests a resource it may have to wait
When a process gets all its resources it must return them in a finite amount of time

25
Q

What is the overview for Deadlock detection?

A

Allow the system to enter the deadlock state, use a detection algorithm and then use a recovery scheme

26
Q

How do deadlock detection systems recover from a deadlock?

A

Abort all deadlocked processes
Abort one process at a time until the deadlock cycle is eliminated