CN109240813B - Task scheduling and task migration method in mobile cloud computing - Google Patents
Task scheduling and task migration method in mobile cloud computing Download PDFInfo
- Publication number
- CN109240813B CN109240813B CN201810955573.8A CN201810955573A CN109240813B CN 109240813 B CN109240813 B CN 109240813B CN 201810955573 A CN201810955573 A CN 201810955573A CN 109240813 B CN109240813 B CN 109240813B
- Authority
- CN
- China
- Prior art keywords
- task
- task node
- state
- priority
- num
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
- G06F9/4856—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
- G06F9/5088—Techniques for rebalancing the load in a distributed system involving task migration
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a task scheduling and task migration method in mobile cloud computing, which comprises the following steps: executing all task nodes at a mobile terminal, recording energy consumption of the current mobile terminal, calculating energy consumption saved by the mobile terminal after each migratable task is migrated to a cloud terminal, calculating total task completion time finish _ time through a maximum priority scheduling algorithm, selecting the task which saves most energy consumption and meets time constraint, migrating the task to the cloud terminal, and if no task node which meets the condition exists, terminating the process of the method and repeating the steps until all tasks are completed.
Description
Technical Field
The invention relates to the field of mobile cloud computing, in particular to a task scheduling and task migration method in mobile cloud computing.
Background
With the development of internet and communication technology, mobile applications have increasingly demanded computing, storage and power resources of mobile devices. However, due to volume limitations, the resources of mobile devices often cannot meet the high demands of mobile applications. However, the development of cloud computing enables partial tasks on mobile devices to be migrated to the cloud for execution. Although tasks on the mobile device may migrate to the cloud, communication power consumption and communication latency are also incurred. Most of the existing solutions are directed to task migration, or one of the cases of task scheduling. The problem of joint migration and scheduling in mobile cloud computing is a topic worthy of further research.
Disclosure of Invention
The existing solution is to calculate through an optimizer aiming at the problem of joint scheduling and migration in mobile cloud computing, and although precision is greatly improved, time consumed by operation and resource consumed by operation are too high. The invention provides a task scheduling and task migration method in mobile cloud computing, which takes all tasks executed at a mobile terminal as an initial solution, calculates the energy consumption saving amount of migratable tasks running at a cloud terminal gradually, migrates the tasks with the largest saving amount to the cloud terminal in sequence, and updates the energy consumption saving amount of each task according to the communication time among the tasks.
The object of the invention is to provide a method for producing a composite material, which is characterized in that: in the time range of completing the total tasks, the tasks migrated to the cloud server can be executed in parallel with the tasks on the mobile terminal, and can also be executed in parallel with other tasks on the cloud server. The multiple tasks of the mobile terminal can be executed only in series. When two task nodes are located at different ends, communication time and communication energy consumption exist between the two task nodes, otherwise, the communication time and the communication energy consumption are both 0. The problem to be solved is that: under the constraint condition, a migration strategy is found, and after the task is completed, the energy consumption at the mobile terminal is minimized.
A task scheduling and task migration method in mobile cloud computing comprises the following steps:
s1: executing all task nodes at the mobile terminal;
s2: recording the energy consumption of the current mobile terminal;
s3: calculating the energy consumption saved by the mobile terminal after each migratable task migrates to the cloud terminal, and calculating the total task completion time finish _ time by a maximum priority scheduling algorithm;
s4: selecting a task which saves the most energy and meets the time constraint, migrating the task to the cloud, and terminating the method process if no task node which meets the condition exists;
s5: the above steps S1, S2, S3, S4 are repeated.
Further, in step S3, the maximum priority scheduling algorithm includes:
s3.1: firstly, defining the priority of task nodes, and marking a serial number for each task node according to the breadth-first traversal sequence;
s3.2: defining five states of the task node, and using State (i) to represent the current state of the task node i;
s3.3, initializing the total task completion time finish _ time;
s3.4, executing all ready tasks on the cloud and the ready task with the maximum priority on the mobile terminal;
s3.5, when one task node is completed, updating the state of each task and updating the total completion time of the tasks;
s3.6 when all tasks are completed, the total completion time finish _ time of the tasks is calculated and returned.
Further, the defining of the priority of the task nodes in step S3.1, and marking a sequence number to each task node according to the breadth-first traversal order specifically include the following steps:
if the serial number of i is in front of the serial number of j, marking as i < j; the number of children of the task node is marked as Child _ num (i), and the number of children of the task node j is marked as Child _ num (j); the priority of the task node i is marked as prior (i), and the priority of the task node j is marked as prior (j); defining the priority of the task node;
(1) when Child _ num (i) > Child _ num (j), prior (i) > prior (j);
(2) when Child _ num (i) Child _ num (j) and i > j, prior (i) prior (j);
(3) if Child _ num (i) Child _ num (j) and i < j, then prior (i) > prior (j).
Further, the task node defined in step S3.2 has five states, which are specifically defined as follows: non-active represents the inactive state, active represents the active state, ready represents ready, runnable represents operable, and finished represents completed;
if all father nodes of the task node i are executed, state (i) is active;
if all father nodes of the task node i on the cloud end are executed, state (i) is runnable;
if all father nodes of the task node i in the ready set are executed and have the highest priority, state (i) is runnable;
if the priority is not the highest after all father nodes of the task node i in the ready set are executed, state (i) is ready;
if all father nodes of the task node i are not completely executed, state (i) is non-active;
if task node i has been executed, state (i) finished.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the running time of the algorithm is far less than that of the traditional optimizer, the consumed resources are greatly reduced, and meanwhile, the accuracy is kept better.
Drawings
FIG. 1 is a flow chart of the present invention.
Fig. 2 is a task diagram with 15 subtasks on a mobile device.
Detailed Description
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Examples
The task scheduling and task migration method in the mobile cloud computing has the following idea of scheduling algorithm: under the condition of given task migration, the task in the ready state on the cloud end can be executed in parallel with other tasks, and the task in the ready state on the mobile end and with the highest priority is executed first. And when one task is completed, updating the completion state of the task and finding out the task in the ready state at present. And repeating the process continuously, finally finding out a task scheduling scheme under the time limit, and calculating the total completion time of the tasks. Heuristic algorithm idea of migration process: each time a task is migrated from the cloud to the cloud, it is ensured that after the migration, the total energy consumption of the mobile terminal is smaller than before, and the total completion time after the migration satisfies the time constraint. And repeating the process by traversing all the nodes on the task graph to obtain a final migration and scheduling scheme.
The algorithm is divided into two parts, wherein the first part is mainly a scheduling algorithm and is used for providing an approximate method after the completion of the calculation of the total task, and the second part is a migration method, wherein the algorithm needs to call the previous scheduling algorithm.
The method comprises the following specific steps: as shown in fig. 2, a task graph with 15 subtasks is shown on the mobile device. The solid nodes indicate that the task can only be performed on the mobile side. Except for the solid nodes, the method can be migrated to the cloud end for execution. The hollow nodes represent that the task is completed in the cloud; the shaded nodes indicate that the task is completed on the mobile side. For two tasks with communication, if the two tasks are realized at the mobile end or the cloud end, the communication time and the communication energy consumption between the two tasks are ignored; and if two communication tasks are realized at different ends, calculating the communication time and the communication energy consumption between the tasks.
Referring to fig. 1, a method for task scheduling and task migration in mobile cloud computing includes the steps of:
s1: executing all task nodes at the mobile terminal;
s2: recording the energy consumption of the current mobile terminal;
s3: and calculating the energy consumption saved by the mobile terminal after each migratable task migrates to the cloud terminal, and calculating the total task completion time finish _ time by a maximum priority scheduling algorithm.
The step of calculating the total task completion time by the maximum priority scheduling algorithm comprises the following steps:
1. firstly, defining the priority of the task nodes, and marking the serial number on each task node according to the breadth-first traversal sequence. If the sequence number of i precedes the sequence number of j, it is noted as i < j. Next, the number of children of task node i is denoted as Child _ num (i), and the number of children of task node j is denoted as Child _ num (j). Then, the priority of task node i is designated as prior (i), and similarly, the priority of task node j is designated as prior (j).
The priority size of the task node is defined as follows:
a. if Child _ num (i) > Child _ num (j), prior (i) > prior (j);
b. if Child _ num (i) Child _ num (j) and i > j, prior (i) prior (j);
c. if Child _ num (i) Child _ num (j) and i < j, then prior (i) > prior (j).
2. Given the several states that the task node is in: non-active, ready, runnable, finished. We denote the current state of task node i by State (i):
a. if all father nodes of the task node i are executed, state (i) is active;
b. if all father nodes of the task node i on the cloud end are executed, state (i) is runnable;
c. if all father nodes of the task node i in the ready set are executed and have the highest priority, state (i) is runnable;
d. if the priority is not the highest after all father nodes of the task node i in the ready set are executed, state (i) is read;
e. if all the father nodes of the task node i are not completely executed, state (i) is non-act;
f. if task node i has been executed, state (i) finished.
3. The total task completion time finish time is initialized.
4. And executing all ready tasks on the cloud and the ready task with the maximum priority on the mobile terminal.
5. And when one task node is completed, updating the state of each task and updating the total completion time of the tasks.
6. When all tasks are completed, the total completion time finish _ time of the tasks is calculated and returned.
S4: and selecting the task which saves the most energy and meets the time constraint, migrating the task to the cloud, and terminating the method process if no task node meeting the condition exists.
S5: and repeating the steps S1, S2, S3 and S4 until all tasks are completed.
Claims (2)
1. A task scheduling and task migration method in mobile cloud computing is characterized by comprising the following steps:
s1: executing all task nodes at the mobile terminal;
s2: recording the energy consumption of the current mobile terminal;
s3: calculating the energy consumption saved by the mobile terminal after each migratable task migrates to the cloud terminal, and calculating the total task completion time finish _ time by using a maximum priority scheduling algorithm, wherein the maximum priority scheduling algorithm in step S3 includes the steps of:
s3.1: firstly, defining the priority of task nodes, and marking a serial number for each task node according to the breadth-first traversal sequence;
s3.2: defining five states of the task node, and using State (i) to represent the current state of the task node i;
s3.3, initializing the total task completion time finish _ time;
s3.4, executing all ready tasks on the cloud and the ready task with the maximum priority on the mobile terminal;
s3.5, when one task node is completed, updating the state of each task and updating the total completion time of the tasks;
s3.6, when all tasks are completed, calculating and returning the total completion time finish _ time of the tasks;
in step S3.2, the task node is defined to have five states, which are specifically defined as follows: non-active represents the inactive state, active represents the active state, ready represents ready, runnable represents operable, and finished represents completed;
if all father nodes of the task node i are executed, state (i) is active;
if all father nodes of the task node i on the cloud end are executed, state (i) is runnable;
if all father nodes of the task node i in the ready set are executed and have the highest priority, state (i) is runnable;
if the priority is not the highest after all father nodes of the task node i in the ready set are executed, state (i) is ready;
if all father nodes of the task node i are not completely executed, state (i) is non-active;
if the task node i has been executed, state (i) ═ finished;
s4: selecting a task which saves the most energy and meets the time constraint, migrating the task to the cloud, and terminating the method process if no task node which meets the condition exists;
s5: the above steps S1, S2, S3, S4 are repeated.
2. The method for task scheduling and task migration in mobile cloud computing according to claim 1, wherein the step S3.1 of defining the priority of the task nodes and marking the sequence number of each task node according to the breadth-first traversal order specifically comprises the following steps:
if the serial number of i is in front of the serial number of j, marking as i < j; the number of children of the task node is marked as Child _ num (i), and the number of children of the task node j is marked as Child _ num (j); the priority of the task node i is marked as prior (i), and the priority of the task node j is marked as prior (j); defining the priority of the task node;
(1) when Child _ num (i) > Child _ num (j), prior (i) > prior (j);
(2) when Child _ num (i) Child _ num (j) and i > j, prior (i) prior (j);
(3) if Child _ num (i) Child _ num (j) and i < j, then prior (i) > prior (j).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810955573.8A CN109240813B (en) | 2018-08-21 | 2018-08-21 | Task scheduling and task migration method in mobile cloud computing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810955573.8A CN109240813B (en) | 2018-08-21 | 2018-08-21 | Task scheduling and task migration method in mobile cloud computing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109240813A CN109240813A (en) | 2019-01-18 |
CN109240813B true CN109240813B (en) | 2021-12-24 |
Family
ID=65070123
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810955573.8A Active CN109240813B (en) | 2018-08-21 | 2018-08-21 | Task scheduling and task migration method in mobile cloud computing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109240813B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111402353B (en) * | 2020-03-11 | 2020-12-25 | 浙江大学 | Cloud-end drawing calculation method based on self-adaptive virtualization drawing production line |
CN114281426B (en) * | 2021-12-21 | 2023-05-16 | 中国联合网络通信集团有限公司 | Task unloading method and device, electronic equipment and readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102467532A (en) * | 2010-11-12 | 2012-05-23 | 中国移动通信集团山东有限公司 | Task processing method and task processing device |
CN103293967A (en) * | 2012-02-29 | 2013-09-11 | 陕西省地方电力(集团)有限公司 | Multi-task control method for intelligent meter reading terminal |
WO2016045515A1 (en) * | 2014-09-23 | 2016-03-31 | 同济大学 | Cloud task scheduling algorithm based on user satisfaction |
CN107360235A (en) * | 2017-07-17 | 2017-11-17 | 广东工业大学 | A kind of task immigration method based on reliability classification |
CN107436811A (en) * | 2017-07-07 | 2017-12-05 | 广东工业大学 | It is related to the task immigration method of task scheduling in mobile cloud problem |
CN107562527A (en) * | 2017-08-28 | 2018-01-09 | 北京翼辉信息技术有限公司 | A kind of Real-Time Task Schedule Algorithm of SMP on RTOS |
-
2018
- 2018-08-21 CN CN201810955573.8A patent/CN109240813B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102467532A (en) * | 2010-11-12 | 2012-05-23 | 中国移动通信集团山东有限公司 | Task processing method and task processing device |
CN103293967A (en) * | 2012-02-29 | 2013-09-11 | 陕西省地方电力(集团)有限公司 | Multi-task control method for intelligent meter reading terminal |
WO2016045515A1 (en) * | 2014-09-23 | 2016-03-31 | 同济大学 | Cloud task scheduling algorithm based on user satisfaction |
CN107436811A (en) * | 2017-07-07 | 2017-12-05 | 广东工业大学 | It is related to the task immigration method of task scheduling in mobile cloud problem |
CN107360235A (en) * | 2017-07-17 | 2017-11-17 | 广东工业大学 | A kind of task immigration method based on reliability classification |
CN107562527A (en) * | 2017-08-28 | 2018-01-09 | 北京翼辉信息技术有限公司 | A kind of Real-Time Task Schedule Algorithm of SMP on RTOS |
Also Published As
Publication number | Publication date |
---|---|
CN109240813A (en) | 2019-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114756383B (en) | Distributed computing method, system, equipment and storage medium | |
US10171284B2 (en) | Reachability-based coordination for cyclic dataflow | |
WO2015196911A1 (en) | Data mining method and node | |
CN109286664A (en) | A kind of computation migration terminal energy consumption optimization method based on Lagrange | |
CN109240813B (en) | Task scheduling and task migration method in mobile cloud computing | |
CN104636204A (en) | Task scheduling method and device | |
CN107220780B (en) | Heterogeneous task execution sequence optimization method in crowdsourcing system | |
CN106095552B (en) | A kind of Multi-Task Graph processing method and system based on I/O duplicate removal | |
CN104765589A (en) | Grid parallel preprocessing method based on MPI | |
CN109729175B (en) | Edge cooperative data unloading method under unstable channel condition | |
TW201702908A (en) | Method and apparatus for flexible scheduling in a database system for reducing computation complexity during a database flexible scheduling process, and meanwhile achieving objects of saving resources as well as reducing scheduling cost | |
CN111062467A (en) | Automatic neural network subgraph segmentation method applied to AI heterogeneous compiler | |
US20220405129A1 (en) | Workflow scheduling method and system based on multi-target particle swarm algorithm, and storage medium | |
CN112214301A (en) | Smart city-oriented dynamic calculation migration method and device based on user preference | |
Kim et al. | Minimizing GPU kernel launch overhead in deep learning inference on mobile GPUs | |
CN111049900B (en) | Internet of things flow calculation scheduling method and device and electronic equipment | |
CN102253837A (en) | Object tree-based software framework designing technology | |
CN112463340A (en) | Tensorflow-based multi-task flexible scheduling method and system | |
CN108197186B (en) | Dynamic graph matching query method applied to social network | |
CN105022896A (en) | Method and device for APDL modelling based on dynamic numbering | |
CN112149826B (en) | Profile graph-based optimization method in deep neural network inference calculation | |
CN109710314B (en) | A method of based on graph structure distributed parallel mode construction figure | |
CN104079439A (en) | NoC (network-on-chip) mapping method based on discrete firefly algorithm | |
CN111310260A (en) | BIM (building information modeling) model version storage conversion method based on distributed storage architecture | |
CN107301063B (en) | Mirror image management method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |