A predictable interrupt management policy for real-time operating systems

Real-time operating systems play important roles in developing many of today's embedded systems. Majority of these embedded systems have intense interactions with the environment through I/O devices, namely sensors and actuators. Interrupts are often used by the operating systems to handle these interactions through executing the corresponding interrupt service routines (ISRs). ISRs are usually executed non-preemptively at some priorities higher than system tasks. Depending on the interrupt frequency, this prioritization can result in problems like unresponsiveness and unpredictability in the system, even for the high priority tasks. This incurs a type of priority inversion which we call it ISR-task priority inversion (ITPI). This paper uses threaded interrupts and employs the priority inheritance protocol (PIP) to enforce each interrupt service thread (IST) to be executed at its owner's priority, causing less interference with higher priority tasks. Two PIP-based approaches are proposed and implemented: 1) Static priority linked list, which uses PIP only when a task starts; experimental results show that this approach can tolerate some simple forms of ITPI, and 2) Dynamic priority bitmap, which employs PIP whenever a task needs an IST; experiments show that more complex forms of ITPI can be tolerated with this approach. The almost extensive experimental results show that using the dynamic priority approach enhances the real-time system predictability compared to the common approaches.

[1]  Sanjoy K. Baruah,et al.  Static-priority scheduling on multiprocessors , 2001, Proceedings 22nd IEEE Real-Time Systems Symposium (RTSS 2001) (Cat. No.01PR1420).

[2]  Chi-Sheng Shih,et al.  nuKernel: MicroKernel for multi-core DSP SoCs with load sharing and priority interrupts , 2013, SAC '13.

[3]  Brian N. Bershad,et al.  Fast Interrupt Priority Management in Operating System Kernels , 1993, USENIX Microkernels and Other Kernel Architectures Symposium.

[4]  Dionisio de Niz,et al.  Integrated Task and Interrupt Management for Real-Time Systems , 2012, TECS.

[5]  K. K. Ramakrishnan,et al.  Eliminating receive livelock in an interrupt-driven kernel , 1996, TOCS.

[6]  John P. Lehoczky,et al.  Fixed priority scheduling of periodic task sets with arbitrary deadlines , 1990, [1990] Proceedings 11th Real-Time Systems Symposium.

[7]  Marco Spuri,et al.  How to Integrate Precedence Constraints and Shared Resources in Real-Time Scheduling , 1994, IEEE Trans. Computers.

[8]  Subhas Chandra Mukhopadhyay,et al.  Internet of Things: Challenges and Opportunities , 2014 .

[9]  Krithi Ramamritham,et al.  Scheduling algorithms and operating systems support for real-time systems , 1994, Proc. IEEE.

[10]  John Regehr,et al.  Preventing interrupt overload , 2005, LCTES '05.

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

[12]  Yuting Zhang,et al.  Process-Aware Interrupt Scheduling and Accounting , 2006, 2006 27th IEEE International Real-Time Systems Symposium (RTSS'06).

[13]  Jian Yang,et al.  A Linux kernel with fixed interrupt latency for embedded real-time system , 2005, Second International Conference on Embedded Software and Systems (ICESS'05).

[14]  Mongkol Ekpanyapong,et al.  Task-Aware Interrupt Controller: Priority Space Unification in Real-Time Systems , 2015, IEEE Embedded Systems Letters.

[15]  Steve R. Kleiman,et al.  Interrupts as threads , 1995, OPSR.

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

[17]  Morteza Mohaqeqi,et al.  Scheduling of Accuracy-Constrained Real-Time Systems in Dynamic Environments , 2012, IEEE Embedded Systems Letters.

[18]  Henry Wyle,et al.  Management of periodic operations in a real-time computation system , 1967, AFIPS '67 (Fall).