21.01.2013 Views

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Code Arrangement of Embedded Java Virtual Mach<strong>in</strong>e<br />

for NAND Flash Memory *<br />

Chun-Chieh L<strong>in</strong> and Chuen-Liang Chen<br />

Department of <strong>Computer</strong> <strong>Science</strong> and Information Eng<strong>in</strong>eer<strong>in</strong>g,<br />

National Taiwan University, Taipei,<br />

10764, Taiwan<br />

{d93020,clchen}@csie.ntu.edu.tw<br />

Abstract. This paper proposed a systematic approach to optimize J2ME KVM<br />

runn<strong>in</strong>g directly on NAND flash memories (XIP). The ref<strong>in</strong>ed KVM generated<br />

cache misses 96% less than the orig<strong>in</strong>al version did. The approach appended a<br />

post processor to the compiler. The post processor relocates and rewrites basic<br />

blocks with<strong>in</strong> the VM <strong>in</strong>terpreter us<strong>in</strong>g a unique mathematical model. This<br />

approach analyzed not only static control flow graph but also the pattern of<br />

bytecode <strong>in</strong>struction streams, s<strong>in</strong>ce we found the <strong>in</strong>put sequence drives the<br />

program flow of the VM <strong>in</strong>terpreter. The proposed mathematical model is used<br />

to express the execution flows of Java <strong>in</strong>structions of real applications.<br />

Furthermore, we concluded the mathematical model is a k<strong>in</strong>d of graph partition<br />

problem, and this f<strong>in</strong>d<strong>in</strong>g helped the relocation process to move program blocks<br />

to proper NAND flash pages. The ref<strong>in</strong>ement approach dramatically improved<br />

the locality of the virtual mach<strong>in</strong>e thus reduced cache miss rates. Our technique<br />

can help J2ME-enabled devices to run faster and extend longer battery life. The<br />

approach also br<strong>in</strong>gs potential for designers to <strong>in</strong>tegrate the XIP function <strong>in</strong>to<br />

System-on-Chip thanks to lower demand for cache memory.<br />

Keywords: NAND flash memory, code placement, cache miss, Java virtual<br />

mach<strong>in</strong>e, <strong>in</strong>terpreter, power-sav<strong>in</strong>g, memory management, embedded system.<br />

1 Introduction<br />

Java platform extensively exist <strong>in</strong> all k<strong>in</strong>ds of embedded and mobile devices. It is no<br />

doubt that Java Platform, Micro Edition (Java ME) [1] has become a de facto<br />

standard platform of smart phone. The Java virtual mach<strong>in</strong>e (it is KVM <strong>in</strong> Java ME)<br />

is a key component that affects performance and power consumptions.<br />

NAND flash memories come with serial bus <strong>in</strong>terface. It does not allow random<br />

access and the CPU must read out the whole page at a time. This property leads a<br />

processor hardly to execute programs stored <strong>in</strong> NAND flash memories <strong>in</strong> “execute-<strong>in</strong>place”<br />

(XIP) fashion. However, NAND flash memories are very fast <strong>in</strong> writ<strong>in</strong>g<br />

operation, and the most important of all, the technology has advantages <strong>in</strong> offer<strong>in</strong>g<br />

* We acknowledge the support for this study through grants from National <strong>Science</strong> Council of<br />

Taiwan (NSC 95-2221-E-002 -137).<br />

P. Stenström et al. (Eds.): HiPEAC 2008, LNCS <strong>4917</strong>, pp. 369–383, 2008.<br />

© Spr<strong>in</strong>ger-Verlag Berl<strong>in</strong> Heidelberg 2008

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!