## 2 State of the Art
### Lua  
This VM-based programming language, known for its simplicity and memory efficiency, is ideally suited for embedded virtual environments, particularly for on-demand code execution. In recent years, two main contributions have been made to its application: its use as a VM for embedded parallel operating systems (EPOSs) or as a kernel-level interpreter in operating systems to reconfigure processes and environment variables. The implementation of the Lua Virtual Machine (LVM) in EPOSs represents a significant advancement in enabling high-level programming in resource-constrained embedded systems. The primary challenge in this endeavour was the inherent incompatibility between the language requirements and the limited capabilities of the target platform. By selectively removing unnecessary LVM features not applicable to embedded applications, a streamlined version was successfully created, retaining essential functions while minimizing overhead. This adaptation process involved a thorough analysis of LVM requirements against EPOS capabilities. Key functionalities, such as character classification, memory management, and basic string handling, were implemented to ensure that the LVM could operate efficiently within the EPOS environment. Notably, typical features found in standard Lua applications, such as software localization and dynamic module loading, were omitted as they were not relevant for these systems. This not only reduced the LVM size to under 155 KB, but also enhanced the execution speed in EPOSs compared to traditional Linux environments. This optimization is crucial for microcontrollers, where memory and processing power are notably limited [19]. The use of LVM in EPOSs allows the execution of Lua applications, which are known for their simplicity and high-level abstractions. By providing a virtual machine capable of interpreting Lua code, EPOSs enable developers to leverage the benefits of high-level programming, including simpler application development and maintenance. A special \"Lua Profile\" was created with specific LVM-supported functionalities within the EPOS context, serving as a guide for developers to clarify available features and ensure applications are developed without expecting unsupported capabilities. The advantages of this approach are manifold. First, it enables Lua-based application development, which can significantly reduce development time and complexity. Second, the optimized performance of LVM in EPOSs allows applications to run efficiently, making Lua viable in various embedded scenarios. The performance tests conducted showed that while C++ applications executed faster in Linux due to standard library optimizations, Lua applications performed comparably well in EPOSs, confirming the efficiency of this implementation [20]. Implementing the Lua interpreter at the kernel level of operating systems such as NetBSD, as shown in Figure 3[21], and Linux marks a notable step towards creating scriptable operating systems that allow users to dynamically extend kernel functionality. This is achieved by embedding Lua as a scripting language and writing scripts that can directly interact with the kernel. The approach involves modifying kernel subsystems to invoke the Lua interpreter, giving scripts control over various kernel operations, such as CPU frequency scaling and network packet filtering. This integration not only enhances operating system flexibility, but also facilitates rapid development and experimentation with new kernel algorithms, allowing developers to quickly test and deploy new functions without extensive recompilation or system shutdowns [21]. The benefits of such an interpreter during system reconfiguration are considerable. By allowing users to define custom rules and mechanisms via scripts, the operating system can adapt to specific requirements and changing workloads. For example, a user-defined script can implement a CPU frequency scaling policy that considers not only CPU load but also temperature, thereby preventing overheating while optimizing performance.