Abstract
Dynamic scripting languages are becoming more and more widely adopted not only for fast prototyping but also for developing production-grade applications. They provide high-productivity programming environments featuring high levels of abstraction with powerful built-in functions, automatic memory management, object-oriented programming paradigm and dynamic typing. However, their flexible, dynamic type systems easily become the source of inefficiency in terms of instruction count, memory footprint, and energy consumption. This overhead makes it challenging to deploy these high-productivity programming technologies on emerging single-board computers for IoT applications. Addressing this challenge, this paper introduces Typed Architectures, a high-efficiency, low-cost execution substrate for dynamic scripting languages, where each data variable retains high-level type information at an ISA level. Typed Architectures calculate and check the dynamic type of each variable implicitly in hardware, rather than explicitly in software, hence significantly reducing instruction count for dynamic type checking. Besides, Typed Architectures introduce polymorphic instructions (e.g., xadd), which are bound to the correct native instruction at runtime within the pipeline (e.g., add or fadd) to efficiently implement polymorphic operators. Finally, Typed Architectures provide hardware support for flexible yet efficient type tag extraction and insertion, capturing common data layout patterns of tag-value pairs. Our evaluation using a fully synthesizable RISC-V RTL design on FPGA shows that Typed Architectures achieve geomean speedups of 11.2% and 9.9% with maximum speedups of 32.6% and 43.5% for two production-grade scripting engines for JavaScript and Lua, respectively. Moreover, Typed Architectures improve the energy-delay product (EDP) by 19.3% for JavaScript and 16.5% for Lua with an area overhead of 1.6% at a 40nm technology node.
- Angry Birds. https://www.angrybirds.com/games/.Google Scholar
- Arduino Yun. https://www.arduino.cc/en/Main/ArduinoBoardYun.Google Scholar
- Intel Edison. https://software.intel.com/en-us/iot/hardware/edison.Google Scholar
- Espruino. http://www.espruino.com.Google Scholar
- Intel Galileo. https://software.intel.com/en-us/iot/hardware/galileo.Google Scholar
- Introduction to Intel Memory Protection extensions. http://software.intel.com/en-us/articles/introduction-to-intel-memory-protection-extensions.Google Scholar
- JavaScript. https://developer.mozilla.org/en/docs/Web/JavaScript.Google Scholar
- TI LaunchPad. http://www.ti.com/ww/en/launchpad/launchpad.html.Google Scholar
- LowRISC. http://www.lowrisc.org.Google Scholar
- Matlab. http://www.mathworks.com/products/matlab/.Google Scholar
- Node.js-open-source, cross-platform runtime environment for developing server-side web applications. https://nodejs.org/.Google Scholar
- Perl. https://www.perl.org.Google Scholar
- Adobe's Photoshop Lightroom Developer Center. http://www.adobe.com/devnet/photoshoplightroom.html.Google Scholar
- Python. https://www.python.org.Google Scholar
- The R Project for Statistical Computing. http://www.r-project.org.Google Scholar
- Raspberry Pi. https://www.raspberrypi.org/.Google Scholar
- Rocket Core. http://riscv.org/download.html.Google Scholar
- Raspberry Pi. Usage documentation of Python. https://www.raspberrypi.org/documentation/usage/python/.Google Scholar
- Ruby. https://www.ruby-lang.org/en/.Google Scholar
- SAMA5D3 Series Datasheet. http://www.atmel.com/Images/Atmel-11121-32-bit-Cortex-A5-Microcontroller-SAMA5D3_Datasheet.pdf.Google Scholar
- SpiderMonkey 17. https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/17.Google Scholar
- World of Warcraft interface AddOn Kits. https://us.battle.net/support/en/article/download-the-world-of-warcraft-interface-addon-kit.Google Scholar
- Intel XDK. https://software.intel.com/en-us/intel-xdk.Google Scholar
- Arduino. an open-source electronics platform based on easy-to-use hardware and software. https://www.arduino.cc.Google Scholar
- Computer Language Benchmarks Game. http://benchmarksgame.alioth.debian.org/.Google Scholar
- Duktape. http://duktape.org.Google Scholar
- FTL: WebKit's LLVM based JIT. http://blog.llvm.org/2014/07/ftl-webkits-llvm-based-jit.html.Google Scholar
- The Programming Language Lua. http://lua.org.Google Scholar
- ARM mbed. https://www.mbed.com/en/.Google Scholar
- O. Anderson, E. Fortuna, L. Ceze, and S. Eggers. Checked Load: Architectural Support for JavaScript Type-checking on Mobile Processors. In Proceedings of the 17th IEEE International Symposium on High Performance Computer Architecture (HPCA), 2011. Google Scholar
Cross Ref
- P. W. Bosshart, C. R. Hewes, M. D. Ales, M. C. Chang, K. K. Chau, K. Fasham, C. C. Hoac, T. W. Houston, V. Kalyan, S. L. Lusky, S. S. Mahant-Shetti, D. J. Matzke, K. N. Ruparel, J. F. Sexton, C. H. Shaw, T. Shridhar, D. Stark, and A. L. Lee. A 553 k-transistor lisp processor chip. IEEE Journal of Solid-State Circuits (JSSC), 1987. Google Scholar
Cross Ref
- S. Chen, J. Xu, N. Nakka, Z. Kalbarczyk, and R. K. Iyer. Defeating memory corruption attacks via pointer taintedness detection. In Proceedings of the International Conference on Dependable Systems and Networks (DSN), 2005.Google Scholar
- C. J. Corley and J. A. Statz. LISP workstation brings AI power to a user's desk. In Computer Design, January, 1985.Google Scholar
- J. R. Crandall, S. F. Wu, and F. T. Chong. Minos: Architectural support for protecting control data. ACM Trans. Archit. Code Optim. (TACO), 2006.Google Scholar
Digital Library
- M. Dalton, H. Kannan, and C. Kozyrakis. Raksha: A flexible information flow architecture for software security. In Proceedings of the 34th Annual International Symposium on Computer Architecture (ISCA), 2007. Google Scholar
Digital Library
- D. Y. Deng and G. E. Suh. High-performance parallel accelerator for flexible and efficient run-time monitoring. In Proceedings of the International Conference on Dependable Systems and Networks (DSN), 2012. Google Scholar
Cross Ref
- J. Devietti, C. Blundell, M. M. K. Martin, and S. Zdancewic. Hardbound: Architectural Support for Spatial Safety of the C Programming Language. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2008. Google Scholar
Digital Library
- U. Dhawan, C. Hritcu, R. Rubin, N. Vasilakis, S. Chiricescu, J. M. Smith, T. F. Knight, Jr., B. C. Pierce, and A. DeHon. Architectural Support for Software-Defined Metadata Processing. In Proceedings of the 20th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2015. Google Scholar
Digital Library
- G. Dot, A. Martínez, and A. González. Analysis and optimization of engines for dynamically typed languages. In Proceedings of the 27th International Symposium on Computer Architecture and High Performance Computing (SBAC-PAD), 2015. Google Scholar
Digital Library
- B. Hackett and S.-y. Guo. Fast and Precise Hybrid Type Inference for JavaScript. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2012. Google Scholar
Digital Library
- M. E. Houdek, F. G. Soltis, and R. L. Hoffman. Ibm system/38 support for capability-based addressing. In Proceedings of the 8th Annual Symposium on Computer Architecture (ISCA), 1981.Google Scholar
Digital Library
- M. N. Kedlaya, J. Roesch, B. Robatmili, M. Reshadi, and B. Hardekopf. Improved Type Specialization for Dynamic Scripting Languages. In Proceedings of the 9th Dynamic Languages Symposium (DLS), 2013. Google Scholar
Digital Library
- C. Kim, S. Kim, H. G. Cho, D. Kim, J. Kim, Y. H. Oh, H. Jang, and J. W. Lee. Short-circuit dispatch: Accelerating virtual machine interpreters on embedded processors. In Proceedings of the 43rd Annual International Symposium on Computer Architecture (ISCA), 2016. Google Scholar
Digital Library
- A. Kwon, U. Dhawan, J. M. Smith, T. F. Knight, Jr., and A. DeHon. Low-fat pointers: Compact encoding and efficient gate-level implementation of fat pointers for spatial safety and capability-based security. In Proceedings of the 2013 ACM SIGSAC Conference on Computer and Communications Security (CCS), 2013. Google Scholar
Digital Library
- F. McKeen, I. Alexandrovich, A. Berenzon, C. V. Rozas, H. Shafi, V. Shanbhogue, and U. R. Savagaonkar. Innovative instructions and software model for isolated execution. In Proceedings of the 2nd International Workshop on Hardware and Architectural Support for Security and Privacy (HASP), 2013. Google Scholar
Digital Library
- D. A. Moon. Architecture of the symbolics 3600. In Proceedings of the 12nd Annual International Symposium on Computer Architecture (ISCA), 1985. Google Scholar
Digital Library
- T. Oh, H. Kim, N. P. Johnson, J. W. Lee, and D. I. August. Practical Automatic Loop Specialization. In Proceedings of the 18th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2013. Google Scholar
Digital Library
- F. J. Pollack, G. W. Cox, D. W. Hammerstrom, K. C. Kahn, K. K. Lai, and J. R. Rattner. Supporting ada memory management in the iapx-432. In Proceedings of the 1st International Symposium on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 1982. Google Scholar
Digital Library
- P. Ratanaworabhan, B. Livshits, and B. G. Zorn. JSMeter: Comparing the behavior of JavaScript benchmarks with real web applications. In Proceedings of the 2010 USENIX Conference on Web Application Development (WebApps), 2010.Google Scholar
- P. Steenkiste and J. Hennessy. Tags and Type Checking in LISP: Hardware and Software Approaches. In Proceedings of the 2nd International Conference on Architectual Support for Programming Languages and Operating Systems (ASPLOS), 1987.Google Scholar
Digital Library
- G. E. Suh, J. W. Lee, D. Zhang, and S. Devadas. Secure Program Execution via Dynamic Information Flow Tracking. In Proceedings of the 11th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2004. Google Scholar
Digital Library
- G. S. Taylor, P. N. Hilfinger, J. R. Larus, D. A. Patterson, and B. G. Zorn. Evaluation of the SPUR Lisp Architecture. In Proceedings of the 13rd Annual International Symposium on Computer Architecture (ISCA), 1986. Google Scholar
Digital Library
- G. Venkataramani, I. Doudalis, Y. Solihin, and M. Prvulovic. Flexitaint: A programmable accelerator for dynamic taint propagation. In Proceedings of the 14th IEEE International Symposium on High Performance Computer Architecture (HPCA), 2008. Google Scholar
Cross Ref
- J. Woodruff, R. N. Watson, D. Chisnall, S. W. Moore, J. Anderson, B. Davis, B. Laurie, P. G. Neumann, R. Norton, and M. Roe. The cheri capability model: Revisiting risc in an age of risk. In Proceeding of the 41st Annual International Symposium on Computer Architecuture (ISCA), 2014. Google Scholar
Digital Library
- A. Zakai. Emscripten: An LLVM-to-JavaScript Compiler. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA), 2011. Google Scholar
Digital Library
Index Terms
Typed Architectures: Architectural Support for Lightweight Scripting
Recommendations
Typed Architectures: Architectural Support for Lightweight Scripting
ASPLOS '17: Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating SystemsDynamic scripting languages are becoming more and more widely adopted not only for fast prototyping but also for developing production-grade applications. They provide high-productivity programming environments featuring high levels of abstraction with ...
Typed Architectures: Architectural Support for Lightweight Scripting
Asplos'17Dynamic scripting languages are becoming more and more widely adopted not only for fast prototyping but also for developing production-grade applications. They provide high-productivity programming environments featuring high levels of abstraction with ...
Short-circuit dispatch: accelerating virtual machine interpreters on embedded processors
ISCA '16: Proceedings of the 43rd International Symposium on Computer ArchitectureInterpreters are widely used to implement high-level language virtual machines (VMs), especially on resource-constrained embedded platforms. Many scripting languages employ interpreter-based VMs for their advantages over native code compilers, such as ...







Comments