15. Length-Aware Job Scheduling Flashcards
1
Q
Shortest Job Next (SJN)
A
- Invocation: at the completion of a job (non-preemptive)
- Policy: select the job with the shortest length
- The optimal non-preemptive strategy to minimize average response time
2
Q
Flaw of SJN
A
- If the system receives a steady arrival of short jobs, a long job may not execute and suffer from starvation
3
Q
Shortest Remaining Time (SRT)
A
- Invocation: at the completion of a job, or at the arrival of a new job (preemptive)
- Policy: select the job with the shortest remaining execution time
4
Q
Flaw of SRT
A
- If the system receives a steady arrival of short jobs, a long job may not execute and suffer from starvation (same as SJN)
- A long job that is already running may never complete due to the arrival of jobs shorter than its remaining time
5
Q
Highest Slowdown Next (HSN)
A
- Invocation: at the completion of a job (non-preemptive)
- Policy: select the job with the largest slowdown
6
Q
Slowdown (HSN)
A
- (t + C_i - a_i) / C_i
7
Q
Static Analysis to Determine Job Length
A
- Relies on a model of the hardware to derive an approximation of the execution time
8
Q
Offline Measurements to Determine Job Length
A
- Measure the individual execution time of each job offline and store it in the system for online use
9
Q
Online Estimation to Determine Job Length
A
- Observe the length of jobs as they complete execution and use that information to predict the length of subsequent jobs
10
Q
Job Length - Simple Averages
A
- C(n) = average of all previous n job lengths
- Requires the storage of all n completed job lengths
11
Q
Job Length - Simple Averages with Optimization
A
- C(n) = (C(n-1) * (n-1) + C_(i,n)) / n
- Weighs all old job lengths equally to recent job lengths
12
Q
Job Length - Sliding Window
A
- C(n) = C(n-1) - (C_{(i, n) - w}) / w + C_(i, n) / w
- Requires the storage of all observations inside the sliding window w
13
Q
Job Length - Exponentially Weighted Move Averages (EWMA)
A
- C(n) = aC_(i, n) + (1-a)C(n-1)
14
Q
Static Priorities
A
- Priorities are assigned offline to each task
- Each job inherits the task-level priority
15
Q
Dynamic Task-Level Priorities
A
- Priority is assigned to each job of a task as soon as the job arrives
- Different jobs of the same task can have different priorities