Advertisement

Java Subtype Tests in Real-Time

  • Krzysztof Palacz
  • Jan Vitek
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2743)

Abstract

Dynamic subtype tests are frequent operations in Java programs. Naive implementations can be costly in space and running time. The techniques that have been proposed to reduce these costs are either restricted in their ability to cope with dynamic class loading or may suffer from pathological performance degradation penalizing certain programming styles. We present R&B, a subtype test algorithm designed for time and space constrained environments such as Real-Time Java which require predictable running times, low space overheads and dynamic class loading. Our algorithm is constant-time, requires an average of 10.8 bytes per class of memory and has been shown to yield an average 2.5% speedup on a production virtual machine. The Real-Time Specification for Java requires dynamic scoped memory access checks on every reference assignment. We extend R&B to perform memory access checks in constant-time.

Keywords

Virtual Machine Benchmark Suite Memory Area Type Hierarchy Range Assignment 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aït-Kaci, H., Boyer, R., Lincoln, P., Nasr, R.: Efficient implementation of lattice operations. ACM Transactions on Programming Languages and Systems 11(1), 115–146 (1989)CrossRefGoogle Scholar
  2. 2.
    Alpern, B., Cocchi, A., Grove, D.: Dynamic type checking in Jalapeno. In: Java Virutal Machine Research and Technology Symposium (April 2001)Google Scholar
  3. 3.
    Beebee Jr., W.S., Rinard, M.: An implementation of scoped memory for real-time Java. In: Henzinger, T.A., Kirsch, C.M. (eds.) EMSOFT 2001. LNCS, vol. 2211, p. 289. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  4. 4.
    Bollella, G., Gosling, J., Brosgol, B., Dibble, P., Furr, S., Turnbull, M.: The Real-Time Specification for Java. Java Series. Addison-Wesley, Reading (2000)Google Scholar
  5. 5.
    Caseau, Y.: Efficient handling of multiple inheritance hierarchies. In: Proc. Conference on Object Oriented Programming Systems, Languages & Applications, OOPSLA 1993, Published as SIGPLAN Notices, vol. 28(10), pp. 271–287. ACM Press, New York (1993)Google Scholar
  6. 6.
    Click, C., Rose, J.: Fast subtype checking in the HotSpot VM. In: Java Grande 2002 (November 2002)Google Scholar
  7. 7.
    Cohen, N.H.: Type-extension type tests can be performed in constant time. ACM Transactions on Programming Languages and Systems 13(4), 626–629 (1991)CrossRefGoogle Scholar
  8. 8.
    Corsaro, A., Cytron, R.K.: Efficient memory-reference checks for realtime java. In: Proceedings of Languages, Compilers, and Tools for Embedded Systems, LCTES 2003 (2003)Google Scholar
  9. 9.
    Dean, J., DeFouw, G., Grove, D., Litvinov, V., Chambers, C.: Vortex: An optimizing compiler for object-oriented languages. In: Proc. Conference on Object Oriented Programming Systems, Languages & Applications, OOPSLA 1996. ACM Press, New York (1996)Google Scholar
  10. 10.
    Dijkstra, E.W.: Recursive programming. Numer. Programming (2), 312–318 (1960)zbMATHMathSciNetGoogle Scholar
  11. 11.
    Habib, M., Nourine, L.: Tree structure for distributive lattices and its applications. Theoretical Computer Science 165, 391–405 (1996)zbMATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Higuera-Toledano, T., Issarny, V.: Analyzing the performance of memory management in rtsj. In: Proceedings of the Fifth International Symposium on Object-Oriented Real-Time Distributed Computing, ISORC 2002 (2002)Google Scholar
  13. 13.
    Krall, A., Grafl, R.: CACAO – a 64 bit JavaVM just-in-time compiler. In: Fox, G.C., Li, W. (eds.) PPoPP 1997 Workshop on Java for Science and Engineering Computation, Las Vegas. ACM, New York (1997)Google Scholar
  14. 14.
    Krall, A., Vitek, J., Nigel Horspool, R.: Near optimal hierarchical encoding of types. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 128–145. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  15. 15.
    Schubert, M.A., Papalaskaris, L.K., Taugher, J.: Determining type, part, colour, and time relationships. Computer (special issue on Knowledge Representation) 16, 53–60 (1983)Google Scholar
  16. 16.
    Tofte, M., Talpin, J.-P.: Region based memory management. Information & Computation 132(2), 109–176 (1997)zbMATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Vitek, J., Krall, A., Nigel Horspool, R.: Efficient type inclusion tests. In: Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 1997 (October 1997)Google Scholar
  18. 18.
    Wirth, N.: Type extensions. ACM Transactions on Programming Languages and Systems 10(2), 204–214 (1988)zbMATHCrossRefGoogle Scholar
  19. 19.
    Wirth, N.: Reply to “type-extension type tests can be performed in constant time”. ACM Transactions on Programming Languages and Systems 13(4), 630 (1991)CrossRefGoogle Scholar
  20. 20.
    Zibin, Y., Gil, J.: Efficient subtyping tests with PQ-Encoding. In: Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 2001 (October 2001)Google Scholar
  21. 21.
    Zibin, Y., Gil, J.Y.: Fast algorithm for creating space efficient dispatching tables with application to multi-dispatching. In: Proceedings of the 17th ACM conference on Object-oriented programming, systems, languages, and applications (OOPSLA-2002), ACM SIGPLAN Notices, vol. 37(11), pp. 142–160. ACM Press, New York (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Krzysztof Palacz
    • 1
  • Jan Vitek
    • 1
  1. 1.S3 Lab, Department of Computer SciencesPurdue University 

Personalised recommendations