Lightweight and block-level concurrent sweeping for javascript garbage collection

JavaScript is a dynamic-typed language originally developed for the purpose of giving dynamic client-side behaviors to web pages. It is mainly used in web application development and because of its popularity and rapid development style it is now also used in other types of applications. Increasing...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:SIGPLAN notices 2014-05, Vol.49 (5), p.155-164
Hauptverfasser: Kim, Hongjune, Bak, Seonmyeong, Lee, Jaejin
Format: Artikel
Sprache:eng
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:JavaScript is a dynamic-typed language originally developed for the purpose of giving dynamic client-side behaviors to web pages. It is mainly used in web application development and because of its popularity and rapid development style it is now also used in other types of applications. Increasing data processing requirements and growing usage in more resource-limited environments, such as mobile devices, has given demands for JavaScript implementations to handle memory more efficiently through garbage collection. Since aggressive use of time consuming operations in garbage collection can slow down the JavaScript application, there is a trade-off relationship between the effectiveness and the execution time of garbage collection. In this paper, we present a lightweight, block-level concurrent sweeping mechanism for a mark-and-sweep garbage collector. The sweeping process is detached to an additional thread to eagerly collect free memory blocks and recycle it. To minimize the overhead that comes from the synchronization between the mutator thread and the new sweeping thread, we have chosen a course grained block-level collecting scheme for sweeping. To avoid contention that comes from object destruction, we execute the object destruction phase concurrently with the foreground marking phase. We have implemented our algorithm in JavaScript Core (JSC) engine embedded in the WebKit browser that uses a variant of mark-and-sweep algorithm to manage JavaScript objects. The original garbage collection implementation performs lazy sweeping that cannot reuse the free blocks. We evaluate our implementation on an ARM-based mobile system and show that memory utilization of the system is significantly improved without performance degradation.
ISSN:0362-1340
1558-1160
DOI:10.1145/2666357.2597824