chapter 10 - Multiprocessor Scheduling (Advanced) Flashcards

1
Q

what is cache coherence problem

A

when CPU with private caches hold inconsistent values of the same memory due to delayed updated

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

How is cache coherence maintained?

A

Hardware protocols like bus snooping detect writes and update/invalidate caches

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

why are write back caches problematic for coherence

A

memory updates are delayed, making it harder for other CPU to stay updated

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

What can happen if threads access a shared queue without locking?

A
  • Duplicate values
  • Memory errors like double free
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how do you protect critical sections when cache coherence

A

use locks

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

What is the downside of locks in multiprocessors?

A

More CPUs → more contention for locks → performance bottleneck

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

What is cache affinity?

A

The benefit of keeping a process on the same CPU to reuse useful cached state

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

Why does moving a process to another CPU hurt performance?

A

Its new CPU must repopulate the cache from memory

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

What is Single-Queue Scheduling (SQMS)?

A

All CPUs share one global queue of runnable jobs

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

What are the downsides of SQMS?

A
  • Scalability issues due to locking
  • cache affinity leads to unnecessary migrations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Multi-Queue Scheduling (MQMS)?

A

Each CPU has its own scheduling queue

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

What are the benefits of MQMS?

A
  • Better scalability
  • Preserves cache affinity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the main issue with MQMS?

A

Load imbalance - some CPUs may be idle while others are overloaded

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

How is load imbalance fixed in MQMS?

A
  • Migration of jobs between CPUs
  • Work stealing- idle CPUs take work from busy ones
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the O(1) scheduler do?

A
  • Uses multiple queues
  • Priority-based with dynamic adjustments
  • Works well for interactive workloads
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is CFS (Completely Fair Scheduler)?

A

Uses multiple queues

Implements deterministic proportional-share algorithm (like stride scheduling)

Ensures fair CPU time based on weights

17
Q

BFS (Brain Fuck Scheduler)

A
  • Uses a single queue (like SQMS)
  • tries to be proportional-share, with a more complex algorithm:
  • Focuses on simplicity and responsiveness on desktop systems