Skip to main content
Log in

Scheduling of hard real-time garbage collection

  • Published:
Real-Time Systems Aims and scope Submit manuscript

Abstract

Automatic memory management or garbage collection greatly simplifies development of large systems. However, garbage collection is usually not used in real-time systems due to the unpredictable temporal behavior of current implementations of a garbage collector. In this paper we propose a real-time garbage collector that can be scheduled like a normal real-time thread with a deadline monotonic assigned priority. We provide an upper bound for the collector period so that the application threads will never run out of memory. Furthermore, we show that the restricted execution model of the Safety Critical Java standard simplifies root scanning and reduces copying of static data. Our proposal has been implemented and evaluated in the context of the Java processor JOP.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Aonix (2008) Perc pico 1.1 user manual. http://research.aonix.com/jsc/pico-manual.4-19-08.pdf, April 2008

  • Armbruster A, Baker J, Cunei A, Flack C, Holmes D, Pizlo F, Pla E, Prochazka M, Vitek J (2007) A real-time Java virtual machine with applications in avionics. Trans Embed Comput Syst 7(1):1–49

    Article  Google Scholar 

  • Audsley NC, Burns A, Richardson MF, Wellings AJ (1991) Hard real-time scheduling: The deadline monotonic approach. In: Proceedings 8th IEEE workshop on real-time operating systems and software, Atalanta

  • Auerbach J, Bacon DF, Blainey B, Cheng P, Dawson M, Fulton M, Grove D, Hart D, Stoodley M (2007) Design and implementation of a comprehensive real-time java virtual machine. In: EMSOFT ’07: proceedings of the 7th ACM & IEEE international conference on embedded software. ACM, New York, pp 249–258

    Chapter  Google Scholar 

  • Bacon DF, Cheng P, Rajan VT (2003a) The metronome: A simpler approach to garbage collection in real-time systems. In: Meersman R, Tari Z (eds) OTM workshops. Lecture notes in computer science, vol 2889. Springer, Berlin, pp 466–478

    Google Scholar 

  • Bacon DF, Cheng P, Rajan VT (2003b) A real-time garbage collector with low overhead and consistent utilization. In: POPL ’03: proceedings of the 30th ACM SIGPLAN-SIGACT symposium on principles of programming languages. ACM, New York, pp 285–298

    Chapter  Google Scholar 

  • Bacon DF, Cheng P, Grove D, Hind M, Rajan VT, Yahav E, Hauswirth M, Kirsch CM, Spoonhower D, Vechev MT (2005) High-level real-time programming in Java. In: EMSOFT ’05: proceedings of the 5th ACM international conference on embedded software. ACM, New York, pp 68–78

    Chapter  Google Scholar 

  • Baker HG (1978) List processing in real time on a serial computer. Commun ACM 21(4):280–294

    Article  MATH  Google Scholar 

  • Baker HG (1992) The treadmill: real-time garbage collection without motion sickness. SIGPLAN Not 27(3):66–70

    Article  Google Scholar 

  • Bollella G, Gosling J, Brosgol B, Dibble P, Furr S, Turnbull M (2000) The real-time specification for Java. Java Series. Addison-Wesley, Reading

    Google Scholar 

  • Bollella G, Delsart B, Guider R, Lizzi C, Parain F (2005) Mackinac: Making HotSpot real-time. In: ISORC. IEEE Computer Society, Los Alamitos, pp 45–54

    Google Scholar 

  • Brooks RA (1984) Trading data space for reduced time and code space in real-time garbage collection on stock hardware. In: Steele GL Jr (ed) LISP and functional programming. Conference record of the 1984 ACM symposium, Austin, Texas, August 6–8, 1984. ACM, New York, number ISBN:0-89791-142-3

    Google Scholar 

  • Cheney CJ (1970) A nonrecursive list compacting algorithm. Commun ACM 13(11):677–678

    Article  MATH  Google Scholar 

  • Dijkstra EW, Lamport L, Martin AJ, Scholten CS, Steffens EFM (1978) On-the-fly garbage collection: an exercise in cooperation. Commun ACM 21(11):966–975

    Article  MATH  Google Scholar 

  • Gruian F, Salcic Z (2005) Designing a concurrent hardware garbage collector for small embedded systems. In: Proceedings of advances in computer systems architecture: 10th Asia-Pacific conference, ACSAC 2005. Springer, Berlin, pp 281–294

    Google Scholar 

  • Henties T, Hunt JJ, Locke D, Nilsen K, Schoeberl M, Vitek J (2009) Java for safety-critical applications. In: 2nd international workshop on the certification of safety-critical software controlled systems (SafeCert 2009), York, United Kingdom, Mar 2009

  • Jones RE, Lins R (1996) Garbage collection: algorithms for automatic dynamic memory management. Wiley, Chichester. With a chapter on Distributed Garbage Collection by R Lins

    MATH  Google Scholar 

  • Kalibera T, Pizlo F, Hosking AL, Vitek J (2009) Scheduling hard real-time garbage collection. In: Proceedings of the 30th IEEE real-time systems symposium, RTSS 2009, Washington, DC, USA, 1–4 December 2009. IEEE Computer Society, Los Alamitos, pp 81–92

    Chapter  Google Scholar 

  • Liu CL, Layland JW (1973) Scheduling algorithms for multiprogramming in a hard-real-time environment. J ACM 20(1):46–61

    Article  MATH  MathSciNet  Google Scholar 

  • Niessner AF, Benowitz EG (2003) RTSJ memory areas and their affects on the performance of a flight-like attitude control system. In: Workshop on Java technologies for real-time and embedded systems (JTRES). LNCS. Springer, Berlin

    Google Scholar 

  • North SC, Reppy JH (1987) Concurrent garbage collection on stock hardware. In: Kahn G (ed) Functional programming languages and computer architecture. Proceedings of Conference held at Portland, OR. Lecture notes in computer science, vol 274. Springer, Berlin, pp 113–133

    Google Scholar 

  • Pedersen R, Schoeberl M (2006) Exact roots for a real-time garbage collector. In: Proceedings of the 4th international workshop on Java technologies for real-time and embedded systems (JTRES 2006). ACM, New York, pp 77–84

    Chapter  Google Scholar 

  • Pizlo F, Fox JM, Holmes D, Vitek J (2004) Real-time java scoped memory: Design patterns and semantics In: Proceedings of the 7th IEEE international symposium on, object-oriented real-time distributed computing (ISORC 2004), pp 101–110

  • Puffitsch W, Schoeberl M (2008) Non-blocking root scanning for real-time garbage collection In: Proceedings of the 6th international workshop on Java technologies for real-time and embedded systems (JTRES 2008), pp 68–76, Santa Clara, California, September 2008

  • Robertz SG (2006) Automatic memory management for flexible real-time systems. PhD thesis, Department of Computer Science Lund University

  • Robertz SG, Henriksson R (2003) Time-triggered garbage collection: robust and adaptive real-time GC scheduling for embedded systems. In: LCTES ’03: proceedings of the 2003 ACM SIGPLAN conference on language, compiler, and tool for embedded systems. ACM, New York, pp 93–102

    Chapter  Google Scholar 

  • Schmidt WJ, Nilsen KD (1994) Performance of a hardware-assisted real-time garbage collector. In: ASPLOS-VI: proceedings of the sixth international conference on architectural support for programming languages and operating systems. ACM, New York, pp 76–85

    Chapter  Google Scholar 

  • Schoeberl M (2005) JOP: A Java optimized processor for embedded real-time systems. PhD thesis, Vienna University of Technology

  • Schoeberl M (2006) Real-time garbage collection for Java. In: Proceedings of the 9th IEEE international symposium on object and component-oriented real-time distributed computing (ISORC 2006), Gyeongju, Korea, April 2006. IEEE, New York, pp 424–432

    Chapter  Google Scholar 

  • Schoeberl M (2007) Architecture for object oriented programming languages. In: Proceedings of the 5th international workshop on Java technologies for real-time and embedded systems (JTRES 2007), Vienna, Austria, September 2007. ACM, New York, pp 57–62

    Google Scholar 

  • Schoeberl M (2008) A Java processor architecture for embedded real-time systems. J Syst Archit 54(1–2):265–286

    Article  Google Scholar 

  • Schoeberl M, Pedersen R (2006) WCET analysis for a Java processor. In: Proceedings of the 4th international workshop on Java technologies for real-time and embedded systems (JTRES 2006). ACM, New York, pp 202–211

    Chapter  Google Scholar 

  • Schoeberl M, Puffitsch W (2008) Non-blocking object copy for real-time garbage collection. In: Proceedings of the 6th international workshop on Java technologies for real-time and embedded systems (JTRES 2008), Santa Clara, California, September 2008. ACM, New York, pp 77–84

    Chapter  Google Scholar 

  • Schoeberl M, Vitek J (2007) Garbage collection for safety critical Java. In: Proceedings of the 5th international workshop on Java technologies for real-time and embedded systems (JTRES 2007), Vienna, Austria, September 2007. ACM, New York, pp 85–93

    Google Scholar 

  • Schoeberl M, Sondergaard H, Thomsen B, Ravn AP (2007) A profile for safety critical Java. In: 10th IEEE international symposium on object and component-oriented real-time distributed computing (ISORC’07), Santorini Island, Greece, May 2007. IEEE Computer Society, Los Alamitos, pp 94–101

    Chapter  Google Scholar 

  • Schoeberl M, Puffitsch W, Pedersen RU, Huber B (2010) Worst-case execution time analysis for a Java processor. Softw Pract Exp 40(6):507–542

    Article  Google Scholar 

  • Siebert F (2002) Hard realtime garbage collection in modern object oriented programming languages. Number ISBN: 3-8311-3893-1. Aicas Books

  • Steele GL (1975) Multiprocessing compactifying garbage collection. Commun ACM 18(9):495–508

    Article  MATH  Google Scholar 

  • Wilson PR (1994) Uniprocessor garbage collection techniques. Technical report, University of Texas, January 1994. Expanded version of the IWMM92 paper

  • Yuasa T (1990) Real-time garbage collection on general-purpose machines. J Syst Softw 11(3):181–198

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Martin Schoeberl.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Schoeberl, M. Scheduling of hard real-time garbage collection. Real-Time Syst 45, 176–213 (2010). https://doi.org/10.1007/s11241-010-9095-4

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11241-010-9095-4

Keywords

Navigation