Lecture 5 Advanced scheduling

Lecture 5 Advanced scheduling - Administrivia Project 1 due...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Administrivia Project 1 due Thursday 4:15pm- Show up to lecture for free extension to midnight- SCPD can just watch lecture before midnight If you need longer, email cs140-staff.- Put extension in the subject- Tell us where you are, and how much longer you need .- We will give short extensions to people who dont abuse this Section Friday to go over project 2 Project 2 Due Thursday, Feb. 4 Midterm following Tuesday, Feb. 9 Midterm will be open book, open notes- Feel free to bring textbook, printouts of slides- Laptop computers or other electronic devices prohibited 1/36 Errata Fair queuing isnt SJF scheduling for networks SJF has three limitations- Cant see the future- Optimizes response time but not turnaround time- Not fair The network setting does address the first two But SJF still unfair- Would starve long packets on the network- So obviously not same as fair queuing Todays lecture will discuss CPU schedulers like FQ 2/36 Linux 2.6 ( < 2.6.23) Scheduler Linux 2.4 scheduler had several drawbacks- O ( n ) operations for n processes (e.g., re-calculate goodness of all processes. Decaying p estcpu in BSD similarly O ( n ) .)- On SMPs: No affinity (bad for cache), global run-queue lock Linux 2.6 goal: Be O ( 1 ) for all operations 140 Priority levels- 1100 for real-time tasks (configured by administrator)- 101140 for user tasks (depend on nice & behavior) Also keeps per-process 4-entry load estimator- How much CPU consumed in each of the last 4 seconds- Adjusts priority of user procs by 5 based on behavior 3/36 Linux task lists Keeps one active/expired array pair per CPU- Avoids global lock and helps with affinity- SMP load balancer can move procs between CPUs Run highest-priority task in active array- After task uses quantum, place it in expired list- Swap expired/active pointers when active list empty Bitmap cache for empty/non-empty state of each list 4/36 Recall Limitations of BSD scheduler Mostly apply to Linux scheduler, too Hard to have isolation / prevent interference- Priorities are absolute Cant donate CPU (e.g., to server on RPC) No flexible control- E.g., In monte carlo simulations, error is 1/ N after N trials- Want to get quick estimate from new computation- Leave a bunch running for a while to get more accurate results Multimedia applications- Often fall back to degraded quality levels depending on resources- Want to control quality of different streams 5/36 Lottery scheduling [Waldspurger94] Inspired by economics & free markets Issue lottery tickets to processes- Let p i have t i tickets- Let T be total # of tickets, T = i t i- Chance of winning next quantum is t i / T ....
View Full Document

This note was uploaded on 03/13/2010 for the course CS 02523 taught by Professor Davidmieres during the Winter '10 term at A.T. Still University.

Page1 / 42

Lecture 5 Advanced scheduling - Administrivia Project 1 due...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online