Lightweight and block-level concurrent sweeping for javascript garbage collection

Author:

Kim Hongjune1,Bak Seonmyeong1,Lee Jaejin1

Affiliation:

1. Seoul National University, Seoul, South Korea

Abstract

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.

Funder

National Research Foundation of Korea

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3