Abstract
Garbage collection in the CLDC typically employs a stop-the-world GC algorithm which is performing a complete garbage collection when needed. This technique is unsuitable for the interactive Java embedded system because this can lead to long and unpredictable delays. In this paper, We present a garbage collection algorithm which reduces the average delay time and supports the interactive environment. Our garbage collector is composed of the allocator and the collector. The allocator determines the allocation position of free-list according to object size, and the collector uses an incremental mark-sweep algorithm. The garbage collector is called periodically by the thread scheduling policy and the allocator allocates the objects of marked state during collection cycle. Also, we introduce a color toggle mechanism that changes the meaning of the bit patterns at the end of the collection cycle. We compared the performance of our implementation with stop-the-world mark-sweep GC. The experimental results show that our algorithm reduces the average delay time and that it provides uniformly low response times.
CLDC는 가비지 콜렉션을 위해, 가비지 콜렉션이 필요한 시점에 모든 작업을 수행하는 스탑더 월드 가비지 콜렉션 알고리즘을 일반적으로 사용한다. 이 방법은 길고 예측할 수 없는 지연시간으로 인하여 대화형 자바 임베디드 시스템에서는 부적당하다. 본 논문에서는 평균 지연시간을 줄이고 대화형 환경을 지원하는 가비지 콜렉션 알고리즘을 제안한다. 가비지 콜렉터는 객체의 크기에 따라 할당 위치를 결정하는 할당기와 점진적 마크-회수 알고리즘을 사용하는 콜렉터로 구성된다. 가비지 콜렉터는 스레드 스케줄링 정책에 따라 주기적으로 호출되며, 할당기는 콜렉션 주기 동안 마크된 상태의 객체를 할당한다. 또한 콜렉션 주기의 마지막에 비트 패턴의 의미를 교환하는 칼라토글방식을 사용한다. 제안한 가비지 콜렉터와 스탑더월드 마크-회수 가비지 콜렉터의 성능을 비교하였으며, 이 비교 실험을 통해 평균 지연시간은 감소하고, 균일하고 낮은 응답시간을 제공함을 확인하였다.