In embedded virtualization, the virtual machines (VMs) use only the resources allocated to them, even if other resources are not in use. This degrades performance of applications on the VM and limits the number of concurrent processes. In addition, most of the previous studies on embedded virtualization have focused on the isolation of each VM to minimize interference among them. For example, the embedded virtualization research for smart phones isolates VMs to prevent leakage of business and private data. For smart TVs, it supports isolation between the TV modules and downloaded untrusted applications. The research for automotive vehicles also emphasizes the isolation between VMs to protect automotive control software from infotainment software.
Although isolation is significant in embedded virtualization, it limits the use of resources beyond the domain of a VM. This limitation causes the degradation of performance and real-time support owing to the lack of resources in the VM. For example, a VM cannot access the memory of another VM, even if it requires additional memory for processing and the other VM is not active. A peripheral device such as a GPU is similar to the case of memory. The VM can only use the GPU when the GPU is attached or provided as a logical GPU using hardware-level virtualization. However, the attachment of additional GPUs for each VM increases the cost and hardware-level GPU virtualization for an embedded system is not yet supported. Moreover, it is difficult to use the hardware-level GPU virtualization mechanism on various embedded systems because it depends on the GPU manufacturer. Therefore, embedded virtualization requires new mechanisms to allow the use of resources beyond the VM and that remain isolation-friendly.
This dissertation proposes new access mechanisms for computing resources (especially memory and GPU) that are located outside the domain of a VM. The proposed mechanisms also support isolation to protect the resources from the negative actions of a faulted VM. This study targets main memory and GPU. Memory is a necessary resource to execute processes and their performance is significantly influenced by the size of available memory. The GPU is essential for interaction with the user. The GPU renders and displays images to notify the status of the system to the user. Thus, I have selected memory and GPU as target devices to improve the performance and functionality of VMs by the alleviation of resource limits.
To overcome the limitation of memory, this study proposes a memory extension mechanism, called SwapBank, which allows a VM to use a portion of the memory in another VM as swap storage. The VM moves unused pages to the swap storage, which is provided by the other VM, and then loads new data for the current process into the space created by moving the unused pages. Through this process, SwapBank improves the performance of applications on the VM up to 38%. Further, it compresses the stored swap-out pages and removes their duplication to minimize the spatial overhead of the VM that provides the swap storage. This reduces 79% of the size of the swap storage.
To provide additional functionality beyond the VM boundary, this study proposes a GPU virtualization mechanism, called VADI, which allows all the VMs on the system to use the GPU. VADI provides library-level GPU virtualization to remove the manufacturer dependency of the GPU. This improves portability of the GPU virtualization mechanism to install on other systems. Through experiment, it is determined that VADI achieves 60 frame per seconds (fps) for rendering and displaying images of each VM; this is equal to the measured value in native system. Moreover, by the partitioning of the framebuffer and interrupts, VADI ensures the consistency of the GPU usage, even when a VM is faulted by an error.