没有合适的资源?快使用搜索试试~ 我知道了~
Nonvolatile Main Memory Aware Garbage Collection in High-Level L...
1 下载量 116 浏览量
2021-02-22
03:00:33
上传
评论
收藏 1.42MB PDF 举报
温馨提示
Non-volatile memories (NVMs) such as Phase Change Mem-<br>ory (PCM) have been considered as promising candidates of<br>next generation main memory for embedded systems due to<br>their attractive features. These features include low power,<br>high density, and better scalability. However, most exist-<br>ing NVMs suer from two drawbacks, namely, limited write<br>endurance and expensive write operation in terms of both<br>time and energy. These problems are worsen when modern<br>hig
资源推荐
资源详情
资源评论
Nonvolatile Main Memory Aware Garbage Collection in
High-Level Language Virtual Machine
Chen Pan
1
, Mimi Xie
1
, Chengmo Yang
2
, Zili Shao
3
, and Jingtong Hu
1
1
School of Electrical and Computer Engineering, Oklahoma State University, Stillwater, OK, 74078, USA.
2
Department of Electrical and Computer Engineering, University of Delaware, Newark, DE, 19716, USA.
3
Department of Computing, The Hong Kong Polytechnic University, Hung Hom, Hong Kong.
{chen.pan,mimix,jthu}@okstate.edu, chengmo@udel.edu, cszlshao@comp.polyu.edu.hk
ABSTRACT
Non-volatile memories (NVMs) such as Phase Change Mem-
ory (PCM) have been considered as promising candidates of
next generation main memory for embedded systems due to
their attractive features. These features include low power,
high density, and better scalability. However, most exist-
ing NVMs suffer from two drawbacks, namely, limited write
endurance and expensive write operation in terms of both
time and energy. These problems are worsen when modern
high-level languages employ virtual machine with garbage
collector that generates a large amount of extra writes on
non-volatile main memory. To tackle this challenge, this pa-
per proposes three techniques: Living Objects Remapping
(LORE), Dead Object Stamping (DOS), and Smart Wip-
ing with Maximum Likelihood Estimation (SMILE) to re-
duce the unnecessary writes when garbage collector handles
objects. The experimental results show that the proposed
techniques not only significantly reduce the writes during
each garbage collection cycle but also greatly improve the
performance of virtual machine.
1. INTRODUCTION
Non-volatile memories (NVMs) such as Resistive Ran-
dom Access Memory (RRAM) [22, 21, 9] and Phase Change
Memory (PCM) [11, 13, 19, 23], have many attractive fea-
tures for embedded systems to employ them as main mem-
ory. Those features include ultra low leakage power, high-
density, better scalability, non-volatility, and high immunity
to soft errors, which enable embedded systems to achieve
longer battery life, large memory capacity, and better re-
liability. However, NVMs also suffer from two drawbacks:
limited write endurance and expensive write operation in
terms of time and energy.
These problems will become even worse when high-level
programming language are used to develop embedded ap-
plications [2, 12, 16]. High-level languages, such as Java
and Python, enable fast application development. However,
these programming languages need underlying High-Level
.
Language Virtual Machine (HLVM) [20, 4] support. H-
LVMs ease the application development by taking care of
the runtime memory management. One of the main func-
tions of HLVMs is garbage collection (GC) [10, 17, 5], which
is responsible for recycling unused heap memory to reduce
both memory fragmentation and the risk of triggering “out
of memory” error. During GC, memory contents in the heap
will be moved frequently and a large number of writes will
be generated on the main memory. Without any optimiza-
tion, the massive extra writes generated by the HLVMs will
worsen the situation of NVMs when they are adopted as
main memory for embedded systems.
To avoid this undesirable situation, this paper focuses on
reducing the number of writes on non-volatile main memo-
ry (NVMM) generated by the garbage collector in HLVM.
To the best of our knowledge, this is the first work that
considers the effect of HLVM on NVMM due to the extra
writes caused by GC. In particular, we propose NVM-aware
GC, a non-volatile main memory aware garbage collection,
composed of three techniques that can be incorporated in
high level language virtual machine to improve its NVMs
friendliness. These three techniques are:
1) A Living Objects Remapping (LORE) algorithm that
eliminates the write operations on NVMM when GC
moves objects;
2) A Dead Objects Stamping (DOS) algorithm that re-
duces write operations by reserving the unused heap
memory instead of releasing it to the operating system
(OS);
3) A Smart Wiping with Maximum Likelihood Estima-
tion (SM ILE) algorithm that estimates the amount
of memory space needed to be released back to OS
based on maximum likelihood estimation. It balances
the NVMM lifetime extension and system performance
overhead.
Out work is based on the popular Generational Mark and
Sweep [10] garbage collection. However, the proposed tech-
niques can also be easily extended to other GCs. Experimen-
tal studies show that the proposed NVM-aware GC gener-
ates 40% less write operations compared with the tradition-
al Generation Mark
Sweep, thus making it more suitable for
NVMM with constrained lifetime.
The rest of the paper is organized as follows. Section 2
gives a brief introduction of the background and related
work. Section 3 illustrates the main ideas with a motiva-
tional example. In Section 4, the three proposed techniques
LORE, DOS, and SM ILE are introduced one by one. Ex-
perimental results are presented in Section 5. Finally, Sec-
978-1-4673-8079-9/15/$31.00 ©2015 IEEE 197
tion 6 concludes this work.
2. BACKGROUND AND RELATED WORK
Recent advances in Non-Volatile Memory (NVM) [3, 23,
7] technologies such as flash memory [3, 7], Phase Change
Memory (PCM), Spin-Transfer Torque Random Access Mem-
ory (STT-RAM) [15, 24, 14], and Ferroelectric Random Ac-
cess Memory (FeRAM) [18, 8] have attracted great research
interests due to their promising features. These features in-
clude high density, power-economy, low-cost, non-volatility
properties, high immunity to soft errors, etc. As tradition-
al CMOS-based SRAM and DRAM are experiencing high
leakage power and have scalability issues, these NVMs be-
come viable candidates for traditional DRAM and SRAM
replacements.
However, the deployment of NVMs is not trivial. Compar-
ing with SRAM or DRAM, almost all of the NVMs suffer
from two major drawbacks. First, they have limited en-
durance compared with their counterpart. Second, the write
operation normally consumes more energy and takes longer
time to complete than the read operation. These drawbacks
become even worse when softwares, such as HLVM, generate
a large number of writes on NVMs.
HLVMs are platforms where high-level programming lan-
guages (HLLs) are implemented. HLVM acts as a single
program on OS. Each time when HLVM runs, it is alternat-
ing between two types of execution cycles. One is program
running cycle and the other is GC cycle. In program run-
ning cycle, objects are created. If objects occupy too much
heap space, GC will be triggered. The program execution
will be hung up and HLVM moves into GC cycle. GC, a key
component of HLVM, plays a major role in maintaining H-
LVM’s efficiency. Generally, GC is responsible for releasing
memory space of the dead objects and moving the existing
objects to reduce memory fragmentation to improve soft-
ware efficiency.
Several different GC have been developed, including Mark-
Sweep, Mark-Compact, and Generational-MS. Mark-Sweep
first marks dead objects and then sweep them at the end
of GC cycle. As shown in Figure 1, Mark-Sweep gradual-
ly generates a large amount of memory fragmentation and
slows down the program as a result. To tackle this limita-
tion, Mark-Compact was proposed to compact the memory
space of the living objects together for better management.
The mechanism of Mark-Compact is illustrated in Figure 2.
While Mark-Compact eliminates memory fragmentation, it
unfortunately introduces a lot of extra write operations for
moving objects, thus affecting GC performance.
This paper focuses on Generational-MS, a hybrid GC mech-
anism of Mark-Sweep and Generational, which is popular in
modern high-level languages such as Java. Generational-
MS divides memory space into several disjoint regions (de-
noted as generations). This paper specifically considers a
two-generation GC wherein two regions, namely Nursery
and Mature are employed. The Nursery region is reserved
for new objects, while the Mature region are used to store
old generation objects. The age of the objects depends on
the number of GC cycles which they have survived. When
Nursery becomes full, GC-Nursery will be triggered over this
area. This procedure wipes out dead objects and promotes
objects that lived long enough into the Mature region. Sim-
ilarly, when Mature becomes full, GC-Mature will be trig-
gered to wipe out the dead objects among the whole Ma-
Figure 1: Mark-Sweep Garbage Collection
Figure 2: Mark-Compact Garbage Collection
ture space. Overall, by adopting this two-region organiza-
tion, Generational-MS reduces memory fragmentation and
requires fewer object movement (only across region) than
Mark-Compact.
To summarize, most GC schemes introduce extra memory
writes to move objects, in order to reduce memory fragmen-
tation. In most cases a program has many temporary objects
which dies quickly. This will cause GC to be triggered fre-
quently, engendering a large number of write operations to
the heap region. These extra writes not only degrade GC
performance, but also hurt the lifetime of NVM-based main
memory. This motivates us to develop a NVM-aware GC,
aiming at reducing unnecessary writes on NVMM during
each GC cycle.
3. MOTIVATIONAL EXAMPLE
In this section, a motivational example is used to show
that garbage collection in HLVM inevitably triggers extra
write operations, which will affect the lifetime of NVM-based
Main Memory.
For illustration purpose, in this example the heap is di-
vided into two regions, namely, Mature and Nursery. Each
region has two memory blocks. These four memory blocks
will be mapped to four physical memory blocks. Each newly
created object has the size of one memory block and will first
be stored in Nursery. Once an object in the Nursery region
has survived two GC cycles, it will be moved to the Mature
region at the end of the 2
nd
GC cycle. In this example, four
objects, namely, O
1
, O
2
, O
3
, and O
4
, are generated sequen-
tially. Whenever the Nursery or the Mature region is full,
198
剩余9页未读,继续阅读
资源评论
weixin_38651540
- 粉丝: 5
- 资源: 914
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功