5 - Process Comms and Deadlock Flashcards

1
Q

What is the Critical Section Problem?

A

processes all competing for the same shared data

Ensure that when one process is executing in its critical section, no other process is allowed to execute in its critical section

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

Necessary elements of a critical section solution

A

Mutual Exclusion
-at most one process can be in its critical section at any time

Progress
- all processes should eventually be permitted to do so

Fairness
- Scheduling needs to be fair (bounded waiting)

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

What is the producer consumer problem?

A

A producer process produces info that is consumed by a consumer process

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

Circular Array

A

buffer can be org as a circular array with in/out pointers:

  • in: next free position in buffer
  • out: first full pos in buffer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a “race condition”?

A

A situation where the order of execution affects data

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

Semaphore

A

An integer variable only modified by p and v operations

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

p operation

A

test a lock
enter if free
secure lock

or wait for lock to be free

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

v operation

A

free the lock

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

Deadlock

A
  • When two processes wait for a resource held by another but that it cannot give up due to it waiting for another resource
How well did you know this?
1
Not at all
2
3
4
5
Perfectly