skip to main content
10.1145/1006209.1006242acmconferencesArticle/Chapter ViewAbstractPublication PagesicsConference Proceedingsconference-collections
Article

Implicit java array bounds checking on 64-bit architecture

Published: 26 June 2004 Publication History

Abstract

Interest in using Java for high-performance parallel computing has increased in recent years. One obstacle that has inhibited Java from widespread acceptance in the scientific community is the language requirement that all array accesses must be checked to ensure they are within bounds. In practice, array bounds checking in scientific applications may increase execution time by more than a factor of 2. Previous research has explored optimizations to statically eliminate bounds checks, but the dynamic nature of many scientific codes makes this difficult or impossible.Our approach is instead to create a new Java implementation that does not generate explicit bounds checks. It instead places arrays inside of Index Confinement Regions (ICRs), which are large, isolated, mostly unmapped virtual memory regions. Any array reference outside of its bounds will cause a protection violation; this provides implicit bounds checking. Our results show that our new Java implementation reduces the overhead of bounds checking from an average of 63% to an average of 9% on our benchmarks.

References

[1]
P. Artigas, M. Gupta, S. Midkiff, and J. Moreira. Automatic loop transformations and parallelization for Java. In International Conference on Supercomputing, pages 1--10, May 2000.]]
[2]
D. Bailey, J. Barton, T. Lasinski, and H. Simon. The NAS parallel benchmarks. RNR-91-002, NASA Ames Research Center, Aug. 1991.]]
[3]
C. Bentley, S. A. Watterson, and D. K. Lowenthal. Operating system support for low-cost array bounds checking on 64-bit architectures. Technical report, University of Georgia, Nov. 2003.]]
[4]
R. Bodik, R. Gupta, and V. Sarkar. ABCD: eliminating array bounds checks on demand. In SIGPLAN Conference on Programming Language Design and Implementation, pages 321--333, 2000.]]
[5]
J. S. Chase, H. M. Levy, M. J. Feeley, and E. D. Lazowska. Sharing and protection in a single address space operating system. ACM Transactions on Computer Systems, 12(4):271--307, May 1994.]]
[6]
T. Chiueh. Personal communication. Oct. 2002.]]
[7]
T. Chiueh and F. Hsu. RAD: A compile-time solution to buffer overflow attacks. In International Conference on Distributed Computing Systems, Apr 2001.]]
[8]
C. Cowan, C. Pu, D. Maier, J. Walpole, P. Bakke, S. Beattie, A. Grier, P. Wagle, Q. Zhang, and H. Hinton. StackGuard: Automatic adaptive detection and prevention of buffer-overflow attacks. In Proc. 7th USENIX Security Conference, pages 63--78, Jan 1998.]]
[9]
M. Frumkin, M. Schultz, H. Jin, and J. Yan. Implementation of the NAS parallel benchmarks in Java. NAS-02-009, NASA Ames Research Center.]]
[10]
R. Gupta. Optimizing array bound checks using flow analysis. ACM Letters on Programming Languages and Systems, 2(1-4):135--150, March-December 1993.]]
[11]
A. Itzkovitz and A. Schuster. Multiview and Millipage - fine-grain sharing in page-based DSMs. In Operating Systems Design and Implementation, pages 215--228, 1999.]]
[12]
P. Kolte and M. Wolfe. Elimination of redundant array subscript range checks. In SIGPLAN Conference on Programming Language Design and Implementation, pages 270--278, 1995.]]
[13]
D. Mosberger and S. Eranian. IA-64 Linux Kernel: Design and Implementation. Prentice-Hall, 2002.]]
[14]
B. Perens. Electric Fence (http://sunsite.unc.edu/pub/linux/devel/lang/c/electricfence-2.0.5.tar.gz).]]
[15]
R. Rugina and M. C. Rinard. Symbolic bounds analysis of pointers, array indices, and accessed memory regions. In SIGPLAN Conference on Programming Language Design and Implementation, pages 182--195, June 2000.]]
[16]
M. Talluri, M. D. Hill, and Y. A. Khalidi. A new page table for 64-bit address spaces. In Symposium on Operating Systems Principles, Dec. 1995.]]
[17]
H. Xi and F. Pfenning. Eliminating array bound checking through dependent types. In SIGPLAN Conference on Programming Language Design and Implementation, pages 249--257, 1998.]]
[18]
H. Xi and S. Xia. Towards array bound check elimination in Java virtual machine langauge. In CASCON '99, pages 110--125, 1999.]]
[19]
M. Young, J. Avadis Tevanian, R. Rashid, D. G. J. Eppinger, J. Chew, W. Bolosky, D. Black, and R. Baron. The duality of memory and communication in the implementation of a multiprocessor operating system. In 11th Symposium on Operating Systems Principles, Nov. 1987.]]

Cited By

View all
  • (2019)Effect of the coordinate frame on high-order expansion of serial-chain displacementProceedings of the Institution of Mechanical Engineers, Part K: Journal of Multi-body Dynamics10.1177/1464419319856796233:4(840-855)Online publication date: 17-Jun-2019
  • (2006)Pesticide: Using SMT to Improve Performance of Pointer-Bug Detection2006 International Conference on Computer Design10.1109/ICCD.2006.4380864(514-521)Online publication date: Oct-2006

Index Terms

  1. Implicit java array bounds checking on 64-bit architecture

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ICS '04: Proceedings of the 18th annual international conference on Supercomputing
    June 2004
    360 pages
    ISBN:1581138393
    DOI:10.1145/1006209
    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]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 26 June 2004

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. array-bounds checking
    2. java
    3. virtual memory

    Qualifiers

    • Article

    Conference

    ICS04
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 629 of 2,180 submissions, 29%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)1
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 05 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2019)Effect of the coordinate frame on high-order expansion of serial-chain displacementProceedings of the Institution of Mechanical Engineers, Part K: Journal of Multi-body Dynamics10.1177/1464419319856796233:4(840-855)Online publication date: 17-Jun-2019
    • (2006)Pesticide: Using SMT to Improve Performance of Pointer-Bug Detection2006 International Conference on Computer Design10.1109/ICCD.2006.4380864(514-521)Online publication date: Oct-2006

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media