Week 12 Flashcards

1
Q

Each process utilizes a resource as follows:

A
  • Request, Use, Release
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A deadlock can arise if four conditions hold simultaneously

A
  • Mutual Exclusion: Only one process at a time can use a resourcer
  • Hold and wait: A process holding at least one resource is waiting to acquire additional resources held by other proccesses
  • No preemption: a resource can be released only voluntarily by the process holding it, after that process has completed its task
  • Circular wait: there exists a set of processes that are all waiting on each other thus creating a circle
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is deadlock prevention

A
  • provides a set of methods to ensure that at least one of the necessary conditions can not hold
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Deadlock avoidance

A
  • requires that the operating system be given additional information in advance concerning which resources a process will request and use during its lifetime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a safe state?

A

If a system is in safe state = no deadlocks otherwise there is a possibility of deadlock

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

What is the Banker’s Algorithm

A
  • When a new process enters the system, it must declare the maximum number of instances of each resource type that it may need
  • The number can’t exceed the total number of resources in the system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the data structures for the Banker’s Algorithm

A
  • Available, Max, Allocation, Need
How well did you know this?
1
Not at all
2
3
4
5
Perfectly