A Survey on Mobility-Induced Service Migration in the Fog, Edge, and Related Computing Paradigms <s> Migration Types <s> Numerous systems have been designed which use virtualization to subdivide the ample resources of a modern computer. Some require specialized hardware, or cannot support commodity operating systems. Some target 100% binary compatibility at the expense of performance. Others sacrifice security or functionality for speed. Few offer resource isolation or performance guarantees; most provide only best-effort provisioning, risking denial of service.This paper presents Xen, an x86 virtual machine monitor which allows multiple commodity operating systems to share conventional hardware in a safe and resource managed fashion, but without sacrificing either performance or functionality. This is achieved by providing an idealized virtual machine abstraction to which operating systems such as Linux, BSD and Windows XP, can be ported with minimal effort.Our design is targeted at hosting up to 100 virtual machine instances simultaneously on a modern server. The virtualization approach taken by Xen is extremely efficient: we allow operating systems such as Linux and Windows XP to be hosted simultaneously for a negligible performance overhead --- at most a few percent compared with the unvirtualized case. We considerably outperform competing commercial and freely available solutions in a range of microbenchmarks and system-wide tests. <s> BIB001 </s> A Survey on Mobility-Induced Service Migration in the Fog, Edge, and Related Computing Paradigms <s> Migration Types <s> Migrating operating system instances across distinct physical hosts is a useful tool for administrators of data centers and clusters: It allows a clean separation between hard-ware and software, and facilitates fault management, load balancing, and low-level system maintenance. By carrying out the majority of migration while OSes continue to run, we achieve impressive performance with minimal service downtimes; we demonstrate the migration of entire OS instances on a commodity cluster, recording service downtimes as low as 60ms. We show that that our performance is sufficient to make live migration a practical tool even for servers running interactive loads. In this paper we consider the design options for migrating OSes running services with liveness constraints, focusing on data center and cluster environments. We introduce and analyze the concept of writable working set, and present the design, implementation and evaluation of high-performance OS migration built on top of the Xen VMM. <s> BIB002 </s> A Survey on Mobility-Induced Service Migration in the Fog, Edge, and Related Computing Paradigms <s> Migration Types <s> When users flood in cloud data centers, how to efficiently manage hardware resources and virtual machines (VMs) in a data center to both lower economical cost and ensure a high service quality becomes an inevitable work for cloud providers. VM migration is a cornerstone technology for the majority of cloud management tasks. It frees a VM from the underlying hardware. This feature brings a plenty of benefits to cloud providers and users. Many researchers are focusing on pushing its cutting edge. In this paper, we first give an overview of VM migration and discuss both its benefits and challenges. VM migration schemes are classified from three perspectives: 1) manner; 2) distance; and 3) granularity. The studies on non-live migration are simply reviewed, and then those on live migration are comprehensively surveyed based on the three main challenges it faces: 1) memory data migration; 2) storage data migration; and 3) network connection continuity. The works on quantitative analysis of VM migration performance are also elaborated. With the development and evolution of cloud computing, user mobility becomes an important motivation for live VM migration in some scenarios (e.g., fog computing). Thus, the studies regarding linking VM migration to user mobility are summarized as well. At last, we list the open issues which are waiting for solutions or further optimizations on live VM migration. <s> BIB003
As shown in Figure 2 , migrations (of either VMs or containers) can be classified in two main categories: stateless and stateful. A stateless migration is associated to a stateless service that does not have a running state, and as such, the migration process simply consists of redeploying the service at the target node. On the other hand, a stateful migration has to ensure that the running state of the application is moved to the target node. Interactive applications such as gaming constitute some example applications that require stateful migration. Stateful migration itself can be also divided into cold (alternatively non-live) and live migration. In cold migration, the VM is suspended and then transferred to the destination where it will be resumed. During that time, the service is unavailable at the current host. This period during which the service is unavailable is referred to as downtime. In the non-live migration, the service downtime is excessively long, thus negatively affecting the user experience. That is why live migration is introduced to address this issue. Live migration can be further divided to pre-copy, post-copy, and hybrid migrations. To better understand the latter migration patterns, three basic phases of VM migration have been defined in BIB002 (also reported in BIB003 ): • A push phase, during which memory pages are iteratively pushed to the destination while the VM is still running on the source. "Dirty" pages, that is, the pages that have been modified since the last iteration, will be sent again in subsequent iterations. • A stop-and-copy phase: The VM on the source is stopped. Remaining pages are then copied to the destination, where the VM will be restarted. • A pull phase: As the VM resumes execution at the destination, page faults may occur when accessing pages that have not been copied yet. These pages will then be pulled from the source node during this phase. The order in which these phases are executed determines the live migration type. In fact, precopy migration performs the push phase and then the stop-and-copy phase, while the post-copy migration starts with the stop-and-copy and then executes the pull phase. The hybrid approach combines phases from both pre-and post-copy approaches. Given the iterative copying phase in the pre-copy migration, a long migration time, that is, the time between the migration initiation and the time when the VM/container is resumed at the destination, will be observed. This motivates the emergence of different works aiming to optimize the pre-copy process, and that will be covered later in Section 5.2.1. From a technical implementation perspective, most VM managers come with built-in support for live migration, such as Xen BIB001 , KVM  , and so forth. As for containers, the Checkpoint/Restore In Userspace (CRIU) tool [26] is commonly used in the literature to perform live container migrations.