ABSTRACT
Arrays are the ubiquitous organization for indexed data. Throughout programming language evolution, implementations have laid out arrays contiguously in memory. This layout is problematic in space and time. It causes heap fragmentation, garbage collection pauses in proportion to array size, and wasted memory for sparse and over-provisioned arrays. Because of array virtualization in managed languages, an array layout that consists of indirection pointers to fixed-size discontiguous memory blocks can mitigate these problems transparently. This design however incurs significant overhead, but is justified when real-time deadlines and space constraints trump performance.
This paper proposes z-rays, a discontiguous array design with flexibility and efficiency. A z-ray has a spine with indirection pointers to fixed-size memory blocks called arraylets, and uses five optimizations: (1) inlining the first N array bytes into the spine, (2) lazy allocation, (3) zero compression, (4) fast array copy, and (5) arraylet copy-on-write. Whereas discontiguous arrays in prior work improve responsiveness and space efficiency, z-rays combine time efficiency and flexibility. On average, the best z-ray configuration performs within 12.7% of an unmodified Java Virtual Machine on 19 benchmarks, whereas previous designs have two to three times higher overheads. Furthermore, language implementers can configure z-ray optimizations for various design goals. This combination of performance and flexibility creates a better building block for past and future array optimization.
- AICAS. Jamaica VM. http://www.aicas.com/.Google Scholar
- B. Alpern, D. Attanasio, J. J. Barton, M. G. Burke, P.Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. Shepherd, S. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeno virtual machine. IBM Systems Journal, 39(1): 211--238, 2000. Google Scholar
Digital Library
- C. S. Ananian and M. Rinard. Data size optimizations for Java programs. In Languages, Compiler, and Tool Support for Embedded Systems (LCTES), pages 59--68, 2003. Google Scholar
Digital Library
- D. Bacon, P. Cheng, and V. T. Rajan. Controlling fragmentation and space consumption in the Metronome, a real-time garbage collector for Java. In Languages, Compiler, and Tool Support for Embedded Systems (LCTES), pages 81--92, 2003. Google Scholar
Digital Library
- D. Bacon, P. Cheng, and V. T. Rajan. A real-time garbage collector with low overhead and consistent utilization. In Principles of Programming Languages (POPL), pages 285--298, 2003. Google Scholar
Digital Library
- E. Berger, K. McKinley, R. Blumofe, and P. Wilson. Hoard: A scalable memory allocator for multithreaded applications. In Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 117--128, 2000. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 169--190, 2006. Google Scholar
Digital Library
- S. M. Blackburn and A. L. Hosking. Barriers: Friend or foe? In International Symposium on Memory Management (ISMM), pages 143--151, 2004. Google Scholar
Digital Library
- S. M. Blackburn and K. S. McKinley. In or out? Putting write barriers in their place. In International Symposium on Memory Management (ISMM), pages 175--184, 2002. Google Scholar
Digital Library
- S. M. Blackburn, P. Cheng, and K. S. McKinley. Myths and Realities: The Performance Impact of Garbage Collection. In Measurement and Modeling of Computer Systems (SIGMETRICS), pages 25--36, 2004. Google Scholar
Digital Library
- R. Bod1k, R. Gupta, and V. Sarkar. ABCD: eliminating array bounds checks on demand. In Programming Language Design and Implementation (PLDI), pages 321--333, 2000. Google Scholar
Digital Library
- G. Chen, M. Kandemir, N. Vijaykrishnan, M. J. Irwin, B. Mathiske, and M. Wolczko. Heap compression for memory-constrained Java environments. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 282--301, 2003. Google Scholar
Digital Library
- C. Click, G. Tene, and M. Wolf. The pauseless GC algorithm. In Virtual Execution Environments (VEE), pages 46--56, 2005. Google Scholar
Digital Library
- Fiji Systems LLC. Fiji VM. http://www.fiji-systems.com/.Google Scholar
- R. Fitzgerald and D. Tarditi. The case for profile-directed selection of garbage collectors. In International Symposium on Memory Management (ISMM), pages 111--120, 2000. Google Scholar
Digital Library
- D. Frampton, S. M. Blackburn, P. Cheng, R. J. Garner, D. Grove, J. E. B. Moss, and S. I. Salishev. Demystifying magic: High-level low-level programming. In Virtual Execution Environments (VEE), pages 81--90, 2009. Google Scholar
Digital Library
- T. Harris, S. Tomic, A. Cristal, and O. Unsal. Dynamic filtering: Multi-purpose architecture support for language runtime systems. In Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 39--52, 2010. Google Scholar
Digital Library
- A. L. Hosking, J. E. B. Moss, and D. Stefanovic. A comparative performance evaluation of write barrier implementations. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 92--109, 1992. Google Scholar
Digital Library
- IBM. Websphere real time. http://www-01.ibm.com/software/webservers/realtime/.Google Scholar
- K. Ishizaki and et al. Design, implementation, and evaluation of optimizations in a just-in-time compiler. In Java Grande, pages 119--128, 1999. Google Scholar
Digital Library
- H. Lieberman and C. E. Hewitt. A real time garbage collector based on the lifetimes of objects. Communications of the ACM (CACM), 26(6):419--429, 1983. Google Scholar
Digital Library
- N. Mitchell and G. Sevitsky. The causes of bloat, the limits of health. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 245--260, 2007. Google Scholar
Digital Library
- N. Nethercote and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In Programming Language Design and Implementation (PLDI), pages 89--100, 2007. Google Scholar
Digital Library
- F. Pizlo. Private communication, 2010.Google Scholar
- F. Pizlo, L. Ziarek, P. Maj, A. Hosking, E. Blanton, and J. Vitek. Schism: Fragmentaton-tolerant real-time garbage collection. In Programming Language Design and Implementation (PLDI), 2010. Google Scholar
Digital Library
- J. S. Quarterman, A. Silberschatz, and J. L. Peterson. 4.2BSD and 4.3BSD as examples of the UNIX system. ACM Computing Surveys, 17(4):379--418, 1985. Google Scholar
Digital Library
- J. B. Sartor, M. Hirzel, and K. S. McKinley. No bit left behind: The limits of heap data compression. In International Symposium on Memory Management (ISMM), pages 111--120, 2008. Google Scholar
Digital Library
- F. Siebert. Eliminating external fragmentation in a non-moving garbage collector for Java. In Compilers, Architectures, and Synthesis for Embedded Systems (CASES), pages 9--17, 2000. Google Scholar
Digital Library
- SPEC corporation. SPECjbb2005 Java server benchmark, 2005. ftp://ftp.spec.org/jbb2005/.Google Scholar
- D. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. In Software Engineering Symposium on Practical Software Development Environments (SESPSDE), pages 157--167, 1984. Google Scholar
Digital Library
- C. Zilles. Accordion arrays: Selective compression of unicode arrays in Java. In International Symposium on Memory Management (ISMM), pages 55--66, 2007. Google Scholar
Digital Library
Index Terms
Z-rays: divide arrays and conquer speed and flexibility
Recommendations
Z-rays: divide arrays and conquer speed and flexibility
PLDI '10Arrays are the ubiquitous organization for indexed data. Throughout programming language evolution, implementations have laid out arrays contiguously in memory. This layout is problematic in space and time. It causes heap fragmentation, garbage ...
Defunctionalizing push arrays
FHPC '14: Proceedings of the 3rd ACM SIGPLAN workshop on Functional high-performance computingRecent work on embedded domain specific languages (EDSLs) for high performance array programming has given rise to a number of array representations. In Feldspar and Obsidian there are two different kinds of arrays, called Pull and Push arrays. Both ...
Representations of Recursively Enumerable Array Languages by Contextual Array Grammars
Contagious Creativity - In Honor of the 80th Birthday of Professor Solomon MarcusThe main result proved in this paper shows that the natural embedding of any recursively enumerable one-dimensional array language in the two-dimensional space can be characterized by the projection of a two-dimensional array language generated by a ...







Comments