the past and the future of linux scheduler

the past and the future of linux scheduler

ID:15401123

大小:3.16 MB

页数:122页

时间:2018-08-03

the past and the future of linux scheduler_第1页
the past and the future of linux scheduler_第2页
the past and the future of linux scheduler_第3页
the past and the future of linux scheduler_第4页
the past and the future of linux scheduler_第5页
资源描述:

《the past and the future of linux scheduler》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、ThepastandthefutureofLinuxSchedulerO(1),CFS,BFS,RealtimeandSMPBarrySong宋宝华Background宋宝华Real-TimeResponsevs.Throughput!EfficiencyandResponsivenessareInverselyRelated–OverheadforReal-TimePreemption•MutexOperationsmorecomplex

2、thanspinlockoperations•PriorityInheritanceonMutexincreasestaskswitching•PriorityInheritanceincreasesworst-caseexecutiontime•Interruptoverhead–AdditionalTaskSwitching–InterruptPreemption"InterruptthroughputreductionThroughputHighresponsivenessGeneralProcessClassifications!Twosche

3、mesforclassifying:–Traditionalclasses•IObound•CPUbound–Alternativeclasses•Interactive•Batch•Real-time–Video,robotics,sensor-based–Batch–Realtime!Hardrealtime-!determinism!LinuxSchedulerHistoryO(1)Background!Briefly–theschedulermaintainedtworunqueuesforeachCPU,withaprioritylinked

4、listforeachprioritylevel(140total).!Tasksareenqueuedintothecorrespondingprioritylist.!Thescheduleronlyneedstolookatthehighestprioritylisttoschedulethenexttask.!Assignstimeslicesforeachtask.!Hadtotracksleeptimes,processinteractivity,etc.Non-RTschedulinginO(1)!Everyprocesshasa“sta

5、tic”priority–100(highest)–139(lowest)–Variablevianice()andsetpriority()!Basequantum(notaconstant!)–Ifsp<120•20*(140-staticpriority)–Ifsp>=120•5*(140-staticpriority)!Dynamicpriority(also100-139)–Max(100,min(sp-bonus+5,139))–0<=bonus<=10宋宝华Dynamicpriorityfornon-

6、RTinO(1)!Bonus–0-5isapenalty–6-10isaprize–Relatedtoaveragesleeptime•OFTHISPROCESS(notofallProcesses)•Basedonpasthistory•Somesamplevalues:AveragesleeptimeBonus0<=N<100ms0300<=N<400ms3600<=N<7006900<=N<10009宋宝华Priority'Array'and'Bitmaps'in'O(1)'!Whenaprioritylev

7、elhasaTASK_RUNNINGprocess,thatbitinthebitmapissetto1."!Thefirstbitpositiontobe1isthequeueinthelistofqueuesonwhichtheavailableprocessisstored."10TwoSetsofRunnableProcessesintherunqueueStructure!TworunqueuesperCPU:oneactive,oneexpired.Ifaprocesshasn'tuseditsentiretimeslice,it'sonth

8、eactivequeue;ifithas,it'sexpired.Tasksareswappe

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。