With Software Defined Vehicle we face two isolation approaches, virtual machines and (process) container. Virtual machines are well isolated but more heavy as (process) container. A usual virtual machine simulates the hardware, this could lead to performance issues. A common answer is to use asynchronous I/O via memory mapped I/O such as VirtIO. This is the usual approach of “MicroVMs”. MicroVMs always work with non blocking I/O, which is realized via a I/O request and response queue. Further more the interaction between “unit of work” is decoupled via an event architecture, handled in a single process (due to Googles VM often called “event loop”).

In a next step let’s distinguish the virtual machines processing into stack- versus register based. Commonly known stack based virtual machines are e.g., Java and Python. If we do not make used of direct machine code, the simulation of register happens equally as the stack in the RAM. Sure stack based VM not only make use of the hardware capabilities it also require lesser amount of instructions e.g., all logical and arithmetic operations are made via push and pop operation on the stack.
For example adding two numbers require to add them on the stack e.g., push 5, followed by push 7, followed by pop 7, pop 5, add 5 and 7 (heap based) and push the result 12 back to the stack.
Another practical reason for using stack based virtual machine is the ease of executing (the result of) multiple programming languages. Currently popular is Web Assembly. A bunch of nice examples, enclosing multiple input programming languages, can be found here: https://wasmbyexample.dev/examples/hello-world/hello-world.assemblyscript.en-us.html (external link).
The referenced esmcripting internally use the LLVM compiler tool suite well shows how a virtual machine code program (bunch of opcodes) could be build from almost any programming language input: https://www.youtube.com/watch?v=BT2Cv-Tjq7Q (external link).
Simplified, it s about an intermediate program code representation (aka AST, Abstract Syntax Tree). The AST represents the instructions , of the given program, without the need to consider the target. The target could be an ARM CPU, a virtual machine runtime like WebAssembly or a chiplet based runtime.
A nice examples for C code can be found here https://blog.verygoodgraphics.com/posts/cpp-wasm/ (external link) and here https://surma.dev/things/c-to-webassembly/ (external link).