cri cality monotonic scheduling with dynamic processor
play

Cri$cality*Monotonic.Scheduling.with Dynamic(Processor(Affini0es - PowerPoint PPT Presentation

Cri$cality*Monotonic.Scheduling.with Dynamic(Processor(Affini0es !Bjrn!B.!Brandenburg! !bbb@mpi2sw s.org Dagstuhl,*March*2015 1 This%talk:% Pragma&c %Mixed/Cri2cality%Scheduling How$to$schedule$ $Vestal/style$dual/cri3cality$workloads$


  1. Cri$cality*Monotonic.Scheduling.with Dynamic(Processor(Affini0es !Björn!B.!Brandenburg! !bbb@mpi2sw s.org Dagstuhl,*March*2015 1

  2. This%talk:% Pragma&c %Mixed/Cri2cality%Scheduling How$to$schedule$ $Vestal/style$dual/cri3cality$workloads$ $on$ exis%ng $RTOSs$(on$iden3cal$mul3processors)? ! 1. Processor)affini.es)are) readily(available )in)exis.ng,) already( cer,fied )RTOSs. 2. Processor)affini.es)are) useful )to)solve) Vestal3style )mixed< cri.cality)scheduling)problems)on) mul,processors . Dagstuhl,*March*2015 2

  3. De#facto !standard!interface:! Processor'Affinity ➞ ! restrict'the'set'of'processors'on'which'a'task'may'execute Linux !—! sched_setaffinity(…) FreeBSD !—! cpuset_setaffinity(…) Windows !—! SetThreadAffinityMask(…) —!—!— QNX !—! ThreadCtl(_NTO_TCTL_RUNMASK, …) VxWorks !—! taskCpuAffinitySet(…) SYSGO9PikeOS !—! p4_thread_set_affinity(…) Green9Hills9Integrity !—! “tuMP&Affinity&Groups” RTEMS !—! _Scheduler_priority_affinity_SMP_Set_affinity(…) Dagstuhl,*March*2015 3

  4. Processor'Affini,es'in'Prior'Work As#an# implementa)on+detail : • structured "mul&processor"scheduling: configure" global ," par((oned ," clustered "approaches • dynamic "processor"affini&es:" semi2par((oned "approaches Dagstuhl,*March*2015 4

  5. Processor'Affini,es'in'Prior'Work As#an# implementa)on+detail : • structured "mul&processor"scheduling: configure" global ," par((oned ," clustered "approaches • dynamic "processor"affini&es:" semi2par((oned "approaches As#a# first%class ,#explicit#parameter: • unrestricted+ arbitrary'processor'affini/es +(APAs): each+task+has+an+ explicit +affinity+[ECRTS’13,+RTSS’13,+RTSS’14] Dagstuhl,*March*2015 5

  6. Real%Time)Scheduling)with)Processor)Affinity Sporadic)task)with) affinity ) )(=)set)of)allowed)processors): • Weak "APA"schedulers:" "is"ready"but" not "scheduled"if"and"only"if" every"processor"in" "schedules"a"higher9priority"job. • Strong "APA"schedulers:"same"as"weak"APA" and "it"is"not"possible"to" “rearrange”"(or" shi' )"higher9priority"tasks"such"that" "becomes" scheduled"[RTSS’14]. Dagstuhl,*March*2015 6

  7. Processor'affini,es'can'be'used'to' improve(the(feasibility 'of' cri2cality3monotonic(priori2es 'on' mul,processors! Dagstuhl,*March*2015 7

  8. Fixed&Priority,Scheduling,with, , Cri$cality*Monotonic.Priori$es ➞ !higher!cri(cality!=!higher!priority Many% advantages %from%a% pragma&c %point%of%view: • simple,) trivial )to)implement,)no)budget)enforcement)required • obvious) isola)on )of)high7cri8cality)tasks • no+mode+switch ,)no)“dropping”)of)low7cri8cality)tasks Dagstuhl,*March*2015 8

  9. Feasibility*Limits Cri$cality*monotonic.scheduling.can.be.infeasible.if. low$cri(cality . (LC).tasks.are. more%urgent .(=.$ghter.rela$ve.deadlines).than. high$ cri(cality .(HC).tasks. Example: e L e H task criticality p i i i T a low – 2 1 high T b 10 3 6 low – Dagstuhl,*March*2015 9

  10. …also&on&Mul*processors! e L e H task criticality p i i i low – T a 2 1 T b high 10 3 6 low – T c 2 1 T d high 10 2 5 On# #cores: ➞ # global #infeasible#( #and# #miss#deadlines) ➞ # par((oned #infeasible#( ,# ,# #each#need#a#separate#core ). Dagstuhl,*March*2015 10

  11. Processor'Affini,es'to'the'Rescue Scheduling+strategy+on+ +cores+with+a+ strong'APA +scheduler: 1. Give'LC'tasks' global 'affini0es:' . 2. Give'HC'tasks' par((oned ' normal'affini*es :' . 3. When'a'HC'job'of' '(resp.,' )'executes'for'more'than' '(resp.,' )' 0me'units,'give'it'an' augmented'affinity 'of' . 4. Reset'a'HC'task’s'affinity'to'its'normal'affinity'when'it'completes'its'job. Dagstuhl,*March*2015 11

  12. Example(—(Normal(Mode T i = ( e L i , e H i , p i ) T a = (1 , − , 2) P 2 P 2 P 2 P 1 P 1 T b = (3 , 6 , 10) P 1 T c = (1 , − , 2) P 2 P 2 P 2 P 2 P 2 T d = (2 , 5 , 10) P 1 0 1 2 3 4 5 6 7 8 9 10 Normal:( (and( ( Dagstuhl,*March*2015 12

  13. Example(—(Degraded(Mode(for( T i = ( e L i , e H i , p i ) T a = (1 , − , 2) P 2 P 2 P 1 P 1 P 1 T b = (3 , 6 , 10) P 1 P 2 T c = (1 , − , 2) P 2 P 2 P 2 P 2 P 2 T d = (2 , 5 , 10) P 1 0 1 2 3 4 5 6 7 8 9 10 Normal:( (and( ;(augmented(=( . Dagstuhl,*March*2015 13

  14. Affinity'Augmented-Cri0cality'Monotonic-Scheduling 1. Par$$on #HC#tasks,#according#to# normal'mode #execu5on#costs. ➔ #should#typically#fit#on#a#small#number#of#cores#(one?) 2. Assign# arbitrary #processor#affini5es#( APA s)#to#LC#tasks. ➔ #Global#or#par55oned#are#op5ons,#beFer#choices#possible 3. Determine# augmented #affini5es#for#HC#tasks. ➔ #s.th.#all#HC#deadlines#met#even#if#all#tasks#degrade#together 4. At# run$me ,#switch#to#the#augmented#affinity#of#HC#job#when#it# exceeds#its#normalMmode#execu5on#cost;#revert#at#job#comple5on. Dagstuhl,*March*2015 14

  15. Advantages*of*the*Approach • Extends)support)for)cri1cality5monotonic)priori1es ➞ ) clearly'not'ideal,'but' simple '&'might'just'be'“good'enough” • Only)affinity)of) running )job)augmented,)not) all )jobs. ➞ ) No) )“mode)change” 'opera9on'in'the'kernel! ➞ ) Does'not'require'full'budget'enforcement,'just'a'9mer. • Exis1ng)commercial)RTOSs)support)processor)affini1es. ➞ ) Easy)to)adopt :'no'kernelAlevel'changes'required. Dagstuhl,*March*2015 15

  16. Open%Ques)on%1 Suppor&ng) Weak%APA )Schedulers • Linux'and'QNX'implement' weak ,'not' strong ,'APA'schedulers. • Other'major'RTOSs'presumably'do'so,'too. ➞ 'ImplementaCon'point'of'view:'it’s'the'“obvious”'first'aLempt. • How'to'support'the'sketched'scheme'on' exis%ng(&(mature(&( previously(cer%fied ,'but' weak 'APA'schedulers? ➞ '…'with'proper'choice'of'augmented'affiniCes'(I'think).' Dagstuhl,*March*2015 16

  17. Open%Ques)on%2 Improved)HC) APA#Response*Time#Analysis "is"given"by"uniprocessor"RTA"with"normal9mode"parameters. • "is"an"APA"response9=me"problem"(with" ji#er ). • It"is"“unlikely”"(impossible?)"for"both" "and" "to"be"maximal. ➞ " Don’t&pay&twice !for!the!same!higher-priority!job’s!interference . ➞ "Express"less"pessimis=c"bound"for" "as"a"func=on"of" . Dagstuhl,*March*2015 17

  18. Cri$cality*Monotonic.Scheduling. . ➕ . . Processor'Affini,es Simple,(Feasible,( Prac%cal ( ( &"poses"interes+ng"analysis"challenges ( ( (Björn(Brandenburg(—(bbb@mpi7sw s.org Dagstuhl,*March*2015 18

  19. Appendix Dagstuhl,*March*2015 19

  20. Preliminary*Schedulability*Analysis*(1/2) assuming(strong(APA(&(there(are(at(most( (HC(tasks Response'(me'of'a' LC#task : ➞ 'Given'by'(exis(ng)'APA'analysis'using' normal'mode 'parameters Response'(me'of'a' HC#task :' '+' ,'where ➞ ' 'is'given'by' uniprocessor*RTA 'using' normal1mode 'parameters ➞ 'For'#HC' '(='dedicated'core):' . Dagstuhl,*March*2015 20

  21. Preliminary*Schedulability*Analysis*(2/2) if#there#are# #HC#tasks HC#tasks#in#degraded#mode#no#longer#get#a#“dedicated”#core. ➞ #an# APA#schedulability #problem HC#part#“released”#only#a1er#(poten3ally)# #3me#units. ➞ #Need#APA#schedulability#analysis# with%support%for%ji-er ! Dagstuhl,*March*2015 21

  22. Open%Ques)on%3 Minimizing'Impact'on'Low0Cri3cality'Tasks • Finding'augmented'affini.es'for'HC'tasks'that' minimize& disturbance '&'maximize'schedulability'for'LC'tasks. • AAer'a'disturbance,'what'is'the'maximum'interval'during'which' LC'tasks'are'at'risk'of'missing'deadlines? • Slack'scheduling? Dagstuhl,*March*2015 22

  23. Open%Ques)on%4 Generalizing*the*Approach • Mul%ple(levels(of(Cri%cality • Uncertain(task(parameters(other(than(WCET • General(schedulability(analysis(for(mul%processor(scheduling( with( dynamic (processor(affini%es… Dagstuhl,*March*2015 23

Recommend


More recommend