Lecture 7 Flashcards

1
Q

Does failed mutual exclusion cause deadlock?

A

No it causes bad data.

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

What was the flaw with attempt 1?

A

Each process is tied to the execution of the other, and failure will cause blockage

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

Basics of attempt 1

A

check turn var, proceed or busy waiting, then update turn

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

What is the flaw with attempt 2

A

If a process fails inside its critical section, or after setting its flag, the other process will be blocked

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

Basics of attempt 2

A

the process should have its own key to the critical section by adding a flag to check the other process

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

What is the flaw with attempt 3

A

A deadlock can be caused by both setting their flag at the same time, forever loop

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

Basics of attempt 3

A

Process will set its flag before checking other flag, flag,guarantees mutual exclusion.

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

What is the flaw with attempt 4?

A

Lock ups may occur for indefinite period of time “live Lock”

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

Basics of attempt 4

A

Each process checks the other first but is prepared to reset flag to defer to other process

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

5th attempt basics

A

process that finds other is in resource, will periodically check back to see if it can go. Process will pass back control when finished

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

What are the two types of semaphores?

A

Counting and integer,

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

What is a semaphore

A

A general sync tool

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

Wait (S)

A

Decrement S

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

Signal (S)

A

Increment S

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