5 research outputs found
Recommended from our members
The impact of varying memory region number on RTSJ execution time
Developing a real time, embedded system in Java requires awareness of memory behaviour in addition to program logic. Region-based memory management has certain advantages over garbage collection in terms of predictability; however, the use of regions is in many ways arbitrary, since it is left to the developer to decide on the number of required regions prior to program execution. In theory, a memory model with a large number of regions will negatively impact
the execution time of software since the run-time system has the overhead of managing the space in each of these regions. In this paper, we explore the effect of varying the number of regions on the performance of RTSJ execution times. RTSJ code was used to allocate varying numbers of objects (100 to
2500) into regions and then execution times were recorded. Results suggest that more regions do actually lead to increases in execution time. By applying a relatively simple refactoring to the original code, an improvement in execution times was achieved
Recommended from our members
Optimizing scoped and immortal memory management in real-time java
This thesis was submitted for the degree of Doctor of Philosophy and awarded by Brunel University.The Real-Time Specification for Java (RTSJ) introduces a new memory management model which avoids interfering with the garbage collection process and achieves better deterministic behaviour. In addition to the heap memory, two types of memory areas are provided - immortal and scoped. The research presented in this Thesis aims to optimize the use of the scoped and immortal memory model in RTSJ applications. Firstly, it provides an empirical study of the impact of scoped memory on execution time and memory consumption with different data objects allocated in scoped memory areas. It highlights different characteristics for the scoped memory model related to one of the RTSJ implementations (SUN RTS 2.2). Secondly, a new RTSJ case study which integrates scoped and immortal memory techniques to apply different memory models is presented. A simulation tool for a real-time Java application is developed which is the first in the literature that shows scoped memory and immortal memory consumption of an RTSJ application over a period of time. The simulation tool helps developers to choose the most appropriate scoped memory model by monitoring memory consumption and application execution time. The simulation demonstrates that a developer is able to compare and choose the most appropriate scoped memory design model that achieves the least memory footprint. Results showed that the memory design model with a higher number of scopes achieved the least memory footprint. However, the number of scopes per se does not always indicate a satisfactory memory footprint; choosing the right objects/threads to be allocated into scopes is an important factor to be considered. Recommendations and guidelines for developing RTSJ applications which use a scoped memory model are also provided. Finally, monitoring scoped and immortal memory at runtime may help in catching possible memory leaks. The case study with the simulation tool developed showed a space overhead incurred by immortal memory. In this research, dynamic code slicing is also employed as a debugging technique to explore constant increases in immortal memory. Two programming design patterns are presented for decreasing immortal memory overheads generated by specific data structures. Experimental results showed a significant decrease in immortal memory consumption at runtime
Garbage Collection for Flexible Hard Real-Time Systems
EThOS - Electronic Theses Online ServiceGBUnited Kingdo