An O1 Proportional Share Scheduler Jason Nieh Chris Vaill Hua Zhong Columbia University Presented by Adam Binford About the Paper Jason Nieh 77 publications 870 citations ID: 556918
Download Presentation The PPT/PDF document "Virtual-Time Round-Robin:" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Virtual-Time Round-Robin:An O(1) Proportional Share Scheduler
Jason
Nieh
, Chris
Vaill
,
Hua
Zhong
Columbia University
Presented by Adam BinfordSlide2
About the PaperJason
Nieh
77 publications
870 citationsColumbia University17 CitationsGroup ratio round-robin: O(1) proportional share scheduling for uniprocessor and multiprocessor systems
2Slide3
OverviewScheduling Background
WRR and WFQ
Core VTRR Algorithm
ImplementationExperimental ResultsConclusions
3Slide4
HistoryLinux 2.4 released 2001
Authors compared against Linux 2.2
Released 1999
Scheduling classesVaried time quantumDynamic priorities
4Slide5
Proportional Fairness
Perfect fairness
Service time error
5Slide6
Weighted Round RobinO
(1)
Each process gets all its shares at once
Service time error depends on magnitude of shares3, 2, and 1 shares has error range [-1 tu, +1.5 tu]
3000, 2000, and 1000 shares has error range
[-1000
tu
, +1500
tu
]
6Slide7
Weighted Fair QueueingTasks sorted by Virtual Finishing Time
Task with lowest VFT executes
VFT get’s updated, reinserted in Queue
O(N) for simple designService time error not dependent on magnitude
3000, 2000, and 1000 share allocation same as 3, 2, and 1
7Slide8
Virtual Time
Concept still used in current Linux kernel
Virtual time of client
A:
Virtual
f
inishing time of client
A
:
8Slide9
VTRR State
Client
Shares
VFTTime counterIDRun state
Scheduler
Time quantum
Run queue
Total shares
Queue virtual time
9Slide10
Further Definitions
Queue virtual
t
ime
VFT inequality
Time counter
Equal to number of shares
Time counter invariant
for consecutive clients in queue, A, B
10Slide11
The Process
11
Slide12
The Process
12
Slide13
The Process
13
Slide14
The Process
14
Slide15
The Process
15
Slide16
The Process
16
Slide17
The Process
17
Slide18
Dynamic Operations
New task
Old task
Last-previous and last-next references
Time counter proportional to others in queue
Changing shares is a removal and insertion
18Slide19
ComplexityInsertion in worst case is
O
(
N)O(1) with valid last-previous and last-next referencesNaïve time counter reset takes
O
(
N
) time
Can be reduced to
O
(1)
All other operations
O(1)19Slide20
ImplementationBuilt on Linux
2.2
kernel
Single CPUReused existing scheduling codeStatically allocated kernel memory
20Slide21
Simulation Studies
21Slide22
Scheduling Overhead
22Slide23
Scheduling Granularity
23Slide24
Schedulers TodayLinux default scheduler is the Completely Fair Scheduler
Red-black tree ordered by virtual time
Additional scheduling classes
SCHED_RR strictly priority based round robinSCHED_FIFO non-preemptive schedulingBoth supersede defaultSCHED_FIFO supersedes SCHED_RR
24Slide25
ConclusionsMajority
of
operations
O(1)Effective for large-scale serversStrong proportional fairnessVirtual time still used todaySingle processor d
esign
25Slide26
Questions
26