Abstract
We consider some issues in optimizing persistent programming languages. In particular, we show how to express optimizations of object residency checks in strongly typed persistent languages as “annotations” on pointer types. These annotations essentially extend and refine the type system of the language, and they have at least two significant uses. First, a programmer can use them to express desired residency properties to be enforced by the language implementation (compiler plus run time). Second, we can use them to separate a persistence optimizer, which adds annotations, from the remainder of the compiler, which simply obeys them. This gives rise to a nice separation of concerns in supporting high-performance persistence: the “intelligent” optimizer can be factored off from the rest of the compiler.
In addition to modularity benefits, the separation allows us to explore the value of various optimizations without actually implementing them in the optimizer. Rather, we can optimize programs by hand and compare optimized and unoptimized code to develop sound data to use when deciding whether to implement an optimization. While the approach is similar to source-to-source optimizers, which are by no means a new idea, in our case the target language is an extension of the source language, and one specifically designed to be easier to compile well. We are applying the approach in our ongoing implementation of Persistent Modula-3. We present the type annotation approach in the context of Modula-3, but it should be applicable to any strongly typed persistent programming language, as well as to a range of other kinds of optimizations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Malcolm Atkinson, Ken Chisolm, and Paul Cockshott. PS-Algol: an Algol with a persistent heap. ACM SlGPLAN Not, 17(7):24–31, July 1982.
[BBB+88]_Francois Bancilhon, Gilles Barbedette, Véronique Benzaken, Claude Delobel, Sophie Gamerman, Cristophe Lécluse, Patrick Pfeffer, Philippe Richard, and Fernando Velez. The design and implementation of O2, an object-oriented database system. In Dittrich [Dit88], pages 1–22.
A. L. Brown and W. P. Cockshott. The CPOMS persistent object management system. Technical Report Persistent Programming Research Project 13, University of St. Andrews, Scotland, 1986.
[BHJ+87]_A. Black, N. Hutchinson, E. Jul, H. Levy, and L. Carter. Distribution and abstract types in Emerald. IEEE Transactions on Software Engineering, 13(l):65–76, January 1987.
[CDG+88]_Luca Cardelli, James Donahue, Lucille Glassman, Mick Jordan, Bill Kalsow, and Greg Nelson. Modula-3 report. Technical Report ORC-1, DEC Systems Research Center/Olivetti Research Center, Palo Alto/Menlo Park, CA, 1988.
[CDG+89]_Luca Cardelli, James Donahue, Lucille Glassman, Mick Jordan, Bill Kalsow, and Greg Nelson. Modula-3 report (revised). Technical Report DEC SRC 52, DEC Systems Research Center/Olivetti Research Center, Palo Alto/Menlo Park, CA, November 1989.
[CDG+91]_Luca Cardelli, James Donahue, Lucille Glassman, Mick Jordan, Bill Kalsow, and Greg Nelson. Modula-3 language definition. In Nelson [Nel91], chapter 2, pages 11–66.
George Copeland and David Maier. Making Smalltalk a database system. In Proceedings of the 1984 ACM SIGMOD International Conference on Management of Data, pages 316–325, Boston, Massachusetts, June 1984. ACM SIGMOD Rec. 14, 2 (1984).
K. R. Dittrich, editor. Proceedings of the Second International Workshop on Object-Oriented Database Systems, volume 334 of Lecture Notes in Computer Science, Bad Münster am Stein-Ebernburg, Federal Republic of Germany, September 1988. Advances in Object-Oriented Database Systems, Springer-Verlag, 1988.
Amer Diwan. Stack tracing in a statically typed language, October 1991. Position paper for OOPSLA’ 91 Workshop on Garbage Collection.
Amer Diwan, J. Eliot B. Moss, and Richard L. Hudson. Compiler support for garbage collection in a statically typed language. In Conference on Programming Language Design and Implementation, pages 273–282, San Francisco, California, June 1992. SIGPLAN, ACM Press.
Alan Dearie, Gail M. Shaw, and Stanley B. Zdonik, editors. Proceedings of the Fourth International Workshop on Persistent Object Systems, Martha’s Vineyard, Massachusetts, September 1990. Published as Implementing Persistent Object Bases: Principles and Practice, Morgan Kaufmann, 1990.
Adele Goldberg and David Robson. Smalltalk-80: The Language and its Implementation. Addison-Wesley, 1983.
S. P. Harbison. Modula-3. Prentice Hall, New Jersey, 1992.
Antony L. Hosking, Eric Brown, and J. Eliot B. Moss. Update logging for persistent programming languages: A comparative performance evaluation. In Proceedings of the Nineteenth International Conference on Very Large Data Bases, pages 429–440, Dublin, Ireland, August 1993. Morgan Kaufmann.
Antony L. Hosking and J. Eliot B. Moss. Towards compile-time optimisations for persistence. In Dearie et al. [DSZ90], pages 17–27.
Antony L. Hosking and J. Eliot B. Moss. Compiler support for persistent programming. COINS Technical Report 91–25, University of Massachusetts, Amherst, MA 01003, March 1991.
Antony L. Hosking and J. Eliot B. Moss. Object fault handling for persistent programming languages: A performance evaluation. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 288–303, Washington, DC, October 1993.
Antony L. Hosking and J. Eliot B. Moss. Protection traps and alternatives for memory management of an object-oriented language. In Proceedings of the Fourteenth ACM Symposium on Operating Systems Principles, pages 106–119, Asheville, NC, December 1993.
Antony L. Hosking, J. Eliot B. Moss, and Cynthia Bliss. Design of an object faulting persistent Smalltalk. COINS Technical Report 90–45, University of Massachusetts, Amherst, MA 01003, May 1990.
Richard L. Hudson, J. Eliot B. Moss, Amer Diwan, and Christopher F. Weight. A language-independent garbage collector toolkit. COINS Technical Report 91–47, University of Massachusetts, Amherst, September 1991.
Antony L. Hosking, J. Eliot B. Moss, and Darko Stefanovié. A comparative performance evaluation of write barrier implementations. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 92–109, Vancouver, Canada, October 1992. ACM SIGPLAN Not. 27, 10 (October 1992).
Antony L. Hosking. Main memory management for persistence, October 1991. Position paper presented at the OOPSLA’ 91 Workshop on Garbage Collection.
Ted Kaehler. Virtual memory on a narrow machine for an object-oriented language. In OOPSLA [OOP86], pages 87–106.
Ted Kaehler and Glenn Krasner. LOOM—large object-oriented memory for Smalltalk-80 systems. In Glenn Krasner, editor, Smalltalk-80: Bits of History, Words of Advice, chapter 14, pages 251–270. Addison-Wesley, 1983.
Charles Lamb, Gordon Landis, Jack Orenstein, and Dan Weinreb. The ObjectStore database system. Communications of the ACM, 34(10):50–63, October 1991.
J. Eliot B. Moss. Implementing persistence for an object oriented language. COINS Technical Report 87–69, University of Massachusetts, Amherst, MA 01003, September 1987.
J. Eliot B. Moss. Addressing large distributed collections of persistent objects: The Mneme project’s approach. In Richard Hull, Ron Morrison, and David Stemple, editors, Proceedings of the Second International Workshop on Database Programming Languages, pages 269–285, Gleneden Beach, Oregon, June 1989. Morgan Kaufmann. Also available as COINS Technical Report 89–68, University of Massachusetts.
J. Eliot B. Moss. Design of the Mneme persistent object store. ACM Trans. Inf Syst., 8(2):103–139, April 1990.
J. Eliot B. Moss. Working with persistent objects: To swizzle or not to swizzle. IEEE Transactions on Software Engineering, 18(8):657–673, August 1992.
J. Eliot B. Moss and Steven Sinofsky. Managing persistent data with Mneme: Designing a reliable, shared object interface. In Dittrich [Dit88], pages 298–316.
Greg Nelson, editor. Systems Programming with Modula-3. Prentice Hall, New Jersey, 1991.
Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, Portland, Oregon, September 1986. ACM SIGPLAN Not. 21, 11 (November 1986).
Joel E. Richardson and Michael J. Carey. Persistence in the E language: Issues and implementation. Software: Practice and Experience, 19(12):1115–1150, December 1990.
Joel Edward Richardson. E: A Persistent Systems Implementation Language. PhD thesis, Computer Sciences Department, University of Wisconsin, Madison, WI, August 1989. Available as Computer Sciences Technical Report #868.
Joel E. Richardson. Compiled item faulting: A new technique for managing I/O in a persistent language. In Dearie et al. [DSZ90], pages 3–16.
Steve Riegel, Fred Mellender, and Andrew Straw. Integration of database management with an object-oriented programming language. In Dittrich [Dit88], pages 317–322.
[SCB+86]_Craig Schaffert, Topher Cooper, Bruce Bullis, Mike Kilian, and Carrie Wilpolt. An introduction to Trellis/Owl. In OOPSLA [OOP86], pages 9–16.
D. Schuh, M. Carey, and D. DeWitt. Persistence in Erevisited—implementation experiences. In Dearie et al. [DSZ90], pages 345–359.
Vivek Singhal, Sheetal V. Kakkad, and Paul R. Wilson. Texas, an efficient, portable persistent store. In Proceedings of the Fifth International Workshop on Persistent Object Systems, pages 11–33, San Miniato, Italy, September 1992.
Andrew Straw, Fred Mellender, and Steve Riegel. Object management in a persistent Smalltalk system. Software: Practice and Experience, 19(8):719–737, August 1989.
Zhong Shao, John H. Reppy, and Andrew W. Appel. Unrolling lists. In 1994 ACM Conference on Lisp and Functional Programming, Orlando, Florida, June 1994.
Seth J. White and David J. DeWitt. A performance study of alternative object faulting and pointer swizzling strategies. In Proceedings of the Eighteenth International Conference on Very Large Data Bases, pages 419–431, Vancouver, Canada, August 1992. Morgan Kaufmann.
Paul R. Wilson and Sheetal V. Kakkad. Pointer swizzling at page fault time: Efficiently and compatibly supporting huge address spaces on standard hardware. In Proceedings of the 1992 International Workshop on Object Orientation in Operating Systems, pages 364–377, Paris, France, September 1992. IEEE Press.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1995 British Computer Society
About this paper
Cite this paper
Eliot, J., Moss, B., Hosking, A.L. (1995). Expressing Object Residency Optimizations Using Pointer Type Annotations. In: Atkinson, M., Maier, D., Benzaken, V. (eds) Persistent Object Systems. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-2122-0_2
Download citation
DOI: https://doi.org/10.1007/978-1-4471-2122-0_2
Publisher Name: Springer, London
Print ISBN: 978-3-540-19912-0
Online ISBN: 978-1-4471-2122-0
eBook Packages: Springer Book Archive