Abstract
As software becomes increasingly complex and difficult to analyze, it is more and more common for developers to use high-level, type-safe, object-oriented (OO) programming languages and to architect systems that comprise multiple components. Different components are often implemented in different programming languages. In state-of-the-art multicomponent, multi-language systems, cross-component communication relies on remote procedure calls (RPC) and message passing. As components are increasingly co-located on the same physical machine to ensure high utilization of multi-core systems, there is a growing potential for using shared memory for cross-language cross-runtime communication.
We present the design and implementation of Co-Located Runtime Sharing (CoLoRS), a system that enables cross-language, cross-runtime type-safe, transparent shared memory. CoLoRS provides object sharing for co-located OO runtimes for both static and dynamic languages. CoLoRS defines a language-neutral object/classmodel,which is a static-dynamic hybrid and enables class evolution while maintaining the space/time efficiency of a static model. CoLoRS uses type mapping and class versioning to transparently map shared types to private types. CoLoRS also contributes a synchronization mechanism and a parallel, concurrent, on-the-fly GC algorithm, both designed to facilitate cross-language cross-runtime object sharing.
We implement CoLoRS in open-source, production-quality runtimes for Python and Java. Our empirical evaluation shows that CoLoRS extensions impose low overhead. We also investigate RPC over CoLoRS and find that using shared memory to implement co-located RPC significantly improves both communication throughput and latency by avoiding data structure serialization.
- }}Apache Cassandra Project. http://cassandra.apache.org.Google Scholar
- }}Y. Aridor, M. Factor, and A. Teperman. cJVM: A single system image of a JVM on a cluster. In ICPP, 1999. Google ScholarDigital Library
- }}J. Armstrong. Erlang -- a survey of the language and its industrial applications. In 9th ESIAP, 1996.Google Scholar
- }}J. Armstrong, R. Virding, C. Wikstrom, and M. Williams. Concurrent Programming in Erlang. Prentice-Hall, 1996. Google ScholarDigital Library
- }}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 Scholar
- }}G. Back, W. C. Hsieh, and J. Lepreau. Processes in KaffeOS: Isolation, resource management, and sharing in Java. In OSDI, 2000. Google ScholarDigital Library
- }}B. N. Bershad, T. E. Anderson, E. D. Lazowska, and H. M. Levy. Lightweight remote procedure call. ACM Trans. Comput. Syst., 8(1), 1990. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}H.-J. Boehm and S. V. Adve. Foundations of the C++ concurrency memory model. In PLDI, 2008. Google ScholarDigital Library
- }}X. Chen and V. H. Allan. MultiJav: A distributed shared memory system based on multiple Java virtual machines. In PDPTA, 1998.Google Scholar
- }}N. Chohan, C. Bunch, S. Pang, C. Krintz, N. Mostafa, S. Soman, and R. Wolski. AppScale: Scalable and Open AppEngine Application Development and Deployment. In ICCC, 2009.Google Scholar
- }}Computer Language Benchmarks Game. Language Performance Comparisons. http://shootout.alioth.debian.org/.Google Scholar
- }}CORBA Specification. http://www.omg.org.Google Scholar
- }}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 Scholar
- }}G. Czajkowski and L. Daynes. Multitasking without compromise: A virtual machine evolution. In OOPSLA, 2001. Google ScholarDigital Library
- }}D. Doligez and G. Gonthier. Portable, unobtrusive garbage collection for multiprocessor systems. In POPL, 1994. Google ScholarDigital Library
- }}D. Doligez and X. Leroy. A concurrent, generational garbage collector for a multithreaded implementation of ml. In POPL, 1993. Google ScholarDigital Library
- }}T. Domani, E. K. Kolodner, and E. Petrank. A generational on-the-fly garbage collector for Java. SIGPLAN Not., 35(5), 2000. Google ScholarDigital Library
- }}T. Domani, E. K. Kolodner, E. Lewis, E. E. Salant, K. Barabash, I. Lahan, Y. Levanoni, E. Petrank, and I. Yanorer. Implementing an on-the-fly garbage collector for Java. SIGPLAN Not., 36(1), 2001. Google ScholarDigital Library
- }}S. Dorward, R. Pike, D. L. Presotto, D. Ritchie, H. Trickey, and P. Winterbottom. Inferno. In COMPCON, 1997. Google ScholarDigital Library
- }}T. El-Ghazawi, W. Carlson, and J. Draper. UPC Language Specifications V, 2001. http://upc.gwu.edu.Google Scholar
- }}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 ScholarDigital Library
- }}R. T. Fielding. Architectural styles and the design of network-based software architectures. Technical report, Univ. of California, Irvine, 2000. Google ScholarDigital Library
- }}GCJ. The GNU Compiler for the Java Programming Language. http://gcc.gnu.org/java.Google Scholar
- }}M. Golm, M. Felser, C. Wawersich, and J. Kleinoder. The JX operating system. In USENIX Annual Technical Conference, 2002. Google ScholarDigital Library
- }}Hadoop File System (HDFS). http://hadoop.apache.org.Google Scholar
- }}G. C. Hunt and J. R. Larus. Singularity: Rethinking the software stack. Operating Systems Review, 41(2):37--49, 2007. Google ScholarDigital Library
- }}JavaOS : A Standalone Java Environment. Sun Microsystems, 1996.Google Scholar
- }}JNode. http://www.jnode.org.Google Scholar
- }}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 ScholarDigital Library
- }}Occam Programming Manual. 1984. Inmos Corporation. Google ScholarDigital Library
- }}Protocol Buffers. Google's Data Interchange Format. http://code.google.com/p/protobuf.Google Scholar
- }}K. Russell and D. Detlefs. Eliminating synchronizationrelated atomic operations with biased locking and bulk rebiasing. SIGPLAN Not., 41(10), 2006. Google ScholarDigital Library
- }}F. B. Schneider, G. Morrisett, and R. Harper. A languagebased approach to security. Lecture Notes in CS, 2001. Google ScholarDigital Library
- }}M. Slee, A. Agarwal, and M. Kwiatkowski. Thrift: Scalable Cross-Language Services Implementation. 2007.Google Scholar
- }}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 ScholarDigital Library
- }}M. Wegiel and C. Krintz. XMem: Type-Safe, Transparent, Shared Memory for Cross-Runtime Communication and Coordination. In PLDI, 2008. Google ScholarDigital Library
- }}N. Wirth and J. Gutknecht. Project Oberon: the design of an operating system and compiler. ACM Press/Addison-Wesley, 1992. Google ScholarDigital Library
Index Terms
- Cross-language, type-safe, and transparent object sharing for co-located managed runtimes
Recommendations
High-performance cross-language interoperability in a multi-language runtime
DLS 2015: Proceedings of the 11th Symposium on Dynamic LanguagesProgrammers combine different programming languages because it allows them to use the most suitable language for a given problem, to gradually migrate existing projects from one language to another, or to reuse existing source code. However, existing ...
Cross-language, type-safe, and transparent object sharing for co-located managed runtimes
OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsAs software becomes increasingly complex and difficult to analyze, it is more and more common for developers to use high-level, type-safe, object-oriented (OO) programming languages and to architect systems that comprise multiple components. Different ...
XMem: type-safe, transparent, shared memory for cross-runtime communication and coordination
PLDI '08Developers 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 ...
Comments