Sloth: Threads as Interrupts

Traditional operating systems differentiate between threads, which are managed by the kernel scheduler, and interrupt handlers, which are scheduled by the hardware. This approach is not only asymmetrical in its nature, but also introduces problems relevant to real-time systems because low-priority interrupt handlers can interrupt high-priority threads. We propose to internally design all threads as interrupts, thereby simplifying the managed control-flow abstractions and letting the hardware interrupt subsystem do most of the scheduling work. The resulting design of our very light-weight Sloth system is suitable for the implementation of a wide class of embedded real-time systems, which we describe with the example of the OSEK-OS specification. We show that the design conciseness has a positive impact on the system performance, its memory footprint, and its overall maintainability.

[1]  Theodore P. Baker,et al.  A stack-based resource allocation policy for realtime processes , 1990, [1990] Proceedings 11th Real-Time Systems Symposium.

[2]  Masaharu Imai,et al.  Hardware implementation of a real-time operating system , 1995, Proceedings of the 12th TRON Project International Symposium.

[3]  Wolfgang Schröder-Preikschat,et al.  CiAO: An Aspect-Oriented Operating-System Family for Resource-Constrained Embedded Systems , 2009, USENIX Annual Technical Conference.

[4]  Wayne M. Loucks,et al.  A hardware/software kernel for system on chip designs , 2004, SAC '04.

[5]  Francesco Regazzoni,et al.  Hardware/software partitioning of operating systems: a behavioral synthesis approach , 2006, ACM Great Lakes Symposium on VLSI.

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

[7]  Dionisio de Niz,et al.  Predictable Interrupt Management for Real Time Kernels over conventional PC Hardware , 2006, 12th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'06).

[8]  Wolfgang Schröder-Preikschat,et al.  Interrupt synchronization in the CiAO operating system: experiences from implementing low-level system policies by AOP , 2007, ACP4IS.

[9]  Lennart Lindh Fastchart-a fast time deterministic CPU and hardware based real-time-kernel , 1991, Proceedings. EUROMICRO `91 Workshop on Real-Time Systems.

[10]  Chung Laung Liu,et al.  Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment , 1989, JACM.

[11]  Theodore P. Baker,et al.  Stack-based scheduling of realtime processes , 1991, Real-Time Systems.

[12]  Douglas M. Blough,et al.  Atalanta: A New Multiprocessor RTOS Kernel for System-on-a-Chip Applications , 2002 .

[13]  Wolfgang Schröder-Preikschat,et al.  Parallel, hardware-supported interrupt handling in an event-triggered real-time operating system , 2009, CASES '09.