Optimal Priority Assignments in P-FRP *

Priority-based Functional Reactive Programming (P-FRP) has been recently introduced as a new functional programming formalism for real-time systems. P-FRP allows static priority assignment and guarantees real-time response by preempting lower priority tasks. Due to the state-less nature of functional programs, preempted tasks in P-FRP are aborted and restarted after the higher priority tasks have completed execution. In the classical preemptive model † of real-time systems, it has been demonstrated that for fixed priority scheduling, if tasks are schedulable with any priority assignment, they are also schedulable by the rate-monotonic (RM) priority assignment, making this priority assignment optimal for all task sets in the preemptive model. However, the RM priority assignment is not optimal in P-FRP, and it has been unknown if an optimal fixed priority assignment can even exist for such an execution model. In this paper, we formally present the priority assignment characteristics of P-FRP and show that based on task periods, either a combined utilization and rate-monotonic, or only the ratemonotonic priority assignments is optimal for a system with two tasks. Using this result, we formally prove the limitation of optimal priority assignments in a P-FRP system having more than two tasks where, unless arrival periods are integer multiples of each other, no single priority assignment exists which is optimal for all task sets. Experimental results using task sets of different sizes are also presented. † In this paper the classical preemptive model refers to a real-time system in which tasks can be preempted by higher priority tasks and can resume execution from the point they were preempted * This work is supported in part by U.S. National Science Foundation under Award no. 0720856

[1]  Walid Taha,et al.  E-FRP with priorities , 2007, EMSOFT '07.

[2]  Alan Burns,et al.  Robust Priority Assignment for Fixed Priority Real-Time Systems , 2007, 28th IEEE International Real-Time Systems Symposium (RTSS 2007).

[3]  James H. Anderson,et al.  Real-time computing with lock-free shared objects , 1997, TOCS.

[4]  Paul Hudak,et al.  Real-time FRP , 2001, ICFP '01.

[5]  Jan Vitek,et al.  Preemptible atomic regions for real-time Java , 2005, 26th IEEE International Real-Time Systems Symposium (RTSS'05).

[6]  Joseph Y.-T. Leung,et al.  On the complexity of fixed-priority scheduling of periodic, real-time tasks , 1982, Perform. Evaluation.

[7]  Neil C. Audsley,et al.  On priority assignment in fixed priority scheduling , 2001, Inf. Process. Lett..

[8]  Donald F. Towsley,et al.  Priority assignment in real-time active databases , 1996, The VLDB Journal.

[9]  Alan Burns,et al.  Priority Assignment for Global Fixed Priority Pre-Emptive Scheduling in Multiprocessor Real-Time Systems , 2009, 2009 30th IEEE Real-Time Systems Symposium.

[10]  Paul Hudak,et al.  Functional reactive animation , 1997, ICFP '97.

[11]  Tom Hawkins,et al.  Controlling Hybrid Vehicles with Haskell , 2008, Proceedings of the 13th ACM SIGPLAN international conference on Functional programming.

[12]  Kevin Hammond,et al.  Is it time for real-time functional programming? , 2003, Trends in Functional Programming.

[13]  Lui Sha,et al.  Priority Inheritance Protocols: An Approach to Real-Time Synchronization , 1990, IEEE Trans. Computers.

[14]  Albert Mo Kim Cheng,et al.  Response Time Analysis for the Abort-and-Restart Event Handlers of the Priority-Based Functional Reactive Programming (P-FRP) Paradigm , 2009, 2009 15th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications.

[15]  Konstantinos Bletsas,et al.  Optimal priority assignment in the presence of blocking , 2006, Inf. Process. Lett..

[16]  Paul Hudak,et al.  A language for declarative robotic programming , 1999, Proceedings 1999 IEEE International Conference on Robotics and Automation (Cat. No.99CH36288C).

[17]  Paul Hudak,et al.  Functional reactive programming from first principles , 2000, PLDI '00.

[18]  Alan Burns,et al.  A Worst-Case Behavior Analysis for Hard Real-Time Transactions , 1996, RTDB.

[19]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[20]  Paul Hudak,et al.  FVision: A Declarative Language for Visual Tracking , 2001, PADL.

[21]  James W. Layland,et al.  Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment , 1989, JACM.