Implementing Ada.Real Time.Clock and Absolute Delays in Real-Time Kernels
A real-time kernel providing multitasking and timing services is a fundamental component of any real-time system. Timing services, which are crucial to the correct execution of this kind of applications, are usually provided by a real-time clock and timer manager, which is part of the kernel and implements the required functionality on top of the one or more hardware timers. Kernel timing services must be implemented carefully in order to avoid race problems and inconsistencies which may be caused by the fact that many common hardware timer chips are not intended at a direct implementation of software timing services. This paper provides advice on the implementation of two of the Ada timing services: Ada.Real_Time.Clock, and absolute delays (delay until). The example implementation of both services in the Open Ravenscar Kernel, which is based on the ideas presented in the paper, is also described.
KeywordsRace Condition Expiration Time Sporadic Task Software Timer Interrupt Handler
Unable to display preview. Download preview PDF.
- 1.Ada 95 Reference Manual: Language and Standard Libraries. International Standard ANSI/ISO/IEC-8652:1995, 1995. Available from Springer-Verlag, LNCS no. 1246.Google Scholar
- 2.Michael Barabanov. A Linux-based real-time operating system. Master’s thesis, New Mexico Institute of Mining and Technology, June 1997. Available at http://www.rtlinux.org/baraban/thesis.
- 4.Alan Burns and Andy J. Wellings. Real-Time Systems and Programming Languages. Addison-Wesley, 2 edition, 1996.Google Scholar
- 6.Juan A. de la Puente, José F. Ruiz, Juan Zamorano, Rodrigo García, and Ramón Fernández-Marina. ORK: An open source real-time kernel for on-board software systems. In DASIA 2000–Data Systems in Aerospace, Montreal, Canada, May 2000.Google Scholar
- 7.Juan A. de la Puente, Juan Zamorano, José F. Ruiz, Ramón Fernéndez, and Rodrigo García. The design and implementation of the Open Ravenscar Kernel. Ada Letters, XXI(1), March 2001. 10th International Real-Time Ada Workshop, Las Navas del Marqués, Ávila, Spain. 8.Google Scholar
- 8.ESA. 32 Bit Microprocessor and Computer System Development, 1992. Report 9848/92/NL/FM.Google Scholar
- 9.Robert Hill, Balaji Srinivasan, Shyam Pather, and Douglas Niehaus. Temporal resolution and real-time extensions to Linux. Technical Report ITTC-FY98-TR-11510-03, Information and Telecommunication Technology Center, Department of Electrical Engineering and Computer Sciences, University of Kansas, June 1998.Google Scholar
- 10.Intel Corp. Survey of Pentium Processor Performance Monitoring Capabilities and Tools, 1996. Available at http://developer.intel.com/software/idap/resources/technical_collateral%/mmx/.
- 11.Hermann Kopetz. Clock synchronization in distributed real-time systems. IEEE Tr. on Software Engineering, 36(8), 1987.Google Scholar
- 12.Lynx Real-Time Systems, Inc. LynxOS Appplication Writer’s Guide, 1993.Google Scholar
- 13.A.K. Mok. The design of real-time programming systems based on process models. In IEEE Real-Time Systems Symposium. IEEE Computer Society Press, 1984.Google Scholar
- 14.OAR. RTEMS SPARC Applications Supplement, 1997.Google Scholar
- 15.Shuichi Oikawa and Ragunathan Rajkumar. Linux/RK: A portable resource kernel in Linux. IEEE Real-Time Systems Symposium Work-in-progress Session, December 1998.Google Scholar
- 16.José F. Ruiz and Jesús M. González-Barahona. Implementing a new low-level tasking support for the GNAT runtime system. In Michael González-Harbour and Juan A. de la Puente, editors, Reliable Software Technologies — Ada-Europe’99, number 1622 in LNCS, pages 298–307. Springer-Verlag, 1999.Google Scholar
- 18.J.A. Stankovic. Misconceptions about real-time programming: A serious problem for next-generation systems. IEEE Computer, 21(10):10–19, 1988.Google Scholar
- 19.Temic/Matra Marconi Space. SPARC RT Memory Controller (MEC) User’s Manual, April 1997.Google Scholar