Abstract
Direct sharing and storing of memory objects allows high-performance and low-overhead collaboration between parallel processes or application workflows with loosely coupled programs. However, sharing of objects is hindered by the inability to use subtype polymorphism which is common in object-oriented programming languages. That is because implementations of subtype polymorphism in modern compilers rely on using virtual tables stored at process-specific locations, which makes objects unusable in processes other than the creating process.
In this paper, we present SAVI Objects, objects with Sharing and Virtuality Incorporated. SAVI Objects support subtype polymorphism but can still be shared across processes and stored in persistent data structures. We propose two different techniques to implement SAVI Objects and evaluate the tradeoffs between them. The first technique is virtual table duplication which adheres to the virtual-table-based implementation of subtype polymorphism, but duplicates virtual tables for shared objects to fixed memory addresses associated with each shared memory region. The second technique is hashing-based dynamic dispatch which re-implements subtype polymorphism using hashing-based look-ups to a global virtual table.
Our results show that SAVI Objects enable direct sharing and storing of memory objects that use subtype polymorphism by adding modest overhead costs to object construction and dynamic dispatch time. SAVI Objects thus enable faster inter-process communication, improving the overall performance of production applications that share polymorphic objects.
- Gerald Aigner and Urs Hölzle. 1996. Eliminating virtual function calls in C++ programs. In European conference on object-oriented programming. Springer, 142–166.Google Scholar
Cross Ref
- Apache Avro. 2012. Apache Avro. (2012). https://avro.apache.orgGoogle Scholar
- Krste Asanovic. 2014. FireBox: A Hardware Building Block for 2020 Warehouse-Scale Computers. In Proceedings of the 12th USENIX Conference on File and Storage Technologies (FASTâĂŹ14). USENIX Association, Santa Clara, CA, USA. https://www.usenix.org/conference/fast14/technical-sessions/presentation/keynoteGoogle Scholar
- David Francis Bacon. 1997. Fast and effective optimization of statically typed object-oriented languages. University of California, Berkeley.Google Scholar
- David F. Bacon and Peter F. Sweeney. 1996. Fast Static Analysis of C++ Virtual Function Calls. In Proceedings of the 11th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA ’96). ACM, New York, NY, USA, 324–341. DOI: Google Scholar
Digital Library
- Rajkishore Barik, Rashid Kaleem, Deepak Majeti, Brian T. Lewis, Tatiana Shpeisman, Chunling Hu, Yang Ni, and Ali-Reza Adl-Tabatabai. 2014. Efficient Mapping of Irregular C++ Applications to Integrated GPUs. In Proceedings of Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO ’14). ACM, New York, NY, USA, Article 33, 11 pages. DOI: Google Scholar
Digital Library
- Oren Ben-Kiki, Clark Evans, and Brian Ingerson. 2005. YAML Ain’t Markup Language (YAMLâĎć) Version 1.1. yaml. org, Tech. Rep (2005).Google Scholar
- Kumud Bhandari, Dhruva R Chakrabarti, and Hans-J Boehm. 2016. Makalu: Fast recoverable allocation of non-volatile memory. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 677–694. Google Scholar
Digital Library
- Alexandros Biliris, Shaul Dar, and Narain H. Gehani. 1993. Making C++ objects persistent: The hidden pointers. Software: Practice and Experience 23, 12 (1993), 1285–1303. Google Scholar
Digital Library
- Boost C++ Libraries. 2015a. Managed Memory Segments. (2015). http://www.boost.org/doc/libs/1_61_0/doc/html/ interprocess/managed_memory_segments.htmlGoogle Scholar
- Boost C++ Libraries. 2015b. Sharing memory between processes – Virtuality Forbidden. (2015). http://www.boost.org/doc/ libs/1_47_0/doc/html/interprocess/sharedmemorybetweenprocesses.htmlGoogle Scholar
- Christoph Borchert and Olaf Spinczyk. 2016. Hardening an L4 microkernel against soft errors by aspect-oriented programming and whole-program analysis. ACM SIGOPS Operating Systems Review 49, 2 (2016), 37–43. Google Scholar
Digital Library
- Dimitar Bounov, Rami Gökhan Kici, and Sorin Lerner. 2016. Protecting C++ Dynamic Dispatch Through VTable Interleaving.. In Network and Distributed System Security Symposium (NDSS). Google Scholar
Cross Ref
- Tim Bray, Jean Paoli, C Michael Sperberg-McQueen, Eve Maler, and François Yergeau. 1998. Extensible markup language (XML). World Wide Web Consortium Recommendation REC-xml-19980210. http://www. w3. org/TR/1998/REC-xml-19980210 16 (1998), 16.Google Scholar
- K. M. Bresniker, S. Singhal, and R. S. Williams. 2015. Adapting to Thrive in a New Economy of Memory Abundance. Computer 48, 12 (Dec 2015), 44–53. DOI: Google Scholar
Digital Library
- B. Burshteyn. 2014. Method and system for accessing c++ objects in shared memory. (Feb. 6 2014). https://www.google. com/patents/US20140040566 US Patent App. 13/956,595.Google Scholar
- Brad Calder and Dirk Grunwald. 1994. Reducing indirect function call overhead in C++ programs. In Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages. ACM, 397–408. Google Scholar
Digital Library
- Dhruva R. Chakrabarti, Hans-J. Boehm, and Kumud Bhandari. 2014. Atlas: Leveraging Locks for Non-volatile Memory Consistency. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA ’14). ACM, New York, NY, USA, 433–452. DOI: Google Scholar
Digital Library
- Li-Wen Chang, Juan Gómez-Luna, Izzat El Hajj, Sitao Huang, Deming Chen, and Wen-mei Hwu. 2017. Collaborative Computing for Heterogeneous Integrated Systems. In Proceedings of the 8th ACM/SPEC on International Conference on Performance Engineering. ACM, 385–388. Google Scholar
Digital Library
- Jiho Choi, Thomas Shull, Maria J Garzaran, and Josep Torrellas. 2017. ShortCut: Architectural Support for Fast Object Access in Scripting Languages. In Proceedings of the 44th Annual International Symposium on Computer Architecture. ACM, 494–506. Google Scholar
Digital Library
- Joel Coburn, Adrian M. Caulfield, Ameen Akel, Laura M. Grupp, Rajesh K. Gupta, Ranjit Jhala, and Steven Swanson. 2011. NV-Heaps: Making Persistent Objects Fast and Safe with Next-generation, Non-volatile Memories. In Proceedings of the Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XVI). ACM, New York, NY, USA, 105–118. DOI: Google Scholar
Digital Library
- Douglas Crockford. 2006. The application/json media type for javascript object notation (json). (2006).Google Scholar
- Jeffrey Dean, David Grove, and Craig Chambers. 1995. Optimization of object-oriented programs using static class hierarchy analysis. In European Conference on Object-Oriented Programming. Springer, 77–101. Google Scholar
Cross Ref
- David Detlefs and Ole Agesen. 1999. Inlining of Virtual Methods. In Proceedings of the 13th European Conference on Object-Oriented Programming. Springer-Verlag, 258–278. Google Scholar
Cross Ref
- David Dewey and Jonathon T Giffin. 2012. Static detection of C++ vtable escape vulnerabilities in binary code.. In Network and Distributed System Security Symposium (NDSS).Google Scholar
- Sébastien Doeraene and Tobias Schlatter. 2016. Parallel incremental whole-program optimizations for Scala. js. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 59–73. Google Scholar
Digital Library
- Gem Dot, Alejandro Martínez, and Antonio González. 2017. Removing checks in dynamically typed languages through efficient profiling. In Code Generation and Optimization (CGO), 2017 IEEE/ACM International Symposium on. IEEE, 257–268. Google Scholar
Cross Ref
- Karel Driesen and Urs Hölzle. 1996. The Direct Cost of Virtual Function Calls in C++. In Proceedings of the 11th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA ’96). ACM, New York, NY, USA, 306–323. DOI: Google Scholar
Digital Library
- Karel Driesen, Urs Hölzle, and Jan Vitek. 1995. Message dispatch on pipelined processors. In European Conference on Object-Oriented Programming. Springer, 253–282. Google Scholar
Cross Ref
- Izzat El Hajj, Alexander Merritt, Gerd Zellweger, Dejan Milojicic, Reto Achermann, Paolo Faraboschi, Wen-mei Hwu, Timothy Roscoe, and Karsten Schwan. 2016. SpaceJMP: Programming with Multiple Virtual Address Spaces. In Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating Systems. ACM, 353–368. Google Scholar
Digital Library
- Mohamed Elsabagh, Dan Fleck, and Angelos Stavrou. 2017. Strict Virtual Call Integrity Checking for C++ Binaries. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security. ACM, 140–154. Google Scholar
Digital Library
- Mary F Fernandez. 1995. Simple and effective link-time optimization of Modula-3 programs. Vol. 30. ACM.Google Scholar
- Robert Gawlik and Thorsten Holz. 2014. Towards automated integrity protection of C++ virtual function tables in binary programs. In Proceedings of the 30th Annual Computer Security Applications Conference. ACM, 396–405. Google Scholar
Digital Library
- Juan Gómez-Luna, Izzat El Hajj, Li-Wen Chang, Víctor Garcia-Flores, S de Gonzalo, T Jablin, Antonio J Pena, and WM Hwu. 2017. Chai: collaborative heterogeneous applications for integrated-architectures. In 2017 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), IEEE. Google Scholar
Cross Ref
- David Grove, Jeffrey Dean, Charles Garrett, and Craig Chambers. 1995. Profile-guided Receiver Class Prediction. In Proceedings of the Tenth Annual Conference on Object-oriented Programming Systems, Languages, and Applications (OOPSLA ’95). ACM, New York, NY, USA, 108–123. DOI: Google Scholar
Digital Library
- Istvan Haller, Enes Göktaş, Elias Athanasopoulos, Georgios Portokalidis, and Herbert Bos. 2015. Shrinkwrap: Vtable protection without loose ends. In Proceedings of the 31st Annual Computer Security Applications Conference. ACM, 341–350. Google Scholar
Digital Library
- Urs Holzle and David M Ungar. 1994. Adaptive optimization for SELF: reconciling high performance with exploratory programming. Number 1520. Department of Computer Science, Stanford University.Google Scholar
- Lenny Hon. 1994. Using objects in shared memory for C++ application. In Proceedings of the 1994 conference of the Centre for Advanced Studies on Collaborative research. IBM Press, 29.Google Scholar
Digital Library
- Kazuaki Ishizaki, Akihiro Hayashi, Gita Koblents, and Vivek Sarkar. 2015. Compiling and optimizing java 8 programs for gpu execution. In Parallel Architecture and Compilation (PACT), 2015 International Conference on. IEEE, 419–431. Google Scholar
Digital Library
- Kazuaki Ishizaki, Motohiro Kawahito, Toshiaki Yasue, Hideaki Komatsu, and Toshio Nakatani. 2000. A study of devirtualization techniques for a Java Just-In-Time compiler. In ACM SIGPLAN Notices, Vol. 35. ACM, 294–310. Google Scholar
Digital Library
- Dongseok Jang, Zachary Tatlock, and Sorin Lerner. 2014. SafeDispatch: Securing C++ Virtual Calls from Memory Corruption Attacks.. In NDSS.Google Scholar
- Nick P. Johnson, Jordan Fix, Stephen R. Beard, Taewook Oh, Thomas B. Jablin, and David I. August. 2017b. A Collaborative Dependence Analysis Framework. In Proceedings of the 2017 International Symposium on Code Generation and Optimization (CGO ’17). IEEE Press, Piscataway, NJ, USA, 148–159. http://dl.acm.org/citation.cfm?id=3049832.3049849 Google Scholar
Cross Ref
- Teresa Johnson, Mehdi Amini, and Xinliang David Li. 2017a. ThinLTO: scalable and incremental LTO. In Proceedings of the 2017 International Symposium on Code Generation and Optimization. IEEE Press, 111–121. Google Scholar
Cross Ref
- Channoh Kim, Jaehyeok Kim, Sungmin Kim, Dooyoung Kim, Namho Kim, Gitae Na, Young H Oh, Hyeon Gyu Cho, and Jae W Lee. 2017. Typed Architectures: Architectural Support for Lightweight Scripting. In Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems. ACM, 77–90. Google Scholar
Digital Library
- Hyesoon Kim, José A Joao, Onur Mutlu, Chang Joo Lee, Yale N Patt, and Robert Cohn. 2007. VPC prediction: reducing the cost of indirect branches via hardware-based dynamic devirtualization. In ACM SIGARCH Computer Architecture News, Vol. 35. ACM, 424–435.Google Scholar
- Chris Lattner and Vikram Adve. 2004. LLVM: A compilation framework for lifelong program analysis & transformation. In Code Generation and Optimization, 2004. CGO 2004. International Symposium on. IEEE, 75–86.Google Scholar
Cross Ref
- Stanley B Lippman. 1996. Inside the C++ object model. Vol. 242. Addison-Wesley Reading.Google Scholar
Digital Library
- James Litton, Anjo Vahldiek-Oberwagner, Eslam Elnikety, Deepak Garg, Bobby Bhattacharjee, and Peter Druschel. 2016. Light-weight contexts: an OS abstraction for safety and performance. In Proceedings of OSDIâĂŹ16: 12th USENIX Symposium on Operating Systems Design and Implementation. 49.Google Scholar
- Matthew R Miller, Kenneth D Johnson, and Timothy William Burrell. 2014. Using virtual table protections to prevent the exploitation of object corruption vulnerabilities. (March 25 2014). US Patent 8,683,583.Google Scholar
- Dushyanth Narayanan and Orion Hodson. 2012. Whole-system Persistence. In Proceedings of the Seventeenth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XVII). ACM, New York, NY, USA, 401–410. DOI: Google Scholar
Digital Library
- Hemant D Pande and Barbara G Ryder. 1996. Data-flow-based virtual function resolution. In International Static Analysis Symposium. Springer, 238–254.Google Scholar
Cross Ref
- Lillian Pentecost and John Stratton. 2015. Accelerating dynamically typed languages with a virtual function cache. In Proceedings of the 2nd International Workshop on Hardware-Software Co-Design for High Performance Computing. ACM, 3. Google Scholar
Digital Library
- Dmitry Petrashko, Vlad Ureche, Ondřej Lhoták, and Martin Odersky. 2016. Call graphs for languages with parametric polymorphism. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 394–409. Google Scholar
Digital Library
- Matt Pietrek. 2000. Metadata in. NET-Avoiding DLL Hell: Introducing Application Metadata in the Microsoft. NET Framework. MSDN Magazine (2000), 42–55.Google Scholar
- Sara Porat, , David Bernstein, , Yaroslav Fedorov, , Joseph Rodrigue, , and Eran Yahav. 1996. Compiler Optimization of C++ Virtual Function Calls. In Proceedings of the 2nd Conference on Object-Oriented Technologies and Systems.Google Scholar
- Aravind Prakash, Xunchao Hu, and Heng Yin. 2015. vfGuard: Strict Protection for Virtual Function Calls in COTS C++ Binaries.. In NDSS.Google Scholar
- Philip C Pratt-Szeliga, James W Fawcett, and Roy D Welch. 2012. Rootbeer: Seamlessly using gpus from java. In High Performance Computing and Communication & 2012 IEEE 9th International Conference on Embedded Software and Systems (HPCC-ICESS), 2012 IEEE 14th International Conference on. IEEE, 375–380.Google Scholar
- Joel E Richardson and Michael J Carey. 1989. Persistence in the E language: Issues and implementation. Softw., Pract. Exper. 19, 12 (1989), 1115–1150.Google Scholar
Digital Library
- Amir Roth, Andreas Moshovos, and Gurindar S Sohi. 1999. Improving virtual function call target prediction via dependencebased pre-computation. In Proceedings of the 13th international conference on Supercomputing. ACM, 356–364. Google Scholar
Digital Library
- Pawel Sarbinowski, Vasileios P. Kemerlis, Cristiano Giuffrida, and Elias Athanasopoulos. 2016. VTPin: Practical VTable Hijacking Protection for Binaries. In Proceedings of the 32Nd Annual Conference on Computer Security Applications (ACSAC ’16). ACM, New York, NY, USA, 448–459. DOI: Google Scholar
Digital Library
- Patrick W Sathyanathan, Wenlei He, and Ten H Tzen. 2017. Incremental whole program optimization and compilation. In Proceedings of the 2017 International Symposium on Code Generation and Optimization. IEEE Press, 221–232.Google Scholar
Digital Library
- Yifan Sun, Xiang Gong, Amir Kavyan Ziabari, Leiming Yu, Xiangyu Li, Saoni Mukherjee, Carter McCardwell, Alejandro Villegas, and David Kaeli. 2016. Hetero-mark, a benchmark suite for CPU-GPU collaborative computing. In Workload Characterization (IISWC), 2016 IEEE International Symposium on. IEEE, 1–10. Google Scholar
Cross Ref
- Vijay Sundaresan, Laurie Hendren, Chrislain Razafimahefa, Raja Vallée-Rai, Patrick Lam, Etienne Gagnon, and Charles Godin. 2000. Practical Virtual Method Call Resolution for Java. In Proceedings of the 15th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA ’00). ACM, New York, NY, USA, 264–280. DOI: Google Scholar
Digital Library
- Tian Tan, Yue Li, and Jingling Xue. 2017. Efficient and precise points-to analysis: modeling the heap by merging equivalent automata. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 278–291. Google Scholar
Digital Library
- The Apache XML Project. 2004a. Xalan-C++ Basic usage patterns. (2004). https://xalan.apache.org/old/xalan-c/usagepatterns. htmlGoogle Scholar
- The Apache XML Project. 2004b. Xalan-C++ version 1.10. (2004). http://xml.apache.org/xalan-c/Google Scholar
- Caroline Tice, Tom Roeder, Peter Collingbourne, Stephen Checkoway, Úlfar Erlingsson, Luis Lozano, and Geoff Pike. 2014. Enforcing forward-edge control-flow integrity in GCC & LLVM. In 23rd USENIX Security Symposium (USENIX Security 14). 941–955.Google Scholar
- Frank Tip and Jens Palsberg. 2000. Scalable Propagation-based Call Graph Construction Algorithms. In Proceedings of the 15th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA ’00). ACM, New York, NY, USA, 281–293. DOI: Google Scholar
Digital Library
- Kenton Varda. 2008. Protocol buffers: Google’s data interchange format. (2008). https://opensource.googleblog.com/2008/ 07/protocol-buffers-googles-data.htmlGoogle Scholar
- Roberto Agostino Vitillo. 2013. Sharing C++ objects in Linux. (2013). http://www.slideshare.net/RobertoAgostinoVitil/ sharing-objects2011Google Scholar
- Haris Volos, Andres Jaan Tack, and Michael M. Swift. 2011. Mnemosyne: Lightweight Persistent Memory. In Proceedings of the Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XVI). ACM, New York, NY, USA, 91–104. DOI: Google Scholar
Digital Library
- Skye Wanderman-Milne and Nong Li. 2014. Runtime Code Generation in Cloudera Impala. IEEE Data Eng. Bull. 37, 1 (2014), 31–37.Google Scholar
- Wikipedia. 2017. Birthday attack. (2017). https://en.wikipedia.org/wiki/Birthday_attackGoogle Scholar
- Shoumeng Yan, Sai Luo, Xiaocheng Zhou, Ying Gao, Hu Chen, and Bratin Saha. 2015. Sharing virtual functions in a shared virtual memory between heterogeneous processors of a computing platform. (March 31 2015). US Patent 8,997,113.Google Scholar
- Olivier Zendra, Dominique Colnet, and Suzanne Collin. 1997. Efficient Dynamic Dispatch Without Virtual Function Tables: The SmallEiffel Compiler. In Proceedings of the 12th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA ’97). ACM, New York, NY, USA, 125–141. DOI: Google Scholar
Digital Library
- Chao Zhang, Chengyu Song, Kevin Zhijie Chen, Zhaofeng Chen, and Dawn Song. 2015. VTint: Defending virtual function tablesâĂŹ integrity. In Symposium on Network and Distributed System Security (NDSS). 8–11.Google Scholar
- Chao Zhang, Dawn Song, Scott A Carr, Mathias Payer, Tongxin Li, Yu Ding, and Chengyu Song. 2016. VTrust: Regaining Trust on Virtual Calls.. In Network and Distributed System Security Symposium (NDSS). Google Scholar
Cross Ref
- Xiaocheng Zhou, Shoumeng Yan, Ying Gao, Hu Chen, Peinan Zhang, Mohan Rajagopalan, Avi Mendelson, and Bratin Saha. 2015. Language level support for shared virtual memory. (March 31 2015). US Patent 8,997,114.Google Scholar
- Wang Zixiang, Shan Chun, Xue Jingfeng, and Sun Shiyouhu Changzhen. 2016. Research on the Defense Method of Vtable Hijacking. International Journal of Security and Its Applications 10, 11 (2016), 267–280. Google Scholar
Cross Ref
Index Terms
SAVI objects: sharing and virtuality incorporated
Recommendations
IVT: an efficient method for sharing subtype polymorphic objects
Shared memory provides the fastest form of inter-process communication. Sharing polymorphic objects between different address spaces requires solving the issue of sharing pointers. In this paper, we propose a method, named Indexed Virtual Tables (IVT ...
Ideal Secret Sharing Schemes with Share Selectability
Information and Communications SecurityAbstractIn this paper, we investigate a new concept, called share selectable secret sharing, where no unauthorized set can obtain information of the secret (in the information-theoretic sense) even if shares are selectable as arbitrary values which are ...
Image Secret Sharing Construction for General Access Structure with Meaningful Share
This article describes how the (k, n) threshold image secret sharing technology can recover the secret image even n − k shares are lost, or n−k servers do not work, which is useful for cloud storage, etc. Image secret sharing for general access ...






Comments