Back to results

Australian National University

Locality aware zeroing : exploiting both hardware and software semantics

Abstract

dc:description.abstract

Both managed and native languages use memory safety techniques to ensure program correctness and as a security defense. A critical element of memory safety is to initialize newly allocated memory to zero before making it available to the program. In this thesis I explore the performance impact of zero initialization and show that it comes with a substantial overhead. I also show that this overhead can be largely removed with new designs that exploit both the language semantics of zero initialization and the hardware semantics of memory hierarchies. Programmers increasingly choose managed languages to develop large scale applications. One of the reasons is that managed languages offer automatic memory management (garbage collection), which protects against memory leaks and dangling pointers. Garbage collection encourages programs to allocate large numbers of small and medium size objects, leading to significant overheads of zero initializing objects - on average the direct cost of zeroing is 4% to 6% and up to 50% of total application time on a variety of modern processors. Zeroing incurs indirect costs as well, which include memory bandwidth consumption and cache displacement. Existing virtual machines (VMs) either: a) minimize direct costs by zeroing in large blocks, or b) minimize indirect costs by integrating zeroing into the allocation sequence to reduce cache displacement. This thesis first describes and evaluates zero initialization costs and the two existing designs. The microarchitectural analysis of prior designs inspires two better designs that exploit concurrency and non-temporal cache-bypassing store instructions to reduce the direct and indirect costs simultaneously. The best strategy is to adaptively choose between the two new designs based on CPU utilization. This approach improves over widely used hot-path zeroing by 3% on average and up to 15% on the newest Intel i7-2600 processor, without slowing down any of the benchmarks. These results indicate that zero initialization is a surprisingly important source of overhead in existing VMs and that our new software strategies are effective at reducing this overhead. These findings also invite other optimizations, including software elision of zeroing and microarchitectural support.

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Yang, Xi

Subjects

dc:subject × 3

Rights

dc:rights
Statement dc:rights
  • Author retains copyright
Language dc:language.iso
en_AU

Identifiers

dc:identifier.*
Dc Identifier Other
b2569989
Local Identifier DOI
10.25911/5d626b97cd1df

Chain of custody

source
Harvested from
Australian National University
Base URL
openresearch-repository.anu.edu.au/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Yang, Xi. Locality aware zeroing : exploiting both hardware and software semantics. 2011. http://hdl.handle.net/1885/149962