ICP Flashcards

1
Q

What is a Critical Region?

A

Where processes access shared variables.

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

What are the four criteria for a critical region routine.

A
  1. Mutual exclusion (One at a time)
  2. Speed Independent
  3. Non-Critical Regions Immaterial
  4. Finite Waiting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the instructions that all process go through?

A
  1. Read
  2. Modify
  3. Write.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

describe spin lock

A

Spin lock is busy waiting on a lock polling.

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

What is Peterson’s Algorithm?

A

Combines turn taking and “Interested” flags.

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

What are the steps in Peterson’s Algorithm?

A
  1. Raises flag when interested in entering critical region.
  2. Gives turn to other process.
  3. Checks whether the other process is interested AND it is the other process’ turn, to wait or enter region.
  4. When exiting region, lower flag.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Test & Set lock (TSL)?

A

When the process instructions are atomic.

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

What is the meaning of atomic?

A

Cannot be divided.

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

What IPC mechanism keeps track of the number of available recourses in a count variable?

A

Semaphore

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

What is considered a binary semaphore, and can only have 0 or 1 as values?

A

Mutex

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

What are the condition variables for monitors?

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

What can be true about Readers and Writers?

A
  • Multiple readers can co-exist
  • Multiple writers cannot co-exist
  • Writers and readers cannot co-exist
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Reader Priority is when ….

A

Readers are not kept waiting until a writer gets permission. (Starves writers)

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

Writer Priority is when ….

A

Readers cannot access if writer is waiting (starves readers)

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

Describe no starvation solution (Mutex solution)

A

Writers lock the region
-if writer is writing, all incoming readers wait, all go in when writer is done.

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