Abstract

Many Internet-of-Things (IoT) systems use lightweight JavaScript engines to support easy programming in microcontrollers. Lightweight JavaScript engines use several techniques for memory optimization, such as static heap reservation and compressed addressing. Recent IoT systems also use several external libraries and a larger on-chip memory to support abundant functionalities, such as machine learning and connectivity. However, as the JavaScript heap space is not resizable owing to the memory optimizations, the JavaScript engine or an external library is prone to fail the memory allocation in these devices. To address this problem, we propose a flexible memory optimization technique, segment-based multiple-base compressed addressing (SMBCA) , which compresses a pointer indicating a JavaScript object allocated to a resizable heap based on multiple base addresses. SMBCA comprises two components: a dynamic segment allocator (DSA) and a multiple-base compressed address translator (MBCAT). DSA dynamically allocates the JavaScript heap in segment units. Meanwhile, MBCAT converts a low-bitwidth address into a full-bitwidth address and vice versa, based on the multiple base addresses. To reduce the address compression overhead of MBCAT, we propose a software cache technique, reverse map cache (RMC) . We found that the SMBCA reduces average memory usage by 43.9% compared to the existing lightweight JavaScript engines when running SunSpider benchmarks, V8 benchmarks, and real-world applications. We also showed that the RMC reduces the average address compression latency of MBCAT by 34.9% when running the SunSpider benchmarks.

Highlights

  • Internet-of-things (IoT) systems require low power consumption, low cost, and small form factors

  • We proposed segment-based multiple-base compressed addressing (SMBCA), a memory optimization technique of the JavaScript engine suitable for recent low-end devices

  • SMBCA enables a resizable heap through dynamic segment allocation, and enables compressed addressing to be applied to large memory through multiple-base compressed addressing (MBCA)

Read more

Summary

Introduction

Internet-of-things (IoT) systems require low power consumption, low cost, and small form factors. Many IoT systems use low-end devices, such as microcontrollers (MCUs). Two trends exist in these low-end devices. For the easy programming of IoT applications, MCUs run a lightweight interpreter engine that can support dynamic programming languages, such as JavaScript and Python. LIGHTWEIGHT JavaScript ENGINES The lightweight JavaScript engine is an interpreter engine that runs JavaScript applications on low-end devices with limited computing resources and memory resources. The lightweight JavaScript engines introduce as few performance optimization techniques as possible because such techniques create an additional memory footprint. Many performance optimization techniques such as inline caching [13], hidden class, and just-in-time compile, which are widely used in high-end JavaScript engines such as V8 [14], are not adopted by the lightweight JavaScript engines

Methods
Results
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.