Scheduling Garbage Collection in Embedded Systems

The complexity of systems for automatic control and other safety-critical applications grows rapidly. Computer software represents an increasing part of the complexity. As larger systems are developed, we need to find scalable techniques to manage the complexity in order to guarantee high product quality. Memory management is a key quality factor for these systems. Automatic memory management, or garbage collection, is a technique that significantly reduces the complex problem of correct memory management. The risk of software errors decreases and development time is reduced. Garbage collection techniques suitable for interactive and soft real-time systems exist, but few approaches are suitable for systems with hard real-time requirements, such as control systems (embedded systems). One part of the problem is solved by incremental garbage collection algorithms, which have been presented before. We focus on the scheduling problem which forms the second part of the problem, i.e. how the work of a garbage collector should be scheduled in order to disturb the application program as little as possible. It is studied how a priori scheduling analysis of systems with automatic memory management can be made. The field of garbage collection research is thus joined with the field of scheduling analysis in order to produce a practical synthesis of the two fields. A scheduling strategy is presented that employs the properties of control systems to ensure that no garbage collection work is performed during the execution of critical processes. The hard real-time part of the system is thus never disturbed by garbage collection work. Existing incremental garbage collection algorithms are adapted to the presented strategy. Necessary modifications of the algorithms and the real-time kernel are discussed. A standard scheduling analysis technique, rate monotonic analysis, is extended in order to make a priori analysis of the schedulability of the garbage collector possible. The scheduling algorithm has been implemented in an industrially relevant real-time environment in order to show that the strategy is feasible in practice. The experimental evaluation shows that predictable behaviour and sub-millisecond worst-case delays can be achieved on standard hardware even by a non-optimized prototype garbage collector. (Less)

[1]  Guy L. Steele,et al.  Multiprocessing compactifying garbage collection , 1975, CACM.

[2]  Steffen Grarup,et al.  Incremental Mature Garbage Collection Using the Train Algorithm , 1995, ECOOP.

[3]  David M. Ungar,et al.  Generation Scavenging: A non-disruptive high performance storage reclamation algorithm , 1984, SDE 1.

[4]  D. H. Mellor,et al.  Real time , 1981 .

[5]  Stein Krogdahl Multiple inheritance in Simula-like languages , 1985, BIT Comput. Sci. Sect..

[6]  Mike Williams,et al.  Implementing a functional language for highly parallel real time applications , 1992 .

[7]  Butler W. Lampson,et al.  Experience with processes and monitors in Mesa , 1980, CACM.

[8]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[9]  Daniel G. Bobrow,et al.  An efficient, incremental, automatic garbage collector , 1976, CACM.

[10]  Hans-Juergen Boehm,et al.  Garbage collection in an uncooperative environment , 1988, Softw. Pract. Exp..

[11]  Karl Johan Åström,et al.  Computer-Controlled Systems: Theory and Design , 1984 .

[12]  Marvin Minsky,et al.  A LISP Garbage Collector Algorithm Using Serial Secondary Storage , 1963 .

[13]  Lars-Erik Thorelli A fast compactifying garbage collector , 1976 .

[14]  J. Eliot B. Moss,et al.  Incremental Collection of Mature Objects , 1992, IWMM.

[15]  E. C. Hodgman,et al.  A conceptual framework to guide nursing curriculum. , 1973, Nursing forum.

[16]  Friedrich L. Bauer,et al.  Report on the algorithmic language ALGOL 60 , 1960, Commun. ACM.

[17]  Robert Virding A Garbage Collector for the Concurrent Real-Time Language Erlang , 1995, IWMM.

[18]  George E. Collins,et al.  A method for overlapping and erasure of lists , 1960, CACM.

[19]  Ralph E. Johnson Reducing the latency of a real-time garbage collector , 1992, LOPL.

[20]  Roger Henriksson,et al.  Predictable Automatic Memory Management for Embedded Systems , 1997 .

[21]  Bjarne Stroustrup,et al.  The Design and Evolution of C , 1994 .

[22]  J. Lindskov Knudsen Object-oriented environments : the Mjølner approach , 1993 .

[23]  Jean D. etc. Ichbiah Reference Manual for the ADA Programming Language , 1983 .

[24]  Klas Nilsson,et al.  Industrial Robot Programming , 1996 .

[25]  Taiichi Yuasa,et al.  Real-time garbage collection on general-purpose machines , 1990, J. Syst. Softw..

[26]  Rodney A. Brooks,et al.  Trading data space for reduced time and code space in real-time garbage collection on stock hardware , 1984, LFP '84.

[27]  Thomas W. Christopher,et al.  Reference count garbage collection , 1984, Softw. Pract. Exp..

[28]  Leslie Lamport,et al.  On-the-fly garbage collection: an exercise in cooperation , 1975, CACM.

[29]  Niklaus Wirth,et al.  Pascal User Manual and Report , 1991, Springer New York.

[30]  Michael L. Dertouzos,et al.  Control Robotics: The Procedural Control of Physical Processes , 1974, IFIP Congress.

[31]  D. L. Harris,et al.  A designer's perspective of the Hawk multiprocessor operating system kernel , 1989, OPSR.

[32]  S. L. Graham,et al.  List Processing in Real Time on a Serial Computer , 1978 .

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

[34]  Anders Ive,et al.  Runtime performance evaluation of embedded software , 1998 .

[35]  Richard P. Brent,et al.  Efficient implementation of the first-fit strategy for dynamic storage allocation , 1989, TOPL.

[36]  David A. Moon,et al.  Garbage collection in a large LISP system , 1984, LFP '84.

[37]  Boris Magnusson,et al.  Garbage Collection for Control Systems , 1995, IWMM.

[38]  Paul R. Wilson,et al.  Uniprocessor Garbage Collection Techniques , 1992, IWMM.

[39]  Chris J. Cheney A nonrecursive list compacting algorithm , 1970, Commun. ACM.

[40]  William M. Waite,et al.  An efficient machine-independent procedure for garbage collection in various list structures , 1967, CACM.

[41]  Richard G. Larson Minimizing Garbage Collection as a Function of Region Size , 1977, SIAM J. Comput..

[42]  Benjamin G. Zorn,et al.  Comparative performance evaluation of garbage collection algorithms , 1989 .

[43]  John Michael Robson,et al.  An Estimate of the Store Size Necessary for Dynamic Storage Allocation , 1971, JACM.

[44]  Willis W. Myers How Real Is Real Time? , 1976, Other Conferences.

[45]  Philip Wadler,et al.  Analysis of an algorithm for real time garbage collection , 1976, CACM.

[46]  Robert Fenichel,et al.  A LISP garbage-collector for virtual-memory computer systems , 1969, CACM.

[47]  Henry Lieberman,et al.  A real-time garbage collector based on the lifetimes of objects , 1983, CACM.

[48]  Mathai Joseph,et al.  Finding Response Times in a Real-Time System , 1986, Comput. J..

[49]  Glenn Krasner,et al.  Smalltalk-80: bits of history, words of advice , 1983 .

[50]  Daniel G. Bobrow,et al.  Managing Reentrant Structures Using Reference Counts , 1980, ACM Trans. Program. Lang. Syst..

[51]  Alan Burns,et al.  Hard Real-Time Scheduling: The Deadline-Monotonic Approach , 1991 .

[52]  Johan Eker,et al.  A Framework for Dynamically Configurable Embedded Controllers , 1997 .

[53]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[54]  Rafael Dueire Lins Cyclic Reference Counting with Lazy Mark-Scan , 1992, Inf. Process. Lett..

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

[56]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[57]  Joel F. Bartlett,et al.  Compacting garbage collection with ambiguous roots , 1988, LIPO.

[58]  Scott Shenker,et al.  Mostly parallel garbage collection , 1991, PLDI '91.

[59]  Jacques Cohen,et al.  Garbage Collection of Linked Data Structures , 1981, CSUR.

[60]  Paul R. Wilson,et al.  Caching considerations for generational garbage collection , 1992, LFP '92.

[61]  Scott Nettles,et al.  Real-time replication garbage collection , 1993, PLDI '93.

[62]  Krithi Ramamritham,et al.  The Spring kernel: a new paradigm for real-time operating systems , 1989, OPSR.

[63]  Giorgio Buttazzo,et al.  Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications , 1997 .

[64]  Henry G. Baker,et al.  The treadmill: real-time garbage collection without motion sickness , 1992, SIGP.

[65]  Dan Hildebrand,et al.  An Architectural Overview of QNX , 1992, USENIX Workshop on Microkernels and Other Kernel Architectures.

[66]  Frank Jackson,et al.  Tenuring policies for generation-based storage reclamation , 1988, OOPSLA '88.

[67]  Leif Andersson,et al.  A Real-Time Programming Environment and a Real-Time Kernel , 1991 .

[68]  Henry Ledgard,et al.  Reference Manual for the ADA® Programming Language , 1983, Springer New York.