Implementing Ada.Real Time.Clock and Absolute Delays in Real-Time Kernels

  • Juan Zamorano
  • José F. Ruiz
  • Juan Antonio de la Puente
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2043)


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.


Race Condition Expiration Time Sporadic Task Software Timer Interrupt Handler 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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. 2.
    Michael Barabanov. A Linux-based real-time operating system. Master’s thesis, New Mexico Institute of Mining and Technology, June 1997. Available at
  3. 3.
    Alan Burns. The Ravenscar profile. Ada Letters, XIX(4):49–52, 1999.CrossRefGoogle Scholar
  4. 4.
    Alan Burns and Andy J. Wellings. Real-Time Systems and Programming Languages. Addison-Wesley, 2 edition, 1996.Google Scholar
  5. 5.
    Juan A. de la Puente, José F. Ruiz, and Juan Zamorano. An open Ravenscar real-time kernel for GNAT. In Hubert B. Keller and Erhard Ploedereder, editors, Reliable Software Technologies — Ada-Europe 2000, number 1845 in LNCS, pages 5–15. Springer-Verlag, 2000.CrossRefGoogle Scholar
  6. 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. 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. 8.
    ESA. 32 Bit Microprocessor and Computer System Development, 1992. Report 9848/92/NL/FM.Google Scholar
  9. 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. 10.
    Intel Corp. Survey of Pentium Processor Performance Monitoring Capabilities and Tools, 1996. Available at
  11. 11.
    Hermann Kopetz. Clock synchronization in distributed real-time systems. IEEE Tr. on Software Engineering, 36(8), 1987.Google Scholar
  12. 12.
    Lynx Real-Time Systems, Inc. LynxOS Appplication Writer’s Guide, 1993.Google Scholar
  13. 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. 14.
    OAR. RTEMS SPARC Applications Supplement, 1997.Google Scholar
  15. 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. 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
  17. 17.
    J.S. Snyder, D.B. Whalley, and T.P. Baker. Fast context switches: Compiler and architectural support for preemptive scheduling. Microprocessors and Microsystems, 19(1):35–42, February 1995.CrossRefGoogle Scholar
  18. 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. 19.
    Temic/Matra Marconi Space. SPARC RT Memory Controller (MEC) User’s Manual, April 1997.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Juan Zamorano
    • 1
  • José F. Ruiz
    • 2
  • Juan Antonio de la Puente
    • 2
  1. 1.Departamento de Arquitectura y Tecnología de Sistemas InformáticosUniversidad Politécnica de MadridMadridSpain
  2. 2.Departamento de Ingeniería de Sistemas TelemáticosUniversidad Politécnica de MadridMadridSpain

Personalised recommendations