skip to main content
10.1145/1375581.1375621acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

XMem: type-safe, transparent, shared memory for cross-runtime communication and coordination

Authors Info & Claims
Published:07 June 2008Publication History

ABSTRACT

Developers commonly build contemporary enterprise applications using type-safe, component-based platforms, such as J2EE, and architect them to comprise multiple tiers, such as a web container, application server, and database engine. Administrators increasingly execute each tier in its own managed runtime environment (MRE) to improve reliability and to manage system complexity through the fault containment and modularity offered by isolated MRE instances. Such isolation, however, necessitates expensive cross-tier communication based on protocols such as object serialization and remote procedure calls. Administrators commonly co-locate communicating MREs on a single host to reduce communication overhead and to better exploit increasing numbers of available processing cores. However, state-of-the-art MREs offer no support for more efficient communication between co-located MREs, while fast inter-process communication mechanisms, such as shared memory, are widely available as a standard operating system service on most modern platforms.

To address this growing need, we present the design and implementation of XMem ? type-safe, transparent, shared memory support for co-located MREs. XMem guarantees type-safety through coordinated, parallel, multi-process class loading and garbage collection. To avoid introducing any level of indirection, XMem manipulates virtual memory mapping. In addition, object sharing in XMem is fully transparent: shared objects are identical to local objects in terms of field access, synchronization, garbage collection, and method invocation, with the only difference being that sharedto-private pointers are disallowed. XMem facilitates easy integration and use by existing communication technologies and software systems, such as RMI, JNDI, JDBC, serialization/XML, and network sockets.

We have implemented XMem in the open-source, productionquality HotSpot Java Virtual Machine. Our experimental evaluation, based on core communication technologies underlying J2EE, as well as using open-source server applications, indicates that XMem significantly improves throughput and response time by avoiding the overheads imposed by object serialization and network communication.

References

  1. Apache Tomcat. http://tomcat.apache.org.]]Google ScholarGoogle Scholar
  2. Y. Aridor, M. Factor, and A. Teperman. cJVM: A single system image of a JVM on a cluster. In ICPP, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Armstrong, R. Virding, C. Wikstrom, and M. Williams. Concurrent Programming in Erlang. Prentice-Hall, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. G. Back, W. C. Hsieh, and J. Lepreau. Processes in KaffeOS: Isolation, resource management, and sharing in Java. In OSDI, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. Back, P. Tullmann, L. Stoller, W. C. Hsieh, and J. Lepreau. Java operating systems: Design and implementation. Technical report, Univ. of Utah, 1998.]]Google ScholarGoogle Scholar
  6. H. G. Baker. Infant mortality and generational garbage collection. SIGPLAN Not., 28(4), 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Balfanz and L. Gong. Experience with secure multi-processing in Java. In ICDCS, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. BEA WebLogic Application Server. http://www.bea.com.]]Google ScholarGoogle Scholar
  9. B. N. Bershad, S. Savage, P. Pardyak, E. G. Sirer, M. E. Fiuczynski, D. Becker, C. Chambers, and S. J. Eggers. Extensibility, safety and performance in the SPIN operating system. In SOSP, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. F. Breg and C. D. Polychronopoulos. Java virtual machine support for object serialization. In Java Grande, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Bryce and C. Razafimahefa. An approach to safe object sharing. SIGPLAN Not., 35(10), 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. X. Chen and V. H. Allan. MultiJav: A distributed shared memory system based on multiple Java virtual machines. In PDPTA, 1998.]]Google ScholarGoogle Scholar
  13. C. Click, G. Tene, and M. Wolf. The pauseless GC algorithm. In VEE, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. CORBA Specification. http://www.omg.org.]]Google ScholarGoogle Scholar
  15. D. E. Culler, A. C. Arpaci-Dusseau, S. C. Goldstein, A. Krishnamurthy, S. Lumetta, T. von Eicken, and K. A. Yelick. Parallel programming in Split-C. In SC, 1993.]]Google ScholarGoogle Scholar
  16. D. E. Culler, A. C. Arpaci-Dusseau, S. C. Goldstein, A. Krishnamurthy, S. Lumetta, T. von Eicken, and K. A. Yelick. Parallel programming in Split-C. In SC, 1993.]]Google ScholarGoogle Scholar
  17. G. Czajkowski and L. Daynes. Multitasking without compromise: A virtual machine evolution. In OOPSLA, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. The DaCapo benchmarks. http://dacapobench.org.]]Google ScholarGoogle Scholar
  19. D. Detlefs, C. Flood, S. Heller, and T. Printezis. Garbage-first garbage collection. In ISMM, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Dorward, R. Pike, D. L. Presotto, D. Ritchie, H. Trickey, and P. Winterbottom. Inferno. In COMPCON, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. El-Ghazawi, W. Carlson, and J. Draper. UPC Language Specifications V, 2001.]]Google ScholarGoogle Scholar
  22. M. Fahndrich, M. Aiken, C. Hawblitzel, O. Hodson, G. C. Hunt, J. R. Larus, and S. Levi. Language support for fast and reliable message-based communication in Singularity OS. In EuroSys, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. C. Flood, D. Detlefs, N. Shavit, and C. Zhang. Parallel garbage collection for shared memory multiprocessors. In JVM, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. E. Freeman, S. Hupfer, and K. Arnold. JavaSpaces Principles, Patterns, and Practice (Jini Series). Pearson Education, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Golm, M. Felser, C. Wawersich, and J. Kleinoder. The JX operating system. In USENIX Annual Technical Conference, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. Hertz, Y. Feng, and E. D. Berger. Garbage collection without paging. In PLDI, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C. A. R. Hoare. Communicating sequential processes. Commun. ACM, 26(1), 1983.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. HotSpot Java Virtual Machine GC. http://java.sun.com/javase/technologies/hotspot.]]Google ScholarGoogle Scholar
  29. Hsqldb. http://www.hsqldb.org.]]Google ScholarGoogle Scholar
  30. G. C. Hunt and J. R. Larus. Singularity: Rethinking the software stack. Operating Systems Review, 41(2):37--49, 2007.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Isolate API. JSR-121. http://jcp.org.]]Google ScholarGoogle Scholar
  32. Java 2 Enterprise Edition. http://java.sun.com/javaee/.]]Google ScholarGoogle Scholar
  33. JavaOS : A Standalone Java Environment. Sun Microsystems, 1996.]]Google ScholarGoogle Scholar
  34. JBoss Enterprise Middleware. http://www.jboss.com.]]Google ScholarGoogle Scholar
  35. JNode. http://www.jnode.org.]]Google ScholarGoogle Scholar
  36. R. Jones and C. Ryder. Garbage collection should be lifetime aware. In ICOOOLPS, 2006.]]Google ScholarGoogle Scholar
  37. R. E. Jones. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley and Sons, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. H. Kermany and E. Petrank. The Compressor: Concurrent, incremental and parallel compaction. In PLDI, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. S. Liang and G. Bracha. Dynamic class loading in the Java virtual machine. In OOPSLA, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. M. J. M. Ma, C.-L. Wang, and F. C. M. Lau. JESSICA: Java-enabled single-system-image computing architecture. J. Parallel Distrib. Comput., 60(10), 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. J. Maassen, R. V. Nieuwpoort, R. Veldema, H. E. Bal, T. Kielmann, C. J. H. Jacobs, and R. F. H. Hofman. Efficient Java RMI for parallel programming. Programming Languages and Systems, 23(6), 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. M. Macbeth, K. McGuigan, and P. Hatcher. Executing Java threads in parallel in a distributed-memory environment. In CASCON, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. J. Manson, W. Pugh, and S. V. Adve. The Java memory model. SIGPLAN Not., 40(1), 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. M. Nelson, B.-H. Lim, and G. Hutchins. Fast transparent migration for virtual machines. In USENIX Technical Conference, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Occam Programming Manual. Inmos Corporation, 1984.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Open Source J2SE. http://openjdk.java.net.]]Google ScholarGoogle Scholar
  47. S. Osman, D. Subhraveti, G. Su, and J. Nieh. The design and implementation of Zap: A system for migrating computing environments. In OSDI, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Y. Ossia, O. Ben-Yitzhak, and M. Segal. Mostly concurrent compaction for mark-sweep GC. In ISMM, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. M. Perry. Shared Memory Under Linux, 1999. http://fscked.org/writings/SHM/shm.html.]]Google ScholarGoogle Scholar
  50. M. Philippsen andM. Zenger. JavaParty?transparent remote objects in Java. Concurrency: Practice and Experience, 9(11), 1997.]]Google ScholarGoogle Scholar
  51. Java RMI Specification. http://java.sun.com.]]Google ScholarGoogle Scholar
  52. K. Russell and D. Detlefs. Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing. SIGPLAN Not., 41(10), 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. F. B. Schneider, G. Morrisett, and R. Harper. A language-based approach to security. Lecture Notes in CS, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Java Object Serialization Specification. http://java.sun.com.]]Google ScholarGoogle Scholar
  55. SPEC. http://www.spec.org.]]Google ScholarGoogle Scholar
  56. D. Stefanovic, M. Hertz, S. M. Blackburn, K. S. McKinley, and J. E. B. Moss. Older-first garbage collection in practice: Evaluation in a Java virtual machine. In MSP, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. T. Suezawa. Persistent execution state of a Java virtual machine. In Java Grande, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. D. M. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. SIGPLAN Not., 19(5), 1984.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. T. von Eicken, C.-C. Chang, G. Czajkowski, C. Hawblitzel, D. Hu, and D. Spoonhower. J-Kernel: A capability-based operating system for Java. In Secure Internet Programming, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. IBM WebSphere Application Server. http://www.ibm.com.]]Google ScholarGoogle Scholar
  61. M. Wegiel and C. Krintz. The Mapping Collector: Virtual memory support for generational, parallel, and concurrent compaction. In ASPLOS, 2008.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. P. R. Wilson. Uniprocessor garbage collection techniques. Technical report, Univ. of Texas, 1994.]]Google ScholarGoogle Scholar
  63. P. R. Wilson, M. S. Johnstone, M. Neely, and D. Boles. Dynamic storage allocation: A survey and critical review. In IWMM, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. P. R.Wilson and T. G.Moher. A card-marking scheme for controlling intergenerational references in generation-based garbage collection on stock hardware. SIGPLAN Not., 24(5), 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. N. Wirth and J. Gutknecht. Project Oberon: the design of an operating system and compiler. ACM Press/Addison-Wesley, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. T. Yang, E. D. Berger, S. F. Kaplan, and J. E. B. Moss. CRAMM: Virtual memory support for garbage-collected applications. In OSDI, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  67. W. Yu and A. L. Cox. Java/DSM: A platform for heterogeneous computing. Concurrency - Practice and Experience, 9(11), 1997.]]Google ScholarGoogle Scholar

Index Terms

  1. XMem: type-safe, transparent, shared memory for cross-runtime communication and coordination

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          PLDI '08: Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation
          June 2008
          396 pages
          ISBN:9781595938602
          DOI:10.1145/1375581
          • General Chair:
          • Rajiv Gupta,
          • Program Chair:
          • Saman Amarasinghe
          • cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 43, Issue 6
            PLDI '08
            June 2008
            382 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/1379022
            Issue’s Table of Contents

          Copyright © 2008 ACM

          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]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 7 June 2008

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate406of2,067submissions,20%

          Upcoming Conference

          PLDI '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader