14 04 2016
play

14/04/2016 Global vs Partitioned scheduling Single shared queue - PDF document

14/04/2016 Global vs Partitioned scheduling Single shared queue instead of multiple dedicated queues Partitioned scheduling Global scheduling t5 t4 t1 t1 t1 Global Scheduling in t5 t4 t3 t2 t1 t3 t2 t2 Multiprocessor Real-Time


  1. 14/04/2016 Global vs Partitioned scheduling  Single shared queue instead of multiple dedicated queues Partitioned scheduling Global scheduling t5 t4 t1 t1 t1 Global Scheduling in t5 t4 t3 t2 t1 t3 t2 t2 Multiprocessor Real-Time t2 Systems t3 Uniprocessor Bin-packing + scheduling problem problem NP-hard in the Well-known strong sense; Alessandra Melani various heuristics adopted 1 2 Pros and cons Main (negative) results  Global scheduling  Weak theoretical framework  Partitioned scheduling Automatic load balancing Supported by automotive  Unknown critical instant industry (e.g., AUTOSAR) Lower avg. response time  G-EDF is not optimal No migrations Simpler implementation Isolation between cores  Any G-JLFP scheduler is not optimal Optimal schedulers exist Mature scheduling More efficient reclaiming  Optimality only for implicit deadlines framework Migration costs Cannot exploit unused  Many sufficient tests (most of them incomparable) capacity Inter-core synchronization Rescheduling not convenient Loss of cache affinity NP-hard allocation Weak scheduling framework 3 4 Unknown critical instant Unknown critical instant  Critical instant  Synchronous periodic arrival of jobs is not a critical instant for multiprocessors  Job release time such that response-time is maximized �  Uniprocessor � Synchronous periodic situation  Liu & Layland: synchronous release sequence yields worst-case � � , � � , � � � response-times � � � �, �, � � � � � ��, �, �� Synchronous: all tasks release a job at time 0 � � � ��, �, �� o � Assuming constrained deadlines and no deadline misses o � The second job of τ � is delayed by one unit  Multiprocessors � �  No general critical instant is known! We need to find pessimistic situations to derive sufficient It is not necessarily the synchronous release sequence…  schedulability tests 5 6 1

  2. 14/04/2016 G-EDF is not optimal Any G-JLFP scheduler is not optimal τ � Two processors, three tasks, � � � 15 , � � � 10 τ � τ � Scheduled on τ � processor 1 Scheduled on τ � processor 1 Scheduled on τ � processor 2 Scheduled on τ � processor 2 τ �  Any job-level fixed-priority scheduler is not optimal  Uniprocessors  Multiprocessors  G-EDF is not optimal  Synchronous release time  EDF is optimal  Key problem: sequentiality of tasks  One of the three jobs is scheduled last under any JLFP policy  Two processors available for τ � ,  Deadline miss unavoidable! but it can only use one 7 8 G-JLDP required for optimality Taxonomy of multiprocessor scheduling algorithms τ � Scheduled on τ � G-JLFP processor 1 Uniprocessor Scheduled on τ � Optimal Algorithms processor 2 EDF LLF DM RM Dedicated Uniprocessor τ � Global G-JLDP Multiprocessor Scheduled on Algorithms τ � processor 1 Scheduled on pfair τ � Partitioned processor 2 Global EKG LLREF Algorithms Algorithms Not DP-Wrap optimal Partitioned Global Job priority changes! EDF EDF Optimal anymore Algorithms Partitioned Global  G-JLDP: Global Job Level Dynamic Priority ; the priority of each FP FP job may change over time 9 10 Proportionate fairness Proportionate fairness Example:  P-fair: notion of “fair share of processor” �  If a schedule is P-fair, no implicit deadline will be missed →  � � � � � � 3; � � � � � � 6 �� � � � � � � � optimal algorithm τ � Basic principle:  Timeline is divided into equal length slots τ �  Task period and execution time are multiples of the slot size  Each task receives amount of slots proportional to its task  Quantum-based: � � ∈ � � , � � ∈ � � ; scheduling decisions can only occur utilization at integers � �  If a task has utilization � � � � , then it will have been allocated � ∙ � time slots  A task executes during a whole time slot or not execute at all in that for execution in the interval �0, �� time slot 11 12 2

  3. 14/04/2016 Proportionate fairness Proportionate fairness  Example: τ � � � � 5, � � � 2 , � � � 7, � � � 4 , 1 processor ��� τ � , � � � ∙ � � � ����������τ � , �� No task executes in �0,1� � � τ � � ��� τ � , 1 � 1 ∙ � � 0 � 0 τ � � Error “Fluid” Real ��� τ � , 1 � 1 ∙ � � 0 � 0 execution: execution in should have �0, �� ��� τ � , 1 � 0 Task τ � executes in �0,1� τ � executed in � is impossible ��� τ � , 1 � 1 ∙ � � 1 � 0 �0, �� τ � � ��� τ � , 1 � 1 ∙ � � 0 � 0  Goal: find an algorithm that minimizes max |����τ � , ��| � Task τ � executes in �0,1� τ � � ��� τ � , 1 � 1 ∙ � � 0 � 0  Which are the values that ����� � � can take? τ � � ��� τ � , 1 � 1 ∙ � � 1 � 0 13 14 Proportionate fairness Proportionate fairness  Definition (P-fair schedule):  Example : τ � � � � 4, � � � 1 , � � � 4, � � � 1 , � � � 4, � � � 1 , � � � 4, � � � 1 , a schedule is P-fair if and only if ∀ τ � and ∀ � : �1 � ��� τ � , � � 1 one processor ����τ � , �� �/� 1 τ � 1 4 � 1 � � 3 ��� τ � , 1 � 1 ∙ 4 ��� τ � , 3 � 3 ∙ 1 4 � 0 � 3 τ � 4 τ � Execution domain of P-fair �1 � ��� τ � , � � 1 seems τ � to be the worst-case lag Slope � � � 15 16 Proportionate fairness The algorithm PF  Theorem  How to generate a P-fair schedule? A P-fair schedule is optimal in the sense of feasibility for a set of periodic  Execute all urgent tasks tasks with implicit deadlines o A task τ � is urgent at time � if  Proof ��� τ � , � � 0 and ����τ � , � � 1� � 0 if τ � executes A schedule � is P-fair ⇒ �1 � ��� τ � , � � 1  Do not execute tnegru tasks ⇒ �1 � ��� τ � , �� � � 1 o A task τ � is tnegru at time � if � � ⇒ �1 � �� � � � ��������� τ � , �� � � 1 ��� τ � , � � 0 and ��� τ � , � � 1 � 0 if τ � does not execute � ⇒ �1 � �� � � ��������� τ � , �� � � 1 ⇒ �� � � ��������� τ � , �� � � 0  For the other tasks, execute the task that has the least � such ⇒ �� � � ��������� τ � , �� � that ��� τ � , � � 0 ⇒ ��������� τ � , �� �1�� � � ��������� τ � , �� � � � � ⇒ τ � executes � � time-units during �� � , � � 1 � � ⇒ τ � meets every deadline in periodic scheduling 17 18 3

  4. 14/04/2016 The algorithm PF The algorithm PF  Results  Example : τ � � � � 5, � � � 3 , one � � � 5, � � � 2 , processor  The algorithm PF assigns priorities to tasks at every time slot → Job-level dynamic priority (JLDP) scheduling policy At time 0, any of the two tasks τ � may be scheduled  Theorem : the schedule generated by algorithm PF is P-fair o Proof: [Baruah et al., ‘96] At time 1: At time 2 if τ � executes: 5 � 1 � � 3 2 ��� τ � , 2 � 2 ∙ 3 5 � 1 � 1 ��� τ � , 1 � 1 ∙ 5 5 ��� τ � , 1 � 1 ∙ 3 5 � 0 � 3 τ � is urgent at time 1!! 5 19 20 The algorithm PF The algorithm PF  Example : τ � � � � 5, � � � 3 , one  Example : τ � � � � 5, � � � 3 , one � � � 5, � � � 2 , � � � 5, � � � 2 , processor processor τ � τ � At time 2: At time 3 if τ � executes: At time 3: At time 4 if τ � executes: 5 � 1 � � 1 2 ��� τ � , 3 � 3 ∙ 2 5 � 1 � 1 2 5 � 1 � 1 5 � 2 � � 2 2 ��� τ � , 2 � 2 ∙ ��� τ � , 3 � 3 ∙ ��� τ � , 4 � 4 ∙ 5 5 5 5 ��� τ � , 2 � 2 ∙ 3 5 � 1 � 1 ��� τ � , 3 � 3 ∙ 3 5 � 2 � � 1 ��� τ � , 3 � 3 ∙ 3 5 � 2 � � 1 5 5 5 τ � is scheduled since it has the least � such that lag is positive τ � is scheduled since it has the least � such that lag is positive 21 22 The algorithm PF Proportionate fairness  Example : τ � � � � 5, � � � 3 , one � � � 5, � � � 2 ,  Exact test of existence of a P-fair schedule: processor � � � � � � τ � ���  Full processor utilization! At time 4: At time 5 if τ � executes: Disadvantages 2 5 � 2 � � 2 ��� τ � , 5 � 5 ∙ 3 ��� τ � , 4 � 4 ∙ 5 � 3 � 0  High number of preemptions 5 ��� τ � , 4 � 4 ∙ 3 5 � 2 � 2 τ � is urgent at time 4!!  High number of migrations 5  Optimal only for implicit deadlines …and so on… 23 24 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend