Loading [MathJax]/jax/output/SVG/jax.js
Saiqin LONG, Cong WANG, Weifan LONG, et al., “An Efficient Task Scheduling Algorithm in the Cloud and Edge Collaborative Environment,” Chinese Journal of Electronics, vol. 33, no. 5, pp. 1296–1307, 2024. DOI: 10.23919/cje.2022.00.223
Citation: Saiqin LONG, Cong WANG, Weifan LONG, et al., “An Efficient Task Scheduling Algorithm in the Cloud and Edge Collaborative Environment,” Chinese Journal of Electronics, vol. 33, no. 5, pp. 1296–1307, 2024. DOI: 10.23919/cje.2022.00.223

An Efficient Task Scheduling Algorithm in the Cloud and Edge Collaborative Environment

More Information
  • Author Bio:

    LONG Saiqin: Saiqin LONG is with the College of Information Science and Technology, Jinan University, Guangzhou, China, and also with the Hunan International Scientific and Technological Cooperation Base of Intelligent Network, the Key Laboratory of Hunan Province for Internet of Things and Information Security, School of Computer Science, Xiangtan University, Xiangtan, China. (Email: xxgcxyxtu@sina.com)

    WANG Cong: Cong WANG received the B.E. degree in computer science and technology from Zhengzhou University, Zhengzhou, China in 2021, and he is a M.E. candidate in the School of Computer Science, Xiangtan University. His research interests include cloud computing, container scheduling, and cloud-side collaboration. He is a Member of the China Computer Federation (CCF). (Email: congwcn@foxmail.com)

    LONG Weifan: Weifan LONG received the B.E. degree and M.E degree in computer science and technology from Xiangtan University, in 2018 and 2021, respectively. He is a Ph.D. candidate with the Academy for Engineering Technology, Fudan University, Shanghai, China. His research interests include cloud computing, game theory, reinforcement learning

    LIU Haolin: Haolin LIU received the B.E. and Ph.D. degree from Sichuan University, Chengdu, China. He is currently an Associate Professor with the Key Laboratory of Hunan Province for Internet of Things and Information Security and School of Computer Science, Xiangtan University. His research interests include mobile edge computing, wireless sensor networks, and Internet of things

    DENG Qingyong: Qingyong DENG is an Associate Professor at the School of Computer Science and Engineering and the School of Software, Guangxi Normal University. He received the M.E. degree from Xiangtan University and Ph.D. degree from Beijing University of Posts and Telecommunications. His research interests include IoT, compressed sensing, wireless network, etc. (Email: dengqingyong@xtu.edu.cn)

    LI Zhetao: Zhetao LI is a Professor in the School of Computer Science, Xiangtan University. He received the B.E. degree from Xiangtan University, the M.E. degree from Beihang University, and the Ph.D. degree from Hunan University. From Dec 2013 to Dec 2014, he was a Post-doc in wireless network at Stony Brook University, NY, USA. (Email: liztchina@hotmail.com)

  • Corresponding author:

    LI Zhetao, Email: liztchina@hotmail.com

  • Received Date: July 20, 2022
  • Accepted Date: January 04, 2023
  • Available Online: March 21, 2022
  • Published Date: September 04, 2024
  • With the advent of the 5G era and the accelerated development of edge computing and Internet of Things technologies, the number of tasks to be processed by mobile devices continues to increase. Edge nodes become incapable of facing massive tasks due to their own limited computing capabilities, and thus the cloud and edge collaborative environment is produced. In order to complete as many tasks as possible while meeting the deadline constraints, we consider the task scheduling problem in the cloud-edge and edge-edge collaboration scenarios. As the number of tasks on edge nodes increases, the solution space becomes larger. Considering that each edge node has its own communication range, we design an edge node based clustering algorithm (ENCA), which can reduce the feasible region while dividing the edge node set. We transform the edge nodes inside the cluster into a bipartite graph, and then propose a task scheduling algorithm based on maximum matching (SAMM). Our ENCA and SAMM are used to solve the task scheduling problem. Compared with the other benchmark algorithms, experimental results show that our algorithms increase the number of the tasks which can be completed and meet the latest deadline constraints by 32%–47.2% under high load conditions.
  • With the advent of the 5G era, the continuous and rapid development of cloud computing and edge computing will bring more and more convenience to people’s lives. Cloud computing tasks are received, collected and processed in a centralized data center. The centralized structure facilitates the management of cloud computing [1], but it is difficult to respond to requests from mobile devices quickly and effectively [2]. In order to reduce the network transmission delay and network congestion from mobile devices to the cloud, edge computing places analysis and calculation at the edge of the network, which provides a solution to the long response delay problem of cloud computing [3], [4]. Although edge computing can provide fast response to services, it still has performance bottleneck due to its limited computing power, and cloud centers can share their unlimited computing and storage resources. Therefore, the collaboration between edge nodes and cloud centers has attracted more and more attention from enterprises [5], [6].

    In the cloud and edge collaborative environment, there are still some challenges. Edge computing extends computing resources, communication resources, and storage resources to the edge of the network. There are a large number of computing-sensitive and delay-sensitive applications at the edge [7], [8], such as face recognition, virtual reality, human-computer interaction, and natural language processing, etc. These applications have very strict requirements for time delay. However, the key problem is that the computational capability of edge nodes is limited, and only processing tasks at the edge nodes themselves will bring a high load to the nodes and make it impossible for a large number of tasks to respond quickly. If tasks with high computing requirements are dispatched to the central cloud for processing, there will be another problem, that is, although the central cloud has powerful computing capabilities, the longer transmission distance between edge nodes and the cloud center will inevitably bring higher delays. Therefore, how to achieve low-latency task scheduling in a cloud and edge collaborative environment has become a key issue to be solved urgently.

    In order to solve the above problems, under the cloud and edge collaboration environment, we not only consider the collaboration between edge nodes and the cloud center, but also consider the collaboration among edge nodes to better utilize the resources of other adjacent edge nodes. Specifically, when a task arrives at an edge node, if the edge node has sufficient resources, the task will be processed at this edge node without migrating to other nodes for execution. When the load of the edge node is too high, tasks on this node can be migrated to other adjacent edge nodes which takes full advantage of nearby low-load nodes to share the pressure of high-load nodes, and they can also be scheduled to cloud centers for processing. In summary, we strive to find a task scheduling scheme in the cloud and edge collaborative environment, which aims to take full advantage of edge node and cloud center resources to maximize the number of tasks that can completed and meet the users’ low-latency requirements. The main contributions of this article are as follows:

    • In order to make full use of the computing resources of edge nodes and the cloud, this paper considers the vertical collaboration between edge nodes and the cloud center and the horizontal collaboration among edge nodes, and proposes a task scheduling strategy in this environment which aims to maximize the number of tasks that can be completed under the constraint of the latest completion deadline.

    • An edge node clustering algorithm (ENCA) according to the communication range of edge nodes is proposed. Tasks can be scheduled within the cluster. ENCA narrows the feasible domain of task scheduling decision and reduces the search time of scheduling strategy.

    • The clustering is transformed into a bipartite graph, and a scheduling algorithm based on maximum matching (SAMM) is designed to find a local optimal strategy. Combining the above two algorithms, a task scheduling algorithm (ENCA+SAMM) suitable for the cloud-edge and edge-edge collaborative environment is obtained.

    The rest of this paper is organized as follows. Section II discusses related work. The task scheduling model is introduced in Section III. In Section IV, we propose a task scheduling strategy based on bipartite matching. Section V discusses the experimental results in a simulation environment, which confirms the effectiveness of the method. Finally, Section VI draws the conclusion and outlines future work.

    In edge environments, researchers have done a lot of work on task scheduling to meet the latency requirements of the tasks. When it came to the solving of task execution delays, Miao et al. [9] used long and short-term memory (LSTM) to predict computing tasks, and designed a prediction-based computing offloading strategy that minimizes the response delay in an edge computing environment. Yuan et al. [10] used online learning to estimate network conditions and server loads in real time, and then dynamically assigned the task to the best edge server. At the same time, in each edge server, an online task dispatching and fair scheduling (OTDS) method is proposed by combining the loop mechanism with deep reinforcement learning, which can allocate appropriate resources for each task according to the time sensitivity of each task to achieve efficient task scheduling. Zhao et al. [11] designed a collaborative computing offloading and resource allocation optimization scheme and a distributed computing offloading and resource allocation algorithm to reduce task execution delay. Xu et al. [12] proposed a multi-objective evolutionary algorithm based on decomposition (MOEA/D) to minimize transmission delay and maximize resource utilization. Zheng et al. [13] proposed an extended Hungarian algorithm in an edge computing environment to obtain smaller delays and achieve sustainable services. Edinger et al. [14] proposed a decentralized low-latency task scheduling method that can minimize job execution time. Sun et al. [15] were committed to computing offloading in the edge computing environment, and proposed a solution to the time delay minimization problem with energy consumption constraints.

    When it came to reducing the energy consumption of task scheduling in edge environments, Dinh et al. [16] aimed to find a multi-task offloading solution to multiple different access points and edge servers, and to achieve the joint goal of minimizing delay and energy consumption. Xu et al. [17] proposed a multi-objective evolutionary algorithm based on NSGA-II to optimize the offloading time of computing tasks and the energy consumption of edge nodes at the same time. Zhang et al. [18] studied the problem of minimizing the energy cost of offloading tasks to multiple nodes. Subsequently, they modeled energy consumption from task calculation and communication respectively, and a scheme based on artificial fish swarm algorithm was developed to solve the energy optimization problem [19].

    In summary, although some of the current work in the edge environment can meet the latency requirements of tasks, the adoption of machine learning algorithms and meta-heuristic algorithms in the edge environment brings a large computational latency due to the limitation of its own resources and computational capacity. Meanwhile, edge nodes often face the problem of insufficient capacity when dealing with computationally intensive and latency-sensitive applications. Hence, researchers start to take advantage of cloud computing and focus on task scheduling in cloud and edge collaborative environments.

    In the cloud and edge collaborative environment, the task scheduling problem becomes more complicated. More researchers mainly focus on energy consumption in a cloud and edge collaborative environment. Long et al. [20] used game theory to solve the task scheduling problem in the cloud and edge collaborative environment, and it was constructed as a non-cooperative game among multi-agents. For each agent, they defined a function about the expected cost of a task as its utility function, and they tried to minimize the function value under user quality of service constraints. Tan et al. [21] studied the online task scheduling algorithm in the cloud and edge system to minimize the total response time of all tasks. Long et al. [22] studied offloading tasks of applications to edge servers or the cloud to minimize energy consumption. Du et al. [23] discussed computing offloading in a cloud and edge collaborative environment, and designed a heuristic task offloading algorithm to save overhead. Liu et al. [24] studied the energy saving problem of multiple devices, expressed the problem as a 0-1 nonlinear integer programming one, and proposed an iterative decoupling algorithm composed of decision variable relaxation and convex optimization to obtain approximate optimal decision making. Duan et al. [25] constructed a prediction algorithm based on fractal mathematics, and designed an improved ant colony algorithm based on the prediction results to search the scheduling strategy, which minimizes energy consumption while ensuring the QoS of users. Gai et al. [26] proposed a novel task allocation algorithm between heterogeneous cores and mobile cloud to reduce the total energy consumption of mobile heterogeneous embedded systems. Li et al. [27] focused on the parallel job scheduling problem composed of a set of independent tasks, and considered the energy consumption in the scheduling process. They proposed an algorithm to solve the single-task scheduling problem and designed an online scheduler. Peng et al. [28] proposed three constrained multi-objective evolutionary algorithms to solve the problem of computing offloading supporting the Internet of things in cloud and edge collaborative environment. Wang et al. [29] proposed a task scheduling algorithm based on the Cataclysm strategy on the basis of genetic algorithm, which realized the goal of minimum total execution time.

    Task scheduling in cloud and edge collaborative environments solves the problem of insufficient computing power at the edge nodes, but it also brings some new problems along with it. If tasks generated by mobile devices are simply scheduled to the nearest edge node, it can lead to too many mobile devices competing for limited computational resources, resulting in load imbalance and performance degradation at the edge nodes. In the above work, they can execute tasks inside the edge nodes or offload them to the cloud. However, these approaches do not fully utilize the resources of the adjacent edge nodes.

    Compared to previous work, we consider scheduling tasks in the environment of cloud-edge collaboration and edge-edge collaboration. Meanwhile, to reduce the computational latency, we consider clustering the edge nodes to reduce the size of the search space. First, a heuristic algorithm is used for all nodes to filter out the tasks that the edge nodes can handle by themselves, which significantly reduces the computation time for task scheduling. Then, for the remaining tasks, we use bidirectional matching to schedule them to other edge nodes within the cluster to obtain the overall optimal allocation result.

    As illustrated in Figure 1, We consider the system with one cloud center and m edge nodes is denoted by a set E={E1,E2,,Em}. Edge node i is denoted as Ei=(lxi,lyi,pi), where lxi and lyi represent the two-dimensional coordinates of edge node i, respectively, and pi is the computational capability of edge node i. C=(bwc,pc) is used to denote the cloud center, where bwc and pc represent bandwidth and computational capability of the cloud center, respectively. pi and pc are measured by the CPU clock speed (i.e., the number of CPU cycles per second). In this paper, we assume that edge nodes have received computation tasks from mobile computing devices. Therefore, they all have a task processing queue. Each edge node can decide where the task will be processed, such as being processed at the current edge node, or migrated to another edge node, or uploaded to the cloud center. We denote Jij=(Lij,Sij,Dij) as the j-th computation task in the edge node i, where Lij is the input data-size of the task, Sij represents the number of CPU cycles required to accomplish one-bit data of Jij, and Dij denotes the deadline of the computation task Jij. Note that the information of computation task is known by the scheduler in advance. Moreover, each edge node connects with the others through a wireless channel, and edge nodes communicate with the cloud center through different backhaul links.

    Figure  1.  System model representation of the concept lattice.

    Therefore, the problem to be studied in this paper can be described as how to determine the processing location of the task, that is, execute it on the local node or migrate to another edge node or upload to the cloud, so as to maximize the number of computing tasks that meets the deadline constraint.

    We model both the edge node and the cloud center as a single service system, which means that tasks have to wait to be computed (i.e., there is a waiting time before task processing). The number of CPU cycles needed for accomplishing the computation task Jij is LijSij. According to the computation model in [30] and [31], the computation delay for processing task Jij at edge node k can be expressed as

    CTijk=WTkij+LijSijpk (1)

    where WTkij is the waiting time for computation task Jij in edge node Ek. Similarly, the computation delay for task Jij in cloud center is denoted by

    CTijc=WTcij+LijSijpc (2)

    where WTcij is the waiting time for computation task Jij at the cloud center. WTkij and WTcij may change when the scheduling strategy changes, their values are closely relevant to the decision of edge nodes. Since the paper does not consider the problem of the device layer, the edge node channel is smooth enough, ignoring the time of task transmission between nodes. The transmission time TTij of task j from edge node i to cloud center is

    TTij=LijWc (3)

    where Wc1 represents the time required for the backhaul line to transmit 1 bit data [32], [33].

    Edge nodes will make decisions at the beginning of a time interval, and schedule the tasks which arrive at the last time interval. Denote the time interval of all edge nodes and the cloud center is τ. There are m edge nodes E={E1,E2,,Em}, and we assume that edge node Ei has to deal with ni computation tasks Ji={Ji1,Ji2,,Jini}. We ignore tasks with a deadline bigger than τ in this paper. Actually, those tasks are non-delay sensitive in general, they are more suitable for uploading to the cloud for processing. For all tasks waiting for scheduling, we try to maximize the number of computation tasks satisfying the constraint of deadline. For the beauty of the formula, we denote M+={1,2,,m}, M={1,2,,m+1}, Ni={1,2,,ni}. Let xijk represents the processing decision of tasks, which can be defined as follows:

    xijk={0,Jij of Ei is not processed on Ek1,Jij of Ei is processed on Ek

    Then, the optimization problem is defined as follows:

    P1:maxz=iM+jNikMxijk (4)
    xijk{0,1},iM+,jNi,kM (5)
    m+1k=1xijk=1,iM+,jNi (6)
    mi=1nij=1xijkLijSijpkτ,kM+ (7)
    xijkCTijkDij,iM+,jNi,kM+ (8)
    xijk(CTijc+TTij)Dij,iM+,jNi,k=m+1 (9)

    where k=m+1 means that the task will be uploaded to the cloud center.

    Equation (6) guarantees that each task will be allocated to only one device. Equation (7) indicates that computing requirements of all tasks assigned to an edge node must be less than the computational capability that the edge node can provide. Equations (8) and (9) are the deadline constraints of each task.

    If the value of all tasks is regarded as 1, and the execution length (LijSij) of the task is regarded as the weight of the task. Edge nodes and cloud center are regarded as knapsacks. The knapsack size is the product of computational capability and time interval (piτ). Then, equation (7) means the sum weight of items which is allocated to knapsack k is less than the capacity of knapsack k, equations (8) and (9) are the assignment constraints. Then, the optimization problem can be converted to a multiple knapsacks problem with assignment restrictions (MKAR) which has been proved to be a strongly NP-hard problem [34]. It is hard to find the optimal solution and dynamic programming is impractical for it [35]. In addition, edge nodes are distributed on the edge of the network, and they provide low latency services for customers. Therefore, meta-heuristic algorithms which have large algorithm execution delay are impractical in edge computing environment.

    Since the primal problem is a NP-hard problem, and edge nodes have high real-time requirements. Designing a heuristic algorithm to find a local optimal solution is an appropriate approach. The problem can be turned into a typical single core task scheduling problem when only considering an edge node without the cloud center. Thus, we can use a single core task scheduling algorithm, which has been full researched, to decide which tasks are processed on local node. If all nodes employ a single core task scheduling algorithm first (we call it as the filtering method in the rest of the paper), then the whole system can be turned to a bipartite graph as shown in Figure 2.

    Figure  2.  Bipartite graph.

    The yellow vertexes (underload nodes) represent edge nodes which can finish all tasks belonging to them and adhere to all task completion time constraints, the other edge nodes are the blue vertexes (high load nodes), the cloud center is the green vertex. Let m denote the number of high load nodes, the number of underload nodes is mm, then the number of the cloud data center is defined as mm+1. After filtering method, most of computation tasks in Ji will be processed on the edge node Ei. We assume the number of remaining tasks is ni. Then, problem P1 can be rewritten as

    P2:maxz=iM+jNikMyijk (10)

    and the constraints are similar to (5)–(9), but (M+,M,Ni,xijk) is changed to (M+,M,Ni,yijk), accordingly, in which M+={1,2,,m}, M={1,2,,mm,mm+1}, and Ni={1,2,,ni}. It is easy to find that the feasible region is reduced through the filtering method, ni might be much less than ni, and ||M+||+||M||=||M||. ||M|| denotes the overall set of edge nodes and cloud nodes in P1. In addition, the precedence relations between tasks can be ignored, i.e., there is a specific collation by using the filtering method.

    We have described the original scheduling problem and analyzed that it is difficult to solve the problem in polynomial time. Therefore, in this section, we first adopt a filtering method to reduce the number of tasks to be scheduled. Even in this way, the solution space is still too huge to satisfy the real-time requirements of tasks in the edge computing environment. Furthermore, in order to further reduce the solution space, we propose an adaptive clustering algorithm based on the communication range of the edge node to cluster edge nodes. Finally, we provide a scheduling algorithm based on maximum bipartite matching for every clustering.

    Edge nodes communicate with each other through a wireless network, and each node has a communication range. When an edge node wants to migrate tasks to a distant edge node, it may need to request some intermediate nodes to help with the transmission work. There will be much more transmission time and higher network load in this way. Therefore, we design an adaptive clustering algorithm based on the communication range of edge nodes, named edge node clustering algorithm (see Algorithm 1).

    Algorithm 1 Edge node clustering algorithm (ENCA)
    Input: E,k,r,ϵ.
    Output: clusters.
    1: Initialize: clusters is empty;
    2: Randomly select k centroids as
          μ,μ={μ1,μ2,,μk};
    3: do
    4:   μ=μ;
    5:   for each Ei in E do
    6:    Compute
         minDistancei=argjmin||(Ei.lx,Ei.ly)μj||2;
    7:    Assign Ei to clusters[j];
    8:   end for
    9:   if maximinDistancei>r24 then
    10:    Add a cluster with the centroid {Ei.lx,Ei.ly};
    11:   end if
    12:   Update clusters;
    13:   Compute new centroids of clusters as μ;
    14: while ||μμ||2>ϵ
    15: return clusters.

    We improve the naive K-means algorithm to an adaptive clustering algorithm based on the communication range of edge nodes. The steps of the algorithm are as follows. First, it initializes the cluster list, and randomly selects k centroids (lines 1−2). Second, each edge node calculates its distance to the centroid of each cluster, and adds the closest cluster to it (lines 5−7). Then, it finds the point farthest from the centroid of all edge nodes. If the distance between this node and the centroid is greater than r/2, it moves the node out of the cluster and creates a new cluster. The centroid of the new cluster is the coordinates of the node (lines 9−11). Later, it updates clusters, deletes empty clusters (line 12) and updates the centroid of each cluster (line 13). Finally, it determines whether each centroid has been changed, and returns the results if there is no change. Otherwise, it repeats lines 4−13.

    This section describes the task scheduling algorithm. It can be seen from Section III that after all edge nodes use the heuristic algorithm to preprocess tasks, the blue nodes in Figure 2 have a queue of tasks to be scheduled, while the yellow and green nodes have remaining computing resources. Because the cloud center is far away, considering that if the task cannot be completed within the cluster, it will be transferred to the cloud center for completion. To convert the set of edge nodes into a bipartite graph, the first task in the to-be-scheduled task queue of the blue node Ei can be scheduled to the yellow node Ej, if and only if the following two conditions are met:

    a) After the scheduling is completed, the tasks that needed to be processed by the yellow node Ej itself meet the latest completion deadline.

    b) After the scheduling is completed, the current scheduling tasks meet the latest completion deadline.

    Satisfying the above two conditions means that Ei can match Ej, that is, there exists a line connecting Ei to Ej in the bipartite graph. Through a bipartite graph, a maximum match is found which determines the task schedulable task relationship. If no match can be found, tasks to be scheduled will be uploaded to the cloud center. The search for the maximum match will be repeated until the number of blue nodes is 0. The specific process is described in Algorithm 2.

    Algorithm 2 Scheduling algorithm based on maximum matching (SAMM)
    Input: cloud, clusters.
    1: for cluster in clusters
    2:  Get blue node set migSide and yellow node set recSide;
    3:  Sort the migration queue for all nodes in migSide by the length;
    4:  while len(migSide)> 0
    5:   Compute a bipartite graph by conditions a) & b);
    6:   Get the maximum match of the bipartite graph;
    7:   if the node find the matching
    8:    Try to migrate more tasks under condition a) & b);
    9:   else
    10:    Upload the top task to the cloud;
    11:   end if
    12:   Update migSide and recSide;
    13:  end while
    14: end for

    The SAMM algorithm considers each cluster in turn. For a cluster, it uses a heuristic algorithm for all nodes to determine the blue (migSide) and yellow node set (recSide), and sorts all the blue nodes’ pending task queues in ascending order according to the execution length of the tasks (lines 2−3). Then, it transforms the relationship among nodes into a bipartite graph through conditions a) and b) and migSide, recSide, and finds the bipartite graph maximum matching (lines 5−6);

    For the blue node matched, it tries to transfer multiple tasks at once. And for the blue node that does not find a match, it uploads the first task of the node’s pending task queue to the cloud (lines 7−11). Finally, it updates migSide and recSide. If there are still edge nodes that need to schedule tasks, it repeats (lines 5−12).

    The time complexity of ENCA+SAMM is analyzed in the following. Algorithm 1 (ENCA): 1) Determine whether the center of mass has changed (lines 3), which costs O(n); 2) Traverse all edge nodes to calculate the distance to the centroid of each cluster (lines 5−6), which costs O(n). Therefore, the total time complexity of Algorithm 1 is O(n2). Algorithm 2 (SAMM): 1) Traverse all nodes within all clusters (lines 1), which costs O(n2); 2) Sort according to task length (lines 2−3), which costs O(nlog2n); 3) Traverse all blue nodes and find the largest match of the bipartite graph (lines 4−6), which costs O(n), Therefore, the total time complexity of Algorithm 2 is O(n3). Therefore, the time complexity of ENCA+SAMM is O(n3).

    This section conducts experiments and demonstrates the performance of the proposed algorithm by designing a cloud and edge collaborative simulation environment. As shown in Table 1.

    Table  1.  Experimental parameter table of heuristic task allocation
    Parameter Value
    m (85, 150)
    poweri (0, 100) GHz
    r 10 m
    t 0.5 s
    Dij (0, 0.5) s
    Lij (0, 20000) bit
    Sij (200, 1000)
    bwc 1000 Mbps
    powerc 10 GHz
    k 12
    ϵ 1E−10
    Upper limit of task numbers [100, 300, 500, 800, 1000]
     | Show Table
    DownLoad: CSV

    The number of edge nodes m is randomly generated in (85, 150). The coordinates lxi and lyi of the edge nodes are random values in (0, 100). And the computational capability poweri of the node is randomly selected from [1, 2, 3, 4] GHz. The communication radius r is 10 m. The properties of the task are configured as follows. The data size of the task Lij takes a random value within (0, 20000) bit. The clock cycle required to consume 1 bit data is randomly obtained within (200, 1000), and the latest completion period is within the range of (0, 0.5) s (allocation time interval is 0.5 s). The bandwidth bwc of the cloud center is 1000 Mbps. The computational capability of the cloud center is 10 GHz. Assume that the number of tasks that the node needed to be assigned take the random value in these five groups (0, 100), (0, 300), (0, 500), (0, 800), (0, 1000). The initial number of clusters k is 12. The experiments are carried out on a computer with a CPU model of i7 8700k and a memory of 16 GB.

    Firstly, we evaluate the heuristic algorithm used by the edge nodes, and further explain the clustering algorithm and the SAMM algorithm.

    Figure 3 shows the distribution of edge nodes, the location of the cluster centroids (orange point) and the communication range of the centroids. Through the ENCA algorithm, edge nodes are divided into 25 clusters. It can be observed that there is at least one node in the communication range of all cluster centroids, which is not included in the communication range of other cluster centroids. That is, the clusters obtained by the ENCA algorithm will not be superfluous, and at the same time, the communication between any edge nodes within the cluster does not need to be transferred through other nodes.

    Figure  3.  Distribution of edge nodes.

    We choose two non-preemptive task scheduling algorithms to test the performance of the heuristic algorithm inside the edge nodes, which are based on 100 random experiments to select the best. The two algorithms are as follows: 1) Earliest deadline first (EDF): It gives priority to tasks with earlier deadlines; 2) Shortest task first (STF): It gives priority to tasks with shorter execution time. Generally speaking, STF can complete more tasks inside edge nodes, but due to the latest completion deadline for tasks, the scheduling performance inside nodes is not as good as EDF. Compared to the STF algorithm, tasks in EDF algorithm with later completion deadlines, which indicates that tasks have more time margin to wait to be scheduled execution at the current node to meet the tasks’ latest completion deadline. As a result, the EDF algorithm ensures that more tasks are completed within the node, i.e., fewer tasks need to be migrated secondarily to other nodes for execution. And from a global perspective, EDF performance is even better. As shown in Figure 4, when the maximum number of tasks on the nodes are 100, 300, 500, 800, and 1000, EDF completes more tasks inside the edge node compared to STF, and fewer tasks are needed to be migrated twice for execution.

    Figure  4.  Performance comparison of edge nodes under STF and EDF.

    Figure 5 shows the number of tasks that violates the deadlines in the system after applying these two algorithms. Obviously, compared to STF, the number of tasks that violate deadlines in EDF is smaller. In summary, the performance of the EDF algorithm is more excellent, so in all subsequent experiments, the EDF algorithm will be adopted for task filtering inside the edge nodes.

    Figure  5.  Global performance comparison under STF and EDF.

    The above experiments determine the heuristic algorithm used internally by the edge nodes. The following experiment will show the effectiveness of our proposed SAMM algorithm. Since SAMM algorithm is based on bipartite matching and uses both shortest task first technology and hill climbing method, we choose the following algorithms which may be the naive algorithm or only take one improvement method: the general bipartite matching (BM) strategy, the BM algorithm for shortest job first (BM_Sort), and the BM algorithm based on the hill climbing (BM_Climb). Our SAMM algorithm gives priority to small tasks, and uses the hill climbing to try to match as many tasks as possible at one time to get close to the local optimum, while reducing the number of searches for bipartite matching (searching for binary matching is time-consuming).

    Figure 6 shows the total number of tasks that needed to be migrated to other edge nodes under different task scales. A larger value indicates that more tasks are scheduled to other edge nodes. We try to maximize the number of tasks that can be completed by making full use of the resources of other edge nodes. Obviously, SAMM still performs well under high load, and there is almost no difference between the effects of BM and BM_Climb, and the performance drops severely when the system is under high load. The experimental results of BM and BM_Climb show that the experimental results are not ideal when the hill climbing method is used alone without reducing the number of binary matching. From the experimental results of SAMM and BM_Sort, it can be seen that the performance of the algorithm can be further optimized by using the hill climbing method in the case of shortest task first.

    Figure  6.  The improvement effect of SAMM.

    Then, we evaluate the performance of the proposed algorithm (ENCA+SAMM) and some benchmark algorithms. Our proposed ENCA+SAMM algorithm is first clustered according to the distance of edge nodes, and then mainly consideres migrating the unfinished tasks on the nodes to other edge nodes in the cluster or to the cloud center for execution. Therefore, when designing the comparison algorithm, the main concern is whether the tasks can be migrated to other nodes for execution and the range of target nodes for migration (target nodes belong to the same cluster or cloud center). The benchmark algorithms adopted in this paper are as follows:

    Edge with no offloading (EWNO): Tasks only run on the edge nodes to which they belongs, and will not be scheduled to other edge nodes and the cloud center;

    Edge with offloading (EWO): Tasks can run on the edge nodes to which they belongs, or be scheduled to other edge nodes;

    Edge with clustering (EWC): Tasks can run on the edge nodes to which they belongs, or be scheduled to any nodes in the same cluster;

    Edge cloud with offloading (ECWO): Tasks can run on the edge nodes to which they belongs, and can also be scheduled to other nodes or uploaded to the cloud center.

    Among them, EWO and ECWO ignore the communication range of edge nodes, that is, tasks can be directly scheduled to any nodes. EWC uses the clustering algorithm designed in this paper to cluster edge nodes. The main performance comparison parameters are the total number of tasks that can be completed in the system, the total number of migration tasks between edge nodes, the running time, and the average task completion rate of nodes (δ):

    δ=1mmj=1NumberofcompletedtasksofEjNumberofassignedtasksofEj (11)

    We compare the running time of each algorithm (except EWNO, because it does not schedule tasks), as shown in Figure 7. It can be seen from the figure that our ENCA+SAMM is far superior to EWO and ECWO in terms of running time, especially under high load conditions. The running time of our algorithm is only 2.1 seconds, while that of EWO and ECWO are 81.4 seconds and 48.2 seconds, respectively. EWC only schedules tasks within the cluster, while ENCA+SAMM schedules tasks within the cluster or the cloud, which slightly increases the range of solution space, so the performance of the two is comparable.

    Figure  7.  The running time of different algorithms.

    Figure 8 compares the number of tasks that can be completed by edge nodes themselves or other edge nodes or the cloud under different algorithms. When the maximum number of tasks of the node is small, that is, the system load is low, the performance of ENCA+SAMM algorithm is slightly inferior to that of ECWO and EWO. This is because there are many solutions when the system load is small, and the clustering algorithm used by the ENCA+SAMM algorithm limits the range of nodes that can be selected for the task. However, ECWO and EWO do not consider the communication range of nodes, and the running time of them are very long (see Figure 7), which cannot meet the real-time requirements. With the increase of the maximum task number of nodes, ENCA+SAMM shows obvious advantages. For example, when the maximum number of tasks for each edge node is 1000, our strategy increases the number of completed tasks that meet the latest deadline constraint by 32%–47.2% to other comparison algorithms, which shows that our method has superior performance when the system load is large.

    Figure  8.  Comparison of the number of tasks completed.

    Figure 8 shows the total number of tasks that can be completed while meeting deadline constraints, and the comparative effect of the number of migration tasks of each algorithm is shown in Figure 9. The number of task migrations in the figure represents the number of tasks that can be completed by mutual assistance between edge nodes and meet the deadline requirements. Since ECWO and EWO do not consider the communication range of edge nodes, the performance is better when the solution space is not complicated (the system load is low). When the solution space becomes complicated (each node has a relatively high load), the performance of ECWO and EWO starts to be unsatisfactory, which is almost the same as EWC, and EWC considers the communication range of nodes. At the same time, because ECWO and EWO use the same scheduling strategy, the broken lines overlap. It can be seen from the figure that ENCA+SAMM steadily increases the total number of task migrations when the load gradually increases. Therefore, when the load is high, our algorithm can migrate more tasks to other edge nodes and show better performance.

    Figure  9.  Comparison of the number of tasks migrated between edge nodes.

    Figure 10 shows the number of tasks that the five algorithms can complete while meeting the deadline constraints when the maximum number of tasks on a node is 1000, through the node itself or to schedule tasks to other edge nodes or the cloud. Among the comparison algorithms, only ECWO takes into account the situation of the cloud, but from the experimental results, it can be seen that the total number of completed tasks (the sum of red, yellow and blue bars in Figure10) of our algorithm is far superior to ECWO and the other algorithms. Among them, compared with ECWO, the number of tasks transferred to the cloud by our algorithm has increased by 15.8%, the number of tasks transferred to other nodes has increased by 33%, and the number of tasks completed by the node themselves has increased by 53%. To make it clearer, we show the number of tasks completed by ENCA+SAMM in different locations under different loads, as shown in Figure 11. As can be seen from the figure, as the load increases, our algorithm can better utilize the resources of other edge nodes and the cloud to complete more tasks.

    Figure  10.  Comparison of the number of tasks completed in different locations.
    Figure  11.  Number of tasks completed by ENCA+SAMM in different locations.

    Finally, the average task completion rate under different load conditions is compared, as shown in Figure 12. It is worth mentioning that the completed tasks here includes the tasks completed by the nodes themselves and other edge nodes and the cloud. Obviously, the five pentagons are particularly prominent on the ENCA+SAMM side, which shows that ENCA+SAMM performs best in terms of completion rate. At low load (the maximum number of tasks for a node is 100), all algorithms can basically complete all tasks. As the load increases, EWNO does not adopt a scheduling scheme, so the average task completion rate is very unsatisfactory, and ECWO, EWC, and EWO also perform poorly. When the maximum number of tasks arriving at the node is 1000, the average task completion rate of our algorithm can reach 82%, while other comparison algorithms are only 61% or lower.

    Figure  12.  Average task completion rate.

    All in all, our ENCA+SAMM strategy greatly reduces the solution search space and improves the response speed. Compared with the other benchmark algorithms, our strategy increases the number of completed tasks that meet the latest deadline constraint under different scenarios.

    The rapid development of the Internet of Things and 5G era has accelerated the integration of cloud computing and edge computing. Edge computing can better meet the real-time requirements of edge devices, while cloud computing has powerful computing capabilities. In order to achieve unified management of resources on the edge and the cloud, cloud and edge collaboration is produced. In this paper, we propose a task scheduling strategy for edge nodes in the cloud and edge collaborative environment. The goal is to maximize the number of tasks that can be completed under the constraint of the deadline. Task scheduling is a strong NP-hard problem, and we solve it by designing a heuristic algorithm. Specifically, because edge nodes are more sensitive to delay, this paper designs a edge node clustering algorithm (ENCA) to reduce the solution space and reduce the algorithm running time. Then, we transform the task scheduling problem into a bipartite graph matching problem, and propose a task scheduling algorithm based on bipartite matching named SAMM for decision-making. Finally, the performance of our algorithm is verified through experimental results. The current research work investigates scheduling tasks that do not have dependencies. But practical scenarios exist for tasks with directed acyclic graph dependencies (workflow tasks). Scheduling these tasks requires attention to the sequence of tasks. Therefore, we will further research on workflow tasks in the future.

    This work was supported by the National Natural Science Foundation of China (Grant Nos. 62172350, 62032020, 62076214, and 61902336), the Hunan Provincial Natural Science Foundation (Grant No. 2021JJ40544), the Scientific Research Foundation of Hunan Provincial Education Department (Grant No. 21B0120), the National Key Research and Development Program of China (Grant No. 2021YFB3101200), and the Hunan Science and Technology Planning Project (Grant No. 2019RS3019).

  • [1]
    P. Lai, Q. He, J. Grundy, et al., “Cost-effective app user allocation in an edge computing environment,” IEEE Transactions on Cloud Computing, vol. 10, no. 3, pp. 1701–1713, 2022. DOI: 10.1109/TCC.2020.3001570
    [2]
    I. M. Ibrahim, S. R. M. Zeebaree, M. A. M. Sadeeq, et al., “Task scheduling algorithms in cloud computing: A review,” Turkish Journal of Computer and Mathematics Education (TURCOMAT), vol. 12, no. 4, pp. 1041–1053, 2021. DOI: 10.17762/turcomat.v12i4.612
    [3]
    F. Y. Hu, L. L. Lv, T. L. Zhang, et al., “Vehicular task scheduling strategy with resource matching computing in cloud-edge collaboration,” IET Collaborative Intelligent Manufacturing, vol. 3, no. 4, pp. 334–344, 2021. DOI: 10.1049/cim2.12023
    [4]
    J. J. Guo, C. L. Li, Y. Chen, et al., “On-demand resource provision based on load estimation and service expenditure in edge cloud environment,” Journal of Network and Computer Applications, vol. 151, article no. 102506, 2020. DOI: 10.1016/j.jnca.2019.102506
    [5]
    J. Schmitt, J. Bönig, T. Borggräfe, et al., “Predictive model-based quality inspection using machine learning and edge cloud computing,” Advanced Engineering Informatics, vol. 45, article no. 101101, 2020. DOI: 10.1016/j.aei.2020.101101
    [6]
    P. F. Hu, S. Dhelim, H. S. Ning, et al., “Survey on fog computing: Architecture, key technologies, applications and open issues,” Journal of Network and Computer Applications, vol. 98, pp. 27–42, 2017. DOI: 10.1016/j.jnca.2017.09.002
    [7]
    S. Z. Bi and Y. J. Zhang, “Computation rate maximization for wireless powered mobile-edge computing with binary computation offloading,” IEEE Transactions on Wireless Communications, vol. 17, no. 6, pp. 4177–4190, 2018. DOI: 10.1109/TWC.2018.2821664
    [8]
    X. F. Cao, G. M. Tang, D. K. Guo, et al., “Edge federation: Towards an integrated service provisioning model,” IEEE/ACM Transactions on Networking, vol. 28, no. 3, pp. 1116–1129, 2020. DOI: 10.1109/TNET.2020.2979361
    [9]
    Y. M. Miao, G. X. Wu, M. Li, et al., “Intelligent task prediction and computation offloading based on mobile-edge cloud computing,” Future Generation Computer Systems, vol. 102, pp. 925–931, 2020. DOI: 10.1016/j.future.2019.09.035
    [10]
    H. Yuan, G. M. Tang, X. Y. Li, et al., “Online dispatching and fair scheduling of edge computing tasks: A learning-based approach,” IEEE Internet of Things Journal, vol. 8, no. 19, pp. 14985–14998, 2021. DOI: 10.1109/JIOT.2021.3073034
    [11]
    J. H. Zhao, Q. P. Li, Y. Gong, et al., “Computation offloading and resource allocation for cloud assisted mobile edge computing in vehicular networks,” IEEE Transactions on Vehicular Technology, vol. 68, no. 8, pp. 7944–7956, 2019. DOI: 10.1109/TVT.2019.2917890
    [12]
    X. L. Xu, X. Zhang, X. H. Liu, et al., “Adaptive computation offloading with edge for 5g-envisioned internet of connected vehicles,” IEEE Transactions on Intelligent Transportation Systems, vol. 22, no. 8, pp. 5213–5222, 2021. DOI: 10.1109/TITS.2020.2982186
    [13]
    X. Zheng, M. C. Li, and J. Guo, “Task scheduling using edge computing system in smart city,” International Journal of Communication Systems, vol. 34, no. 6, article no. e4422, 2021. DOI: 10.1002/dac.4422
    [14]
    J. Edinger, M. Breitbach, N. Gabrisch, et al., “Decentralized low-latency task scheduling for Ad-Hoc computing,” in Proceedings of the 2021 IEEE International Parallel and Distributed Processing Symposium (IPDPS), Portland, OR, USA, pp.776–785, 2021.
    [15]
    Y. X. Sun, S. Zhou, and J. Xu, “EMM: Energy-aware mobility management for mobile edge computing in ultra dense networks,” IEEE Journal on Selected Areas in Communications, vol. 35, no. 11, pp. 2637–2646, 2017. DOI: 10.1109/JSAC.2017.2760160
    [16]
    T. Q. Dinh, Q. D. La, T. Q. S. Quek, et al., “Learning for computation offloading in mobile edge computing,” IEEE Transactions on Communications, vol. 66, no. 12, pp. 6353–6367, 2018. DOI: 10.1109/TCOMM.2018.2866572
    [17]
    X. L. Xu, Y. C. Li, T. Huang, et al., “An energy-aware computation offloading method for smart edge computing in wireless metropolitan area networks,” Journal of Network and Computer Applications, vol. 133, pp. 75–85, 2019. DOI: 10.1016/j.jnca.2019.02.008
    [18]
    H. L. Zhang, J. Guo, L. C. Yang, et al., “Computation offloading considering fronthaul and backhaul in small-cell networks integrated with MEC,” in Proceedings of the 2017 IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), Atlanta, GA, USA, pp.115–120, 2017.
    [19]
    L. C. Yang, H. L. Zhang, M. Li, et al., “Mobile edge computing empowered energy efficient task offloading in 5G,” IEEE Transactions on Vehicular Technology, vol. 67, no. 7, pp. 6398–6409, 2018. DOI: 10.1109/TVT.2018.2799620
    [20]
    S. Q. Long, W. F. Long, Z. T. Li, et al., “A game-based approach for cost-aware task assignment with QoS constraint in collaborative edge and cloud environments,” IEEE Transactions on Parallel and Distributed Systems, vol. 32, no. 7, pp. 1629–1640, 2021. DOI: 10.1109/TPDS.2020.3041029
    [21]
    H. S. Tan, Z. H. Han, X. Y. Li, et al., “Online job dispatching and scheduling in edge-clouds,” in Proceedings of the IEEE INFOCOM 2017-IEEE Conference on Computer Communications, Atlanta, GA, USA, pp.1–9, 2017.
    [22]
    X. Long, J. G. Wu, and L. Chen, “Energy-efficient offloading in mobile edge computing with edge-cloud collaboration,” in Proceedings of the 18th International Conference on Algorithms and Architectures for Parallel Processing, Guangzhou, China, pp.460–475, 2018.
    [23]
    M. Z. Du, Y. Wang, K. J. Ye, et al., “Algorithmics of cost-driven computation offloading in the edge-cloud environment,” IEEE Transactions on Computers, vol. 69, no. 10, pp. 1519–1532, 2020. DOI: 10.1109/TC.2020.2976996
    [24]
    K. Y. Liu, J. Peng, H. Li, et al., “Multi-device task offloading with time-constraints for energy efficiency in mobile cloud computing,” Future Generation Computer Systems, vol. 64, pp. 1–14, 2016. DOI: 10.1016/j.future.2016.04.013
    [25]
    H. C. Duan, C. Chen, G. Y. Min, et al., “Energy-aware scheduling of virtual machines in heterogeneous cloud computing systems,” Future Generation Computer Systems, vol. 74, pp. 142–150, 2017. DOI: 10.1016/j.future.2016.02.016
    [26]
    K. K. Gai, M. K. Qiu, and H. Zhao, “Energy-aware task assignment for mobile cyber-enabled applications in heterogeneous cloud computing,” Journal of Parallel and Distributed Computing, vol. 111, pp. 126–135, 2018. DOI: 10.1016/j.jpdc.2017.08.001
    [27]
    Z. H. Li, X. R. Yu, L. Yu, et al., “Energy-efficient and quality-aware VM consolidation method,” Future Generation Computer Systems, vol. 102, pp. 789–809, 2020. DOI: 10.1016/j.future.2019.08.004
    [28]
    G. Peng, H. M. Wu, H. Wu, et al., “Constrained multiobjective optimization for IoT-enabled computation offloading in collaborative edge and cloud computing,” IEEE Internet of Things Journal, vol. 8, no. 17, pp. 13723–13736, 2021. DOI: 10.1109/JIOT.2021.3067732
    [29]
    S. D. Wang, Y. Q. Li, S. C. Pang, et al., “A task scheduling strategy in edge-cloud collaborative scenario based on deadline,” Scientific Programming, vol. 2020, article no. 3967847, 2020. DOI: 10.1155/2020/3967847
    [30]
    C. S. You, K. B. Huang, and H. Chae, “Energy efficient mobile cloud computing powered by wireless energy transfer,” IEEE Journal on Selected Areas in Communications, vol. 34, no. 5, pp. 1757–1771, 2016. DOI: 10.1109/JSAC.2016.2545382
    [31]
    J. K. Ren, G. D. Yu, Y. H. He, et al., “Collaborative cloud and edge computing for latency minimization,” IEEE Transactions on Vehicular Technology, vol. 68, no. 5, pp. 5031–5044, 2019. DOI: 10.1109/TVT.2019.2904244
    [32]
    G. Z. Zhang, T. Q. S. Quek, M. Kountouris, et al., “Fundamentals of heterogeneous backhaul design—analysis and optimization,” IEEE Transactions on Communications, vol. 64, no. 2, pp. 876–889, 2016. DOI: 10.1109/TCOMM.2016.2515596
    [33]
    A. Al-Shuwaili, O. Simeone, A. Bagheri, et al., “Joint uplink/downlink optimization for backhaul-limited mobile cloud computing with user scheduling,” IEEE Transactions on Signal and Information Processing over Networks, vol. 3, no. 4, pp. 787–802, 2017. DOI: 10.1109/TSIPN.2017.2668142
    [34]
    M. Dawande, J. Kalagnanam, P. Keskinocak, et al., “Approximation algorithms for the multiple knapsack problem with assignment restrictions,” Journal of Combinatorial Optimization, vol. 4, no. 2, pp. 171–186, 2000. DOI: 10.1023/A:1009894503716
    [35]
    S. Martello and P. Toth, Knapsack Problems: Algorithms and Computer Implementations. John Wiley & Sons, Inc., New York, NY, USA, pp.157-179,1990.

Catalog

    Figures(12)  /  Tables(1)

    Article Metrics

    Article views (522) PDF downloads (44) Cited by()
    Related

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return