Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Shared heap management for memory-limited java virtual machines

Published: 29 January 2008 Publication History

Abstract

One scarce resource in embedded systems is memory. Multitasking makes the lack of memory problem even worse. Most current embedded systems, which do not provide virtual memory, simply divide physical memory and evenly assign contiguous memory chunks to multiple applications. Such simple memory management can frequently cause the lack of available memory for some applications, while others are not using the full amount of assigned memory. To overcome inefficiency in current memory management, we present an efficient heap management scheme that allows multiple applications to share heap space. To reduce overall heap memory usage, applications adaptively acquire subheaps out of shared pool of memory and release surplus subheaps to shared pool. As a result, applications see noncontiguous multiple subheaps as a heap in their address space. We target Java applications to implement our heap-sharing scheme in the KVM from Sun Microsystems. To protect fragmented heap space with a limited number of regions in memory protection unit (MPU), we maintain only a limited number of subheaps. We experimentally evaluate our heap management scheme with J2ME MIDP applications. Our static and dynamic schemes reduce heap memory usage, on average, by 30 and 27%, respectively. For both schemes, overheads are kept low. The execution times in our schemes are increased only by 0.01% for static scheme and 0.35% for dynamic scheme, on average.

References

[1]
Chen, G., Shetty, R., Kandemir, M., Vijaykrishnan, N., Irwin, M. J., and Wolczko, M. 2002. Tuning garbage collection for reducing memory system energy in an embedded java environment. ACM Transactions on Embedded Computing Systems 1, 1, 27--55.
[2]
Choi, Y. and Han, H. 2006. Protected heap sharing for memory-constrained java environments. In Proceedings of the 2006 International Conference on Compilers, Architectures and Synthesis for Embedded Systems. 212--222.
[3]
Griffin, P., Srisa-an, W., and Chang, J. M. 2005. An energy efficient garbage collector for java embedded devices. In Proceedings of the 2005 ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems. 230--238.
[4]
Insight Software Solutions, Inc. MacroExpress® The Windows Automation Tool. Insight software solutions, Inc., http://www.macros.com.
[5]
Johnes, R. and Lins, R. 1996. Garbage Collection: Algorithms for Automatic Dynamic Memory management. Wiley, New York.
[6]
Knuth, D. E. 1997. The Art of Computer Programming Volume 1: Fundamental Algorithms. Second Edition. Addison-Wesley, Reading, MA.
[7]
midlet.org. Wireless Java Download. midlet.org, http://midlet.org.
[8]
Minoraxis, Inc. Mobile games, BLOODY GHOST. Minoraxis, Inc., http://www.minoraxis.com/mobile.html.
[9]
Shaham, R., Kolodner, E. K., and Sagiv, M. 2000. On the effectiveness of gc in java. In Proceedings of the 2nd International Symposium on Memory Management. 12--17.
[10]
Shaham, R., Kolodner, E. K., and Sagiv, M. 2001. Heap profiling for space-efficient java. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation. 104--113.
[11]
Sloss, A., Symes, D., and Wright, C. 2004. ARM System Developer's Guide. Morgan Kaufmann, San Francisco, CA.
[12]
Sun Microsystems. 2002a. Connected, Limited Device Configuration (CLDC) 1.0.4. Sun Microsystems, http://java.sun.com/j2me.
[13]
Sun Microsystems. 2002b. KVM Porting Guide, CLDC, Version 1.0.4, Java 2 Platform, Micro Edition. Sun Microsystems, Santa Clara, CA.
[14]
Sun Microsystems. 2002c. Mobile Information Device Profile (MIDP) v2.0. Sun Microsystems, http://java.sun.com/j2me.
[15]
Tual, J. 1999. Massc: A generic architecture for multiapplication smart cards. IEEE Micro 19, 5, 52--61.
[16]
Wilson, P. R., Johnstone, M. S., Neely, M., and Boles, D. 1995. Dynamic storage allocation: A survey and critical review. In Proceedings of International Workshop on Memory Management.
[17]
Yang, T., Berger, E. D., Hertz, M. H., Kaplan, S. F., and Moss, J. E. B. 2004. Automatic heap sizing: Taking real memory into account. In Proceedings of the 4th International Symposium on Memory Management. 61--72.

Cited By

View all

Recommendations

Reviews

Andreas E. Schwald

Multitasking in embedded systems without virtual memory is often done in a very simplistic way: by allocation of a fixed storage segment to a task. A more flexible strategy of heap allocation in a shared storage pool has to deal with the management of multiple fragmented heap areas, and the protection of these areas from undesirable accesses of other programs or tasks. The authors propose a two-level memory management scheme for "sharing and protecting fragmented heaps" to "reduce a considerable amount of memory footprint," with "almost no increase of execution time by carefully triggering garbage collection and live object compaction." The scheme relies on the capabilities of ARM processors (Sun Microsystems). The management of fragmented heap areas uses an adapted form of Kernel-based Virtual Machine (KVM) (portable Java Virtual Machine (JVM) for small, resource-constrained devices) and modified memory allocators/garbage collectors in JVMs. On the global level, subheaps (heap-area fragments) from a shared memory pool are allocated according to an address-ordered first-fit strategy. On the application level, a mark-sweep compact collector in one or more subheaps is used. This includes compaction across noncontiguous regions, and the release of surplus space to the global memory manager. For the selection of the sizes of heap areas, two strategies are discussed: deduction of subheap sizes from profiling information (available before program execution), and adaptive increasing/decreasing of sizes. Experimental results are given for several benchmark examples, showing significant reduction in memory footprints and a marginal increase in execution time. Experiments for other environments/platforms may confirm the value of this approach for heap-memory usage. The performance may largely depend on hardware features, operating system characteristics, and the garbage collection parameters. Though the discussion is rather informal, the paper contains useful information for people dealing with the intricacies of runtime systems for embedded applications. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Embedded Computing Systems
ACM Transactions on Embedded Computing Systems  Volume 7, Issue 2
February 2008
412 pages
ISSN:1539-9087
EISSN:1558-3465
DOI:10.1145/1331331
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Journal Family

Publication History

Published: 29 January 2008
Accepted: 01 June 2007
Revised: 01 June 2007
Received: 01 January 2007
Published in TECS Volume 7, Issue 2

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Dynamic memory management
  2. garbage collection
  3. heap sharing
  4. memory protection unit

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)2
Reflects downloads up to 23 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media