Abstract:
Traditionally, low-level languages such as C have been used for real-time embedded systems due to the fact that they incur less overhead and simplify timing analysis. However, most low-level languages require programmers to manually manage memory. As the complexity of embedded systems grow, manual memory management becomes increasingly di cult. Higher level languages such as Java employ a garbage collector to automatically manage memory - decreasing burden on the programmer and thereby increasing their e ciency. There are several initiatives for using Java in real-time systems. One of these initiatives is the Java Optimized Processor (JOP) which is a time-predictable processor that natively executes Java bytecode. JOP includes a garbage collector that is written in Java. However, this collector is a copying collector which spends a signi cant amount of time copying allocated objects in order to prevent fragmentation in the heap memory where objects are allocated. This introduces overhead which can make the collector unsuitable for certain real-time systems. This thesis presents a new garbage collector for JOP named AucklandGC which uses a fragmented allocation approach to avoid the need to spend cycles copying objects on the heap. The performance improvement of this approach was tested by implementing the collector in Java. A hardware version of AucklandGC was also developed to further improve performance. Benchmarks of AucklandGC show that the use of the fragmented allocation approach results in greatly reduced garbage collection times when compared to JOP's built-in garbage collector. The hardware version of AucklandGC shows even greater improvements in performance.