Implicit Array Bounds Checking on 64-Bit Architectures

Chris Bentley, Scott A. Watterson, David K Lowenthal, Barry Rountree

Research output: Contribution to journalArticle

Abstract

Several programming languages guarantee that array subscripts are checked to ensure they are within the bounds of the array. While this guarantee improves the correctness and security of arraybased code, it adds overhead to array references. This has been an obstacle to using higher-level languages, such as Java, for high-performance parallel computing, where the language specification requires that all array accesses must be checked to ensure they are within bounds. This is because, 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 compiler and operating system infrastructure 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 when applying this infrastructure to high-performance computing programs written in Java, the overhead of bounds checking relative to a program with no bounds checks is reduced from an average of 63% to an average of 9%.

Original languageEnglish (US)
Pages (from-to)502-527
Number of pages26
JournalACM Transactions on Architecture and Code Optimization
Volume3
Issue number4
DOIs
StatePublished - 2006
Externally publishedYes

    Fingerprint

Keywords

  • 64-bit architectures
  • Array-bounds checking
  • Measurement
  • Performance
  • Virtual memory

ASJC Scopus subject areas

  • Software
  • Information Systems
  • Hardware and Architecture

Cite this