Multiprocessor Real-Time Scheduling with Hierarchical Processor Affinities

Many multiprocessor real-time operating systems offer the possibility to restrict the migrations of any task to a specified subset of processors by setting affinity masks. A notion of “strong arbitrary processor affinity scheduling” (strong APA scheduling) has been proposed; this notion avoids schedulability losses due to overly simple implementations of processor affinities. Due to potential overheads, strong APA has not been implemented so far in a real-time operating system. We show that, in the special but highly relevant case of hierarchical processor affinities (HPA), strong APA scheduling can be implemented with a vastly improved runtime complexity. In particular, we present a strong HPA scheduler with a runtime complexity of O(m) per task arrival and O(log n+m2) per task departure, where mis the number of processors and n is the number of tasks, thus improving on the previous bounds of O(m2) and O(mn). The improved runtime algorithms allowed us to implement support for strong hierarchical processor affinities in LITMUSRT. We benchmarked this implementation on a 24-core platform and observed nonnegligible, but still viable runtime overheads. Additionally, in the case of a bilevel affinity hierarchy and when job priorities are based on deadlines, we argue that the performance of our strong HPA scheduler, HPA-EDF, can be related to system optimality in the following way: any collection of jobs that is schedulable (under any policy) on m unit-speed processors subject to hierarchical affinity constraints is correctly scheduled by HPA-EDF on m processors of speed 2.415.

[1]  Sanjoy K. Baruah,et al.  Schedulability Analysis of Multiprocessor Sporadic Task Systems , 2007, Handbook of Real-Time and Embedded Systems.

[2]  Evangelos P. Markatos,et al.  Using processor affinity in loop scheduling on shared-memory multiprocessors , 1992, Proceedings Supercomputing '92.

[3]  Konstantinos Bletsas,et al.  Priority Assignment and Application Mapping for Many-Cores Using a Limited Migrative Model , 2014 .

[4]  Arpan Gujarati,et al.  Outstanding Paper Award: Schedulability Analysis of the Linux Push and Pull Scheduler with Arbitrary Processor Affinities , 2013, 2013 25th Euromicro Conference on Real-Time Systems.

[5]  Felipe Cerqueira,et al.  Scaling global scheduling with message passing , 2014, 2014 IEEE 19th Real-Time and Embedded Technology and Applications Symposium (RTAS).

[6]  Hennadiy Leontyev,et al.  LITMUS^RT : A Testbed for Empirically Comparing Real-Time Multiprocessor Schedulers , 2006, 2006 27th IEEE International Real-Time Systems Symposium (RTSS'06).

[7]  James H. Anderson,et al.  Scheduling and locking in multiprocessor real-time operating systems , 2011 .

[8]  Alexander Schrijver,et al.  Combinatorial optimization. Polyhedra and efficiency. , 2003 .

[9]  Alan Burns,et al.  Partitioned EDF scheduling for multiprocessors using a C=D task splitting scheme , 2011, Real-Time Systems.

[10]  Hyun-Wook Jin,et al.  MiAMI: Multi-core Aware Processor Affinity for TCP/IP over Multiple Network Interfaces , 2009, 2009 17th IEEE Symposium on High Performance Interconnects.

[11]  Alan Burns,et al.  A survey of hard real-time scheduling for multiprocessor systems , 2011, CSUR.

[12]  Donald Newell,et al.  Architectural Characterization of Processor Affinity in Network Processing , 2005, IEEE International Symposium on Performance Analysis of Systems and Software, 2005. ISPASS 2005..

[13]  Sanjoy K. Baruah,et al.  Multiprocessor Feasibility Analysis of Recurrent Task Systems with Specified Processor Affinities , 2013, 2013 IEEE 34th Real-Time Systems Symposium.

[14]  Donald Newell,et al.  An in-depth analysis of the impact of processor affinity on network performance , 2004, Proceedings. 2004 12th IEEE International Conference on Networks (ICON 2004) (IEEE Cat. No.04EX955).

[15]  Laurent George,et al.  A semi-partitioned approach for parallel real-time scheduling , 2012, RTNS '12.

[16]  James H. Anderson,et al.  A Hybrid Real-Time Scheduling Approach for Large-Scale Multicore Platforms , 2007, 19th Euromicro Conference on Real-Time Systems (ECRTS'07).

[17]  Björn B. Brandenburg,et al.  Feather-Trace : A Light-Weight Event Tracing Toolkit ∗ , 2007 .

[18]  James H. Anderson,et al.  An EDF-based scheduling algorithm for multiprocessor soft real-time systems , 2005, 17th Euromicro Conference on Real-Time Systems (ECRTS'05).

[19]  Ronald L. Rivest,et al.  Introduction to Algorithms, third edition , 2009 .

[20]  Donald F. Towsley,et al.  The effectiveness of affinity-based scheduling in multiprocessor network protocol processing (extended version) , 1996, TNET.

[21]  Patrick Meumeu Yomsi,et al.  Semi-Partitioned Hard Real-Time Scheduling with Restricted Migrations upon Identical Multiprocessor Platforms , 2010, ArXiv.

[22]  Arpan Gujarati,et al.  Linux's Processor Affinity API, Refined: Shifting Real-Time Tasks Towards Higher Schedulability , 2014, 2014 IEEE Real-Time Systems Symposium.

[23]  P. Hall On Representatives of Subsets , 1935 .

[24]  Cynthia A. Phillips,et al.  Optimal Time-Critical Scheduling via Resource Augmentation , 1997, STOC '97.

[25]  Robert E. Tarjan,et al.  Strict fibonacci heaps , 2012, STOC '12.

[26]  Shinpei Kato,et al.  Semi-partitioned Scheduling of Sporadic Task Systems on Multiprocessors , 2009, 2009 21st Euromicro Conference on Real-Time Systems.

[27]  Gerhard J. Woeginger,et al.  Parallel machine scheduling with nested job assignment restrictions , 2010, Oper. Res. Lett..

[28]  Arpan Gujarati,et al.  Multiprocessor real-time scheduling with arbitrary processor affinities: from practice to theory , 2014, Real-Time Systems.