Garbage collection is esprcially useful in a long-lived systrm because the eggects of a small program flae that loses track of memory wii accumulate until the system runs out if memory.Many of long-lived systems arereal-time,but most garbage collection algorithms are not suitable for real-time systems.
A real-time system is one that must respind to events within a specified period of time,so the performance of real-time systems must be predictable,often to within a few milliseconds. Most garbage collection algorithms cause unexpected quarter-secind or longer delays,and so are not suitable for suitable for such systems.In fact,real-time programmers often consider latencies caused by virtual memory to be unacceptable,and so real-time operating systems typically either do not support virtual memory or provide some way to ensure that all of a program all of a program is in physical memory.
A garbage collection algorithm's real-time bounds are improved by making it lazy,i.e.,by breaking large units of work into smallerunits of work and delaying the small units of work as long as possible.Mark-sweep garbage collectors and reference-counting garbage collectors can be made real-time without any extra hardware support[6,14].However,the mast efficient