Ch. 6 PPT Flashcards

1
Q

What is deadlock?

A

The permanent blocking of a set of processes that either compete for system resources or communicate with each other

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

How can you tell if something is deadlocked?

A

If each element of a set is waiting an event by another element that is also blocked

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

What is hold and wait?

A

A process may hold allocated resources while awaiting assignment of others

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

What is no pre-emption?

A

No resource can be forcibly removed from a process holding it

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

What is circular wait?

A

A closed chain of processes exists, such that each process holds at least one resource needed by the next process in the chain

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

What is deadlock prevention?

A

Attempting to design a system such that deadlock is excluded

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

How is deadlock prevention approached?

A

Indirect: Prevent the three necessary conditions. Direct: precent circular wait

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

What is no preemption?

A

If a process is denied a further request, it must release its currently held resources.

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

How can a deadlock be avoided?

A

By determining if a request can lead to a future deadlock. Requires knowing future requests

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

What is another way of preventing deadlock?

A

By imposing resource restrictions on processes

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

How does deadlock detection work?

A

It gives the process whatever it asks for

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

What is good about deadlock detection?

A

The algorithm is simple and it can lead to early detection

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

What is bad about deadlock detection?

A

It consumes more processor time

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

What is a deadlock recovery strategy?

A

Abort all deadlocked processes, or abort some until the deadlock is gone, or restore to a pre-deadlock time

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

What is the dining philosopher problem?

A

Encore mutual exclusion.. No two things can use the same resource at the same time

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

What is a pipe?

A

A unix construct that allows for two processes to communicate in the producer-consumer model

17
Q

What is a message?

A

A unix construct with system calls and accompanying types for a message and mailboxes

18
Q

What is shared memory?

A

A block of virtual memory shared by processes. The fastest form of communication. Needs outside enforcement of mutual exclusion

19
Q

What is a signal?

A

A software element that informs a process of asynchronous events occurring. Similar to hardware interrupt

20
Q

How does a process respond to a signal?

A

Preforming a default action, executing a signal handler function, or ignoring the signal

21
Q

What is a bitmap operation?

A

An atomic operation that operates on an arbitrary memory location

22
Q

What is an integer operation?

A

An atomic operation that operates on an integer, typically in a counter

23
Q

What is a spin lock?

A

A method of protecting a critical section in linux. It can only be acquired by one thread at a time

24
Q

How does linux handle semaphores?

A

They are implemented in the kernel and are more powerful than user-level semaphores

25
Q

What is a mutual exclusion lock? (MUTEX)

A

Only one thread at a time can access a protected resource. Implemented as a spin lock

26
Q

What is a condition variable?

A

Used to wait until a particular condition is true. must be used with a mutex