Task Migration with Partitioning for Load Balancing in Collaborative Edge Computing

: Multi-access edge computing (MEC) has emerged as a promising technology to facilitate efﬁcient vehicular applications, such as autonomous driving, path planning and navigation. By ofﬂoading tasks from vehicles to MEC servers (MECSs), the MEC system can facilitate computation-intensive applications with hard latency constraints in vehicles with limited computing resources. However, owing to the mobility of vehicles, the vehicles are not evenly distributed across the MEC system. Therefore, some MECSs are heavily congested, whereas others are lightly loaded. If a task is ofﬂoaded to a congested MECS, it can be blocked or have high latency. Moreover, service interruption would occur because of the high mobility and limited coverage of the MECS. In this paper, we assume that the task can be divided into a set of subtasks and computed by multiple MECSs in parallel. Therefore, we propose a method of task migration with partitioning. To balance loads, the MEC system migrates the set of subtasks of tasks in an overloaded MECS to one or more underloaded MECSs according to the load difference. Simulations have indicated that, compared with conventional methods, the proposed method can increase the satisfaction of quality-of-service requirements, such as low latency, service reliability, and MEC system throughput by optimizing load balancing and task partitioning.


Introduction
In the 5G era, the concept of vehicular networks has extended to the Internet of Vehicles (IoV), in which intelligent and interactive vehicular applications such as autonomous vehicles, path planning and navigation are enabled by communication and computation technologies [1][2][3]. These computation-intensive applications frequently require ultrareliability and low-latency (uRLLC). For example, autonomous driving applications need to process huge amounts of data in real time (as high as 2 GB/s) within about 10 ms, which is a very low delay constraint [2]. Applications for efficient driving, e.g., path planning or navigation generate less data than autonomous driving, but tasks from the applications should be performed within a still-low delay constraint of about 100 ms [4]. Despite improving the computing power of vehicles, processing such applications on vehicular terminals is still difficult while ensuring high computing power and quality-of-service (QoS) requirements, such as low latency.
To overcome these limitations and facilitate efficient application processing, multiaccess edge computing (MEC) has emerged as a promising technology that can satisfy the demand for the heavy computation of vehicles by providing rapid and sufficient computational resources to vehicles [5]. Thus, by offloading tasks from vehicles to MEC servers (MECSs), the MEC system can facilitate computation-intensive applications with low latency in vehicles with limited computing resources. Meanwhile, compared with conventional centralized cloud computing, offloading computation-intensive tasks to MECSs, which are geographically closer to vehicles, by deploying them at the network edge, can further reduce the network delay.
However, because MECSs have limited computing power, the computing power that the vehicle can request from the MECS depends on the MECS load level, i.e., the number of tasks already allocated to the MECS [6]. Due to the mobility of vehicles, vehicles are not evenly distributed across a MEC system; thus, the number of tasks offloaded to a MECS may not be evenly distributed among MECSs. Therefore, some MECSs are heavily congested, whereas others are lightly loaded. If a task is offloaded to a congested MECS, the task may be blocked or the delay will be prolonged. Thus, the delay requirements may be violated. Moreover, the mobility of vehicles causes uncertainty in downloading results [7]. Owing to the limited coverage of MECSs, the vehicle can travel out of the coverage of a MECS that offloads a task during a service session, resulting in a service interruption. Service interruption occurs because of dynamically changing radio association, which can significantly increase the total service latency, particularly in urban areas with highly dense infrastructure.
To improve the satisfaction with QoS requirements, references [8][9][10][11][12][13] studied service migration. In [8][9][10], a service migration that migrates services according to a vehicle's trajectory was proposed to minimize the average completion time of tasks. As they only considered the trajectory of vehicles without considering the load of MECSs, tasks can simultaneously migrate to a specific MECS. Thus, this MECS becomes overloaded, which can result in uneven loads among MECSs and reduce system throughput. Service migration with load balancing was addressed in [11][12][13]. In [11], a service migration method was proposed that considered the load difference and migration cost in balancing the loads of MECSs in a MEC system. In [12], service migration was determined using the traffic conditions and loads of each MECS to minimize the migration costs and travel times of vehicles. The load of each MECS in [11,12] was measured using the number of tasks in the MECS. In [13], the method distributed the load from an overloaded cell to a lightly loaded cell from its neighbors to increase the utilization of radio resources. The load is represented by the resource block utilization ratio of the cells. The delay constraint of a task was not considered in [11][12][13] when defining the load. In this paper, we define the load as a computational workload required to complete a task, considering delay constraint. In addition, unlike in [11][12][13], in which tasks are migrated to one MECS, tasks in overloaded MECS may be migrated to one or more underloaded MECSs to distribute the loads evenly in the MEC system. The authors of [14,15] proposed a load balancing/resource allocation method in a framework, called dew computing, that integrates smart mobile devices into distributed and high-performance computing platforms. In [16], their method determined whether to offload a task or not in order to reduce the processing time, energy consumption of the smartphone and monetary cost. However, we determine whether/where to migrate to and partition among MECSs once the vehicles offload their tasks them in order to reduce the task execution delay and improve the system throughput. Therefore, we address a method in the collaborative edge computing framework that enables tasks to be processed outside of the communication coverage of the MECS offloaded from the vehicle. Thus, we consider task partitioning in which a task can be divided into a set of subtasks and computed by multiple MECSs in parallel. This can improve service reliability by reducing the task execution delay. In other words, by reducing the execution delay, a vehicle can obtain computing results without service interruption before it moves out of the coverage of a MECS. Resource utilization or energy consumption costs are additionally incurred in the process of partitioning or gathering the computing results, but there are more benefits, such as reducing execution time and improving system throughput.
In contrast to the methods used in [8][9][10][11][12][13] that migrate an entire task to the MECS without partitioning, the methods used in [17][18][19][20] addressed task migration with partitioning. In [17], the partitioned tasks were migrated to the serving MECS and cloud server to reduce the average total delay of tasks. In [18], to reduce the service delay, the partitioned tasks were migrated from the MECS in which the task was offloaded to the geographically nearest MECS. The task considered in [17,18] consisted of independent or sequentially dependent subtasks. In practice, a task is generally composed of multiple threads. For example, navigation applications frequently involve threads of graphics, camera preview, and video processing [21]. Each thread can be considered a subtask, so that computation tasks of the applications can be partitioned and the task can be modeled using a directed acyclic graph (DAG). In [19,20], methods were investigated to optimize performance in terms of delay and energy consumption. However, if the set of subtasks of a task migrates to the MECS without considering the loads of the MECSs, the total service delay may increase. This becomes useless if the subtasks migrate to a congested MECS or a specific MECS simultaneously. By selecting an appropriate MECS to which to migrate the subtasks and determining the amount of workload required of subtasks, the satisfaction of the task's QoS requirements can be improved. Task migration and partitioning methods based on machine learning were proposed in [6,7,11,14,22]. Generally, methods using machine learning require a huge amount of data for learning and analysis. However, since we assume a small clustered area with its own characteristics, the proposed MEC system is built on each area to optimize the performance, reflecting the characteristics of each area.
Therefore, we propose a method of task migration with partitioning using a heuristic algorithm to distribute loads among MECSs and execute the task in parallel in a collaborative edge computing framework. The set of subtasks in an overloaded MECS is migrated to one or more underloaded MECSs depending on the load difference between the overloaded and underloaded MECSs. Balancing the loads in the MEC system through task partitioning and migration can increase both the satisfaction of QoS requirements, such as low latency and service reliability, and MEC system throughput.
The remainder of this paper is organized as follows. In Section 2, we describe the system model and the problem formulation. In Section 3, we introduce the proposed method in detail. In Section 4, we present and discuss the simulation results. Finally, Section 5 concludes the study.

System Model and Problem Formulation
The MEC system proposed in this paper is shown in Figure 1. We consider a MEC system comprising a set of MECSs, M, located in roadside units (RSUs) and a set of vehicles, N. A MECS can provide seamless communication and computing service coverage for vehicles on the road. We assume that the MECSs communicate with each other through wired links, so communication latency and bandwidth can be ignored [20,23]. Each MECS uses two queues: a waiting queue and computation queue. The waiting queue uses a limited task buffer to accommodate tasks offloaded from vehicles, and the computation queue operates in a first-in-first-out manner to process tasks. A MECS controller acts as a centralized controller with global knowledge of the MECSs in a system and is responsible for making the decisions for migration and partitioning. Time is divided into slots t, and each time slot has an equal duration of ∆s. We assume that the vehicle travels at speed s during the simulation.  During each time slot, vehicle offloads its task in which the data size i bits), the computation workload is (in CPU cycles), and the delay constraint which can be divided into several interdependent subtasks. The dependency am During each time slot, vehicle n offloads its task in which the data size is λ n (in bits), the computation workload is η n (in CPU cycles), and the delay constraint is T max n , which can be divided into several interdependent subtasks. The dependency among subtasks is modeled by a DAG, i.e., G(V, E ), where V is the set of dependent subtasks in task n and E is the set of dependencies between the subtasks in task n. Each subtask i in task n is associated with a computation workload η n,i . In this paper, we only consider the tree-structured task graph, where the out-degree of each vertex is equal to 1, except for that of the first vertex. The first and last subtasks compute at the serving MECS, to complete the first subtask and migrate other subtasks simultaneously [18], and to gather and transmit computing results at the end of the service session [13]. For example, in an autonomous driving application, recognizing a situation can be the first subtask and driving guidance can be the last subtask.
We assume that at the beginning of each time slot t, a vehicle offloads its tasks to the serving MECS, giving it the highest signal, as MECS m. The MECS receives the task offloaded from the vehicle, then the task is placed at the waiting queue of the MECS to be partitioned and migrated. At the end of time slot t, the MECS controller gathers the status information from the MECSs in the system. Based on the information, the MECS controller makes a decision of task migration and partitioning whether/where to migrate or partition tasks in the waiting queues of servers. According to the decision made by a MECS controller, at time slot τ + 1, the tasks stored in the waiting queues are placed into the computation queues of the servers to which they belong or the computation queues of other servers. Once tasks or subtasks are placed in the computation queue, they cannot be partitioned or migrated to another MECS additionally. Assuming that some subtasks in MECS m are migrated to another MECS m , the subtasks are performed in MECS m and m respectively, the computation results of subtasks are merged by MECS m, and sent to the vehicle. These operation of a MEC network are shown in Figure 2. During each time slot, vehicle offloads its task in which the data size i bits), the computation workload is (in CPU cycles), and the delay constraint which can be divided into several interdependent subtasks. The dependency amo tasks is modeled by a DAG, i.e., ( , ℰ), where is the set of dependent subtask and ℰ is the set of dependencies between the subtasks in task . Each subt task is associated with a computation workload , . In this paper, we only c the tree-structured task graph, where the out-degree of each vertex is equal to 1 for that of the first vertex. The first and last subtasks compute at the serving M complete the first subtask and migrate other subtasks simultaneously [18], and t and transmit computing results at the end of the service session [13]. For examp autonomous driving application, recognizing a situation can be the first subtask a ing guidance can be the last subtask.
We assume that at the beginning of each time slot , a vehicle offloads its tas serving MECS, giving it the highest signal, as MECS . The MECS receives the floaded from the vehicle, then the task is placed at the waiting queue of the MEC partitioned and migrated. At the end of time slot , the MECS controller gathers th information from the MECSs in the system. Based on the information, the MECS co makes a decision of task migration and partitioning whether/where to migrate or p tasks in the waiting queues of servers. According to the decision made by a ME troller, at time slot + 1, the tasks stored in the waiting queues are placed into t putation queues of the servers to which they belong or the computation queues servers. Once tasks or subtasks are placed in the computation queue, they canno titioned or migrated to another MECS additionally. Assuming that some sub MECS are migrated to another MECS ′, the subtasks are performed in M and ′ respectively, the computation results of subtasks are merged by MECS sent to the vehicle. These operation of a MEC network are shown in Figure 2. The data rate for forwarding the task offloaded from a vehicle to a MECS at t can be calculated as The data rate for forwarding the task offloaded from a vehicle to a MECS at time slot t can be calculated as where B n is the bandwidth allocated to a channel, P is the transmission power of the vehicle, H n,m is the channel gain between vehicle n and MECS m, and σ 2 is the received noise power.
The transmission delay to offload the task from the vehicle to its serving MECS is T trans The load imposed on the MECS by the task is the computational workload required to complete the task within the delay constraint. As the vehicle has already offloaded its task to the serving MECS and the task is placed in its waiting queue, the task must be completed within a time, excluding the transmission delay under the delay constraint. Therefore, the CPU cycles required to complete the tasks in the waiting queue are The load of each MECS is equal to the sum of the workloads of tasks in the waiting queue Q w m (t) of MECS m at the end of time slot t.
To measure whether the load of each MECS is evenly distributed among the MECSs in the MEC system, the MECS controller calculates the average load difference among the MECSs in the MEC system.
As the number of vehicles associated with each MECS is not evenly distributed, the number of tasks offloaded to the MECSs is not even. Therefore, because the workloads imposed on MECSs differ, the loads of some MECSs are high and those of others are low. If tasks are migrated to an overloaded MECS or a particular MECS simultaneously, the delay requirements of tasks may be violated because of the increased time spent in the waiting queue of the MECS. Thus, to increase the satisfaction of QoS requirements and system throughput, we propose a task migration with partitioning method to balance the loads among MECSs in the MEC system, as follows:

Task Partitioning and Migration Methods
In this section, we propose task migration with partitioning methods. To balance the loads among MECSs in a MEC system, the set of subtasks of tasks in an overloaded MECS migrate to underloaded MECSs. In addition, we determine the amount of workload of subtasks that must be migrated to a target MECS to reduce execution delay and improve system throughput. To increase the satisfaction of QoS requirements of tasks, we try to reduce the computation time of a task by increasing the concurrency of the clusters' computations. This is because the constraint of computation time for each cluster is required to guarantee the satisfaction of the delay constraint of a task but it is difficult to obtain the information for each cluster.

Task Partitioning Method
The following describes a task partitioning that divides tasks into a set of subtasks, i.e., clusters. The task is divided into a set of subtasks, and offloading them increases the parallelism of task execution, minimizing latency [24]. Therefore, we will apply a scenario in which the set of subtasks can be migrated to other MECSs, which can balance the loads among MECSs in the MEC system. In addition, the subtasks are executed collaboratively by MECSs in the system, which can improve the QoS requirements of tasks by minimizing the delay for computing and improving system throughput.
We assume that the task can be divided into a set of subtasks. We define the set of clusters as C, which consists of the subclusters C i , e.g., C = {C 2 , C 3 } (Figure 3). Cluster C i is a set that consists of subtasks i and all its successors in the task graph, except for the last subtask. For example, we have C 2 = {2, 4, 5, 8, 9, 10} and C 3 = {3, 6, 7}. We also define cluster C i , consisting of subcluster C j , e.g., C 5 is the subcluster of C 2 (C 5 ⊂ C 2 ). At this time, Appl. Sci. 2022, 12, 1168 6 of 15 subtask j is the direct successor of subtask i. As the clusters in C are not related to each other, each cluster can be migrated independently.
the delay for computing and improving system throughput.
We assume that the task can be divided into a set of subtasks. We define th clusters as , which consists of the subclusters , e.g., = { , } (Figure 3). Cl is a set that consists of subtasks and all its successors in the task graph, excep last subtask. For example, we have = {2,4,5,8,9,10} and = {3,6,7}. We also cluster , consisting of subcluster , e.g., is the subcluster of ( ⊂ ). time, subtask is the direct successor of subtask . As the clusters in are not to each other, each cluster can be migrated independently. may have more than one cluster; therefore, the order of clusters' migration be determined. We select the order of clusters with large computational workload have a large number of CPU cycles to compute the subtasks [20]. We represent t cycles required to complete the set of subtasks in a task as , which is calcu To balance the load among MECSs, particularly between ove and underloaded MECSs, the amount of workload of clusters is migrated using difference of MECSs. By migrating them in descending order cluster size, the loa overloaded MECS and underloaded MECS can be narrowed. If the condition that t ter workload is lower than the load difference between the overloaded and unde MECS is not satisfied, the large cluster will be split into smaller ones.

Task Migration Method
The proposed task migration method is presented in Algorithm 1. The obje our method is to balance the loads among MECSs in the MEC system, particul tween the overloaded and underloaded MECSs. The MECS controller must de which MECS to migrate from and select the target MECS ′ to migrate to. I migrates its task to target MECS ', the MECS controller must determine the t the amount of workload to be migrated to MECS ′. At the end of time slot , th controller monitors the load status of the MECSs. Subsequently, the MECS contro culates the average load of the MECSs in the MEC system as follows: The MECS controller classifies the overloaded or underloaded MECSs based average load. The MECSs whose loads are higher than ( ) are overloaded co with other MECSs as a set of . Similarly, the MECSs whose loads are equal to o than ( ) are underloaded compared with other MECSs as a set . To balance th among MECSs in the MEC system, particularly between the overloaded and unde MECSs, tasks in overloaded MECSs migrate to underloaded MECSs. Therefore, th controller determines that each MECS in set migrates its tasks to MECS . The MECS controller calculates the load difference between the MECS in set MECS in the set . This is expressed as follows: C may have more than one cluster; therefore, the order of clusters' migration should be determined. We select the order of clusters with large computational workloads, which have a large number of CPU cycles to compute the subtasks [20]. We represent the CPU cycles required to complete the set of subtasks in a task as l c i , which is calculated as η n,i /(T max n − T trans n ). To balance the load among MECSs, particularly between overloaded and underloaded MECSs, the amount of workload of clusters is migrated using the load difference of MECSs. By migrating them in descending order cluster size, the load of the overloaded MECS and underloaded MECS can be narrowed. If the condition that the cluster workload is lower than the load difference between the overloaded and underloaded MECS is not satisfied, the large cluster will be split into smaller ones.

Task Migration Method
The proposed task migration method is presented in Algorithm 1. The objective of our method is to balance the loads among MECSs in the MEC system, particularly between the overloaded and underloaded MECSs. The MECS controller must determine which MECS m to migrate from and select the target MECS m to migrate to. If MECS m migrates its task to target MECS m , the MECS controller must determine the task and the amount of workload to be migrated to MECS m . At the end of time slot t, the MECS controller monitors the load status of the MECSs. Subsequently, the MECS controller calculates the average load of the MECSs in the MEC system as follows: The MECS controller classifies the overloaded or underloaded MECSs based on their average load. The MECSs whose loads are higher than ζ(t) are overloaded compared with other MECSs as a set of α. Similarly, the MECSs whose loads are equal to or lower than ζ(t) are underloaded compared with other MECSs as a set β. To balance the loads among MECSs in the MEC system, particularly between the overloaded and underloaded MECSs, tasks in overloaded MECSs migrate to underloaded MECSs. Therefore, the MECS controller determines that each MECS m in set α migrates its tasks to MECS m in set β. The MECS controller calculates the load difference between the MECS in set α and MECS in the set β. This is expressed as follows: tasks in the waiting queue are placed into its computation queue

Simulation Results and Discussion
In this section, we verify the performance of the proposed method compared with other methods. It is assumed that the MEC system is deployed in a clustered area grouped by the units of administrative districts in the urban environments where MECSs are densely deployed and vehicles are not driving at high speed. We randomly distributed 10 MECSs within a MEC system. The capacity of each MECS was 10 GHz. Vehicles were distributed in a Poisson distribution on the road. All vehicles had mobility within a random walk model in an area of 1000 m × 1000 m using the SUMO simulator [25]. The input size of the task followed a random distribution with 2-10 Kbits. The task graph used in the simulation was randomly generated, where the workload of each subtask followed a random distribution with 0.1-0.2 Gcycles. The mobility speed of the vehicle also followed a random distribution of 1-30 m/s. The parameters used in the simulation are summarized in Table 1 according to [26][27][28]. The path loss between the RSU and vehicle was modeled as 128.1 + 37.6 log 10 (distance(km)). When vehicles offloaded their tasks simultaneously, the vehicles performed data transmission in different spectral bands via orthogonal frequencydivision multiple access technology, and there was mutual interference among different subcarrier allocations.
To demonstrate the reason for using task partition and migration in our method, we compared the Proposed method with No partition and No migration strategies. The Proposed method uses both task partitioning and migration. The No partition method migrates an entire task without any task partitioning to the target MECS, and the No migration method executes a task on the MECS in which the vehicle's task is offloaded without any task migration.
The load variance among the MECSs is shown in Figure 4. It shows the load variance of each time slot when the vehicle arrival rates were 0.3, 0.6 and 0.9. In other words, it is an indicator of the distribution of the load among MECSs during the simulation. In the Proposed method, the set of task subtasks in an overloaded MECS was migrated to underloaded MECSs. Under No partition method, the all tasks in the overloaded MECS were migrated to the underloaded MECS. Thus, the Proposed method further reduced the load difference between overloaded and underloaded MECSs compared with the No partition method. No migration method had a large load variance, because vehicles were not evenly distributed geographically and had high mobility; thus, the loads may have been concentrated in specific MECSs. To demonstrate the reason for using task partition and migration in our compared the Proposed method with No partition and No migration strategies. method uses both task partitioning and migration. The No partition method entire task without any task partitioning to the target MECS, and the No migr executes a task on the MECS in which the vehicle's task is offloaded with migration.
The load variance among the MECSs is shown in Figure 4. It shows the l of each time slot when the vehicle arrival rates were 0.3, 0.6 and 0.9. In othe an indicator of the distribution of the load among MECSs during the simu Proposed method, the set of task subtasks in an overloaded MECS was migra loaded MECSs. Under No partition method, the all tasks in the overloaded migrated to the underloaded MECS. Thus, the Proposed method further redu difference between overloaded and underloaded MECSs compared with the method. No migration method had a large load variance, because vehicles we distributed geographically and had high mobility; thus, the loads may have trated in specific MECSs.   The task completion rates within the delay constraints and task reliab shown in Figure 5 and Figure 6, respectively. The rate of task completion wi constraint is defined as the ratio of the number of completed tasks while delay constraint to the total number of offloaded tasks. The task reliability r as the ratio of the number of completed tasks to the total number of offloade receiving the result without the service interruption. The task completion ra delay constraints and task reliability rates are affected by the task executi example, for a congested MECS, the load of the MECS becomes overloaded crease the waiting time of the MECS queue, resulting in an increase in a t delay. As shown in Figure 5, depending on the load balancing among ME completion rates within the delay constraints had a high rate. Thus, if the t delay is prolonged, service interruption occurs when receiving its result. T result without service interruption, the vehicle must obtain the result qui moves out of the coverage of the MECS to which the task is offloaded. If the lo among MECSs is appropriate, the task execution delay will be reduced, and rate will be high. Therefore, the Proposed method had the highest rate, and th method had the lowest rate in terms of the task completion rates within t straints and task reliability rates. Therefore, it was better to perform migra and migration with partitioning performed better than full migration. The study, we considered task migration with partitioning. The task completion rates within the delay constraints and task reliability rates are shown in Figures 5 and 6, respectively. The rate of task completion within the delay constraint is defined as the ratio of the number of completed tasks while satisfying the delay constraint to the total number of offloaded tasks. The task reliability rate is defined as the ratio of the number of completed tasks to the total number of offloaded tasks while receiving the result without the service interruption. The task completion rates within the delay constraints and task reliability rates are affected by the task execution delay. For example, for a congested MECS, the load of the MECS becomes overloaded. This can increase the waiting time of the MECS queue, resulting in an increase in a task execution delay. As shown in Figure 5, depending on the load balancing among MECSs, the task completion rates within the delay constraints had a high rate. Thus, if the task execution delay is prolonged, service interruption occurs when receiving its result. To receive the result without service interruption, the vehicle must obtain the result quickly before it moves out of the coverage of the MECS to which the task is offloaded. If the load balancing among MECSs is appropriate, the task execution delay will be reduced, and the reliability rate will be high. Therefore, the Proposed method had the highest rate, and the No migration method had the lowest rate in terms of the task completion rates within the delay constraints and task reliability rates. Therefore, it was better to perform migration than not, and migration with partitioning performed better than full migration. Therefore, in this study, we considered task migration with partitioning.
(c) The task completion rates within the delay constraints and task relia shown in Figure 5 and Figure 6, respectively. The rate of task completion w constraint is defined as the ratio of the number of completed tasks while delay constraint to the total number of offloaded tasks. The task reliability as the ratio of the number of completed tasks to the total number of offload receiving the result without the service interruption. The task completion r delay constraints and task reliability rates are affected by the task execu example, for a congested MECS, the load of the MECS becomes overloade crease the waiting time of the MECS queue, resulting in an increase in a delay. As shown in Figure 5, depending on the load balancing among M completion rates within the delay constraints had a high rate. Thus, if the delay is prolonged, service interruption occurs when receiving its result. result without service interruption, the vehicle must obtain the result qu moves out of the coverage of the MECS to which the task is offloaded. If the among MECSs is appropriate, the task execution delay will be reduced, and rate will be high. Therefore, the Proposed method had the highest rate, and th method had the lowest rate in terms of the task completion rates within straints and task reliability rates. Therefore, it was better to perform migr and migration with partitioning performed better than full migration. Th study, we considered task migration with partitioning.   To verify the performance of our proposed method, we compared it with fo methods: IPSO [20], Nearest, Least and Random. IPSO aims to minimize the servic probability by considering task execution delay. It is a method of migrating MECSs that meet the latency constraint of the subtasks. IPSO defines the workloa subtasks as the ratio of the sum of the required CPU cycles to the sum of its in output data. Nearest is a method of migrating tasks in overloaded MECSs to the MECS among underloaded MECSs. Least is a method of migrating tasks in ove MECSs to the least loaded MECS among underloaded MECSs. Random is a m migrating tasks in overloaded MECSs to randomly selected MECSs among unde MECSs.
The task completion rates within the delay constraints under different values constraints are shown in Figure 7 for a vehicle arrival rate of 0.6. Proposed achie highest completion rate for different values of the delay constraint, a value of mately 35-60% higher than that of other methods. The task reliability rate under values of mobility speed of vehicles is shown in Figure 8 for a vehicle arrival ra Service interruption occurs when the vehicle can travel out of the coverage of th that is offloaded during a service session, which significantly increases the tota latency. We observed that Proposed achieved the highest task reliability rate for values of mobility speed, approximately 20-51% higher than that of other met comparison of the environment with high and low speeds indicated differences of imately 8% for Proposed, 11% for IPSO, 15% for Nearest, 17% for Least, and 13% for Under conditions with different delay constraints and mobility speed, Proposed pe better than that of others by optimizing the load balancing, which reduces the tas tion delay. Therefore, we conducted the experiment by setting the delay constrain 0.6 and the mobility speed to 1-30 / . To verify the performance of our proposed method, we compared it with four other methods: IPSO [20], Nearest, Least and Random. IPSO aims to minimize the service failure probability by considering task execution delay. It is a method of migrating tasks to MECSs that meet the latency constraint of the subtasks. IPSO defines the workload of the subtasks as the ratio of the sum of the required CPU cycles to the sum of its input and output data.
Nearest is a method of migrating tasks in overloaded MECSs to the nearest MECS among underloaded MECSs. Least is a method of migrating tasks in overloaded MECSs to the least loaded MECS among underloaded MECSs. Random is a method of migrating tasks in overloaded MECSs to randomly selected MECSs among underloaded MECSs.
The task completion rates within the delay constraints under different values of delay constraints are shown in Figure 7 for a vehicle arrival rate of 0.6. Proposed achieved the highest completion rate for different values of the delay constraint, a value of approximately 35-60% higher than that of other methods. The task reliability rate under different values of mobility speed of vehicles is shown in Figure 8 for a vehicle arrival rate of 0.6. Service interruption occurs when the vehicle can travel out of the coverage of the MECS that is offloaded during a service session, which significantly increases the total service latency. We observed that Proposed achieved the highest task reliability rate for different values of mobility speed, approximately 20-51% higher than that of other methods. A comparison of the environment with high and low speeds indicated differences of approximately 8% for Proposed, 11% for IPSO, 15% for Nearest, 17% for Least, and 13% for Random. Under conditions with different delay constraints and mobility speed, Proposed performed better than that of others by optimizing the load balancing, which reduces the task execution delay. Therefore, we conducted the experiment by setting the delay constraints to 0.1-0.6 s and the mobility speed to 1-30 m/s. To verify the performance of our proposed method, we compared it w methods: IPSO [20], Nearest, Least and Random. IPSO aims to minimize the probability by considering task execution delay. It is a method of migr MECSs that meet the latency constraint of the subtasks. IPSO defines the w subtasks as the ratio of the sum of the required CPU cycles to the sum o output data. Nearest is a method of migrating tasks in overloaded MECSs MECS among underloaded MECSs. Least is a method of migrating tasks MECSs to the least loaded MECS among underloaded MECSs. Random i migrating tasks in overloaded MECSs to randomly selected MECSs amon MECSs.
The task completion rates within the delay constraints under different constraints are shown in Figure 7 for a vehicle arrival rate of 0.6. Propose highest completion rate for different values of the delay constraint, a val mately 35-60% higher than that of other methods. The task reliability rate u values of mobility speed of vehicles is shown in Figure 8 for a vehicle arr Service interruption occurs when the vehicle can travel out of the coverag that is offloaded during a service session, which significantly increases th latency. We observed that Proposed achieved the highest task reliability ra values of mobility speed, approximately 20-51% higher than that of oth comparison of the environment with high and low speeds indicated differen imately 8% for Proposed, 11% for IPSO, 15% for Nearest, 17% for Least, and 13 Under conditions with different delay constraints and mobility speed, Propo better than that of others by optimizing the load balancing, which reduces tion delay. Therefore, we conducted the experiment by setting the delay con 0.6 and the mobility speed to 1-30 / .    Figure 9 shows the load variance among the MECSs when the arrival 0.6 and 0.9. In Proposed, the set of subtasks in the task was migrated to one MECSs depending on the load difference. In Nearest and Random, the set of task was migrated to the target MECSs based on distance and randomnes set of subtasks in the task is migrated to the least loaded MECS, which indic in which the least loaded MECS was concentrated. Therefore, depending o was selected as the target MECS, the loads of the MECSs varied. In IPSO, tasks was migrated based on delay constraint. Proposed shows better per IPSO in terms of load variance because proposed considers load differenc the task migration. IPSO shows better performance than Nearest, Random cause it is affected by the delay, especially the queueing delay associated w the MECS. Figure 10 depicts the average blocking rate and standard deviation o rate with varying arrival rates. The blocking rate is defined as the ratio of tasks blocked by the MECS to the total number of offloaded tasks. The task the MECS when the task is offloaded to a MECS whose queue is full. In N dom, the target MECS may be another overloaded MECS or may become o ing to concentrating tasks on it. In Least, because tasks in overloaded MECS to the least loaded MECS, the least-loaded MECS becomes overloaded. The some MECSs have a high load, the task may be blocked when it is offloade with a high load. In IPSO, when all MECSs in MEC system do not meet straints for the subtasks, the subtasks migrate to the MECS that minimizes delay. In this case, since only the processing delay is considered, there is overloaded MECS is selected. Proposed not only had the lowest blocking ra smallest standard deviation compared with the other methods because the tively well distributed. The system throughput with varying arrival rates is ure 11. The system throughput is defined as the multiplication of the nu completed per time slot by the average task size. When the loads are balan MECSs, the block rate decreases. In addition, if the block rate decreases, m be performed; thus, the system throughput increases.  Figure 9 shows the load variance among the MECSs when the arrival rates were 0.3, 0.6 and 0.9. In Proposed, the set of subtasks in the task was migrated to one or more target MECSs depending on the load difference. In Nearest and Random, the set of subtasks in the task was migrated to the target MECSs based on distance and randomness. In Least, the set of subtasks in the task is migrated to the least loaded MECS, which indicated a scenario in which the least loaded MECS was concentrated. Therefore, depending on which MECS was selected as the target MECS, the loads of the MECSs varied. In IPSO, the set of subtasks was migrated based on delay constraint. Proposed shows better performance than IPSO in terms of load variance because proposed considers load difference to determine the task migration. IPSO shows better performance than Nearest, Random and Least, because it is affected by the delay, especially the queueing delay associated with the load of the MECS. Figure 10 depicts the average blocking rate and standard deviation of the blocking rate with varying arrival rates. The blocking rate is defined as the ratio of the number of tasks blocked by the MECS to the total number of offloaded tasks. The task is blocked by the MECS when the task is offloaded to a MECS whose queue is full. In Nearest and Random, the target MECS may be another overloaded MECS or may become overloaded owing to concentrating tasks on it. In Least, because tasks in overloaded MECSs are migrated to the least loaded MECS, the least-loaded MECS becomes overloaded. Therefore, because some MECSs have a high load, the task may be blocked when it is offloaded to the MECS with a high load. In IPSO, when all MECSs in MEC system do not meet the delay constraints for the subtasks, the subtasks migrate to the MECS that minimizes the computing delay. In this case, since only the processing delay is considered, there is likely that the overloaded MECS is selected. Proposed not only had the lowest blocking rate but also the smallest standard deviation compared with the other methods because the load was relatively well distributed. The system throughput with varying arrival rates is shown in Figure 11. The system throughput is defined as the multiplication of the number of tasks completed per time slot by the average task size. When the loads are balanced among the MECSs, the block rate decreases. In addition, if the block rate decreases, more tasks can be performed; thus, the system throughput increases. Figures 12 and 13 show the rate of task completion within the delay constraints and task reliability rate, respectively. The task completion rate within the delay constraints is affected by the task execution delay consisting of transmission, queueing, execution, and migration delay. Similarly, task reliability is affected by the task execution delay. A migration delay is the time a task is migrated to another MECS, which does not account for most of the total delay because it uses wired links. The queueing delay is affected by the load of the MECS, that is, the length of the queue of the MECS. Increasing the parallelism of task execution reduces the execution delay. Therefore, the better the loads of MECSs are distributed, the less the queuing delay affected by the MECS load and queue length, increasing the task completion rate within the delay constraints. The task completion rate of Proposed was approximately 18-58% higher than that of other methods. If the task execution delay is prolonged, the vehicle may move out of the coverage of the MECS, which is offloaded to the task during a service session. Thus, service interruption may occur more often in receiving its result. To receive the result without the service interruption, the loads of the MECS must be appropriately distributed to reduce the task execution delay. The reliability rate of Proposed was approximately 12-46% higher than that of the other methods because it distributed the loads of MECSs well.
to the least loaded MECS, the least-loaded MECS becomes overloaded. Ther some MECSs have a high load, the task may be blocked when it is offloaded with a high load. In IPSO, when all MECSs in MEC system do not meet t straints for the subtasks, the subtasks migrate to the MECS that minimizes t delay. In this case, since only the processing delay is considered, there is l overloaded MECS is selected. Proposed not only had the lowest blocking rat smallest standard deviation compared with the other methods because the l tively well distributed. The system throughput with varying arrival rates is ure 11. The system throughput is defined as the multiplication of the nu completed per time slot by the average task size. When the loads are balanc MECSs, the block rate decreases. In addition, if the block rate decreases, m be performed; thus, the system throughput increases.      Figures 12 and 13 show the rate of task completion within the d task reliability rate, respectively. The task completion rate within the affected by the task execution delay consisting of transmission, queu migration delay. Similarly, task reliability is affected by the task exe gration delay is the time a task is migrated to another MECS, which    Figures 12 and 13 show the rate of task completion within the d task reliability rate, respectively. The task completion rate within the affected by the task execution delay consisting of transmission, queu migration delay. Similarly, task reliability is affected by the task exe gration delay is the time a task is migrated to another MECS, which . Sci. 2022, 12,1168 most of the total delay because it uses wired links. The queueing de load of the MECS, that is, the length of the queue of the MECS. Incre of task execution reduces the execution delay. Therefore, the bette are distributed, the less the queuing delay affected by the MECS lo increasing the task completion rate within the delay constraints. The of Proposed was approximately 18-58% higher than that of other me cution delay is prolonged, the vehicle may move out of the coverag is offloaded to the task during a service session. Thus, service int more often in receiving its result. To receive the result without the the loads of the MECS must be appropriately distributed to reduce t lay. The reliability rate of Proposed was approximately 12-46% higher methods because it distributed the loads of MECSs well.

Conclusions
In this paper, we investigated task migration with partitioning m networks to balance loads among MECSs in a MEC system. We cons which the vehicle can offload its task to a serving MECS and the tas into a set of subtasks. To balance the load among MECSs, overloade the set of subtasks to one or more underloaded MECSs, depending on of the overloaded and underloaded MECSs. We compared the prop conventional methods through simulations, and the results indicated method distributed the load appropriately among MECSs. In addi method increased the completion rate within the delay constraints an put. In addition, the blocking rate and service interruption caused were reduced. In future research, we will consider task scheduling w to be partitioned or when executing the task to reduce the task execu more, we will expand the proposed method in a distributed manner plexity of the MECS controller in a more dynamic environment. We

Conclusions
In this paper, we investigated task migration with partitioning method in vehicular networks to balance loads among MECSs in a MEC system. We considered a scenario in which the vehicle can offload its task to a serving MECS and the task could be divided into a set of subtasks. To balance the load among MECSs, overloaded MECSs migrated the set of subtasks to one or more underloaded MECSs, depending on the load difference of the overloaded and underloaded MECSs. We compared the proposed method with conventional methods through simulations, and the results indicated that the proposed method distributed the load appropriately among MECSs. In addition, the proposed method increased the completion rate within the delay constraints and system throughput. In addition, the blocking rate and service interruption caused by vehicle mobility were reduced. In future research, we will consider task scheduling when selecting a task to be partitioned or when executing the task to reduce the task execution delay. Furthermore, we will expand the proposed method in a distributed manner to reduce the complexity of the MECS controller in a more dynamic environment. We will investigate the multi-agent learning or federated learning methods to determine the optimal migration and partitioning strategy in the extended MEC system.