Lecture 7 Flashcards

1
Q

Scheduling Algorithms

A
  • First Come, First Served
  • Shortest Job First
  • Priority
  • Round Robin
  • Multilevel Queues
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

First Come, First Served (FCFS)

A

Processes are executed in the order they arrive

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

Convey Effect

A

Short processes wait for one long process to get off CPU

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

Shortest Job First (SJF)

A

Processes with the shortest time (burst time + arrival time)

-Provably optimal

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

Burst Length Prediction

A
Use exponential average:
Tau_(n+1) = alpha*t_n + (1-alpha)Tau_n
- Tau is the predicted burst time
- t is the actual burst length
Raise (1-alpha) to higher powers to assign smaller weights to older values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Shortest Remaining Time First (SRTF)

A

Accounting for arrival time and burst time, execute the process with the shortest remaining time, sometimes interrupt processes if a shorter process arrives

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

Priority Scheduling

A
  • A priority integer is associated with each process
  • CPU is allocated to process with highest priority
  • If priority is inverse of CPU burst length, it’s SJF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Problem with priority scheduling

A
  • Starvation (low priority processes may never execute)

- Solution is dynamic priority change

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

Aging

A
  • Increasing the priority of a process as it waits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Round Robin Scheduling

A
  • Each process gets a small unit of CPU time (time quantum q) usually 10-100 msec
  • After q elapses, the process is preempted and added to the end of the ready queue
  • Ready queue is a circular queue
  • Typically higher average turnaround time than SJF but better response time
  • If q is large, it’s basically just FCFS
  • If q is small, then the overhead is really high
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Time Quantum Rule of Thumb

A

Time quantum should be longer than 80% of CPU bursts

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

Multilevel Queue Scheduling

A
  • Ready queue is partitioned into multiple queues
  • Each has its own scheduling algorithm
  • Scheduling is needed among queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Multilevel Feedback Queue Scheduling

A
  • A process can move between various queues
  • Dynamic priority change
  • Process using too much CPU can be moved lower
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

MQS needs to define…

A
  • Number of queues
  • Scheduling algorithm for each queue
  • Method to move process up/down in queues
  • Start queue for each process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Multiprocessors

A
  • Multiple CPUs

- Each CPU has many components (caches, data/instructions, decoders, execution units, etc)

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

Multicores

A
  • Multiple execution cores on one processor
  • Duplicate some parts of the processor
  • Each core has L1 cache, but all cores share L2 cache
17
Q

Multiple-Processor Scheduling

A
  • Divide load among multiple processors (more complex than single CPU scheduling)
  • Asymmetric vs Symmetric multiprocessors
18
Q

Asymmetric Multiprocessors

A

One master processor does the scheduling for others

19
Q

Symmetric Multiprocessors

A
  • Each processor runs its own scheduler

- One ready queue for all processors or separate ready queue for each professor