CN109947552A - Margin control dynamic task scheduling method based on process and thread scheduling - Google Patents

Margin control dynamic task scheduling method based on process and thread scheduling Download PDF

Info

Publication number
CN109947552A
CN109947552A CN201910245309.XA CN201910245309A CN109947552A CN 109947552 A CN109947552 A CN 109947552A CN 201910245309 A CN201910245309 A CN 201910245309A CN 109947552 A CN109947552 A CN 109947552A
Authority
CN
China
Prior art keywords
priority
business
thread
scheduling
margin control
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.)
Pending
Application number
CN201910245309.XA
Other languages
Chinese (zh)
Inventor
朱晓荣
唐思宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Post and Telecommunication University
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing Post and Telecommunication University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanjing Post and Telecommunication University filed Critical Nanjing Post and Telecommunication University
Priority to CN201910245309.XA priority Critical patent/CN109947552A/en
Publication of CN109947552A publication Critical patent/CN109947552A/en
Pending legal-status Critical Current

Links

Abstract

The margin control dynamic task scheduling method based on process and thread scheduling that the invention discloses a kind of is the different priority of delineation of activities according to sensitivity of the business to time delay, higher to the service priority that time delay is more sensitive;Scheduling process combines the scheduling scheme of multi-process and multithreading;Process scheduling is used to cope with the different types of business of priority, and an element of the thread scheduling as process scheduling copes with the business of the same race of high concurrent, thread scheduling is by the way of dynamic priority.The present invention meets the real-time process demand of task, and the resource utilization of lifting system.

Description

Margin control dynamic task scheduling method based on process and thread scheduling
Technical field
The present invention relates to wireless communication technology fields, are combined based on process scheduling with thread scheduling more particularly to one kind Margin control dynamic task scheduling method.
Background technique
In recent years, the centralized cloud computing of linear increase can not match the magnanimity edge data of explosive growth.Side Edge calculates (Edge Computing, EC) as a kind of new calculating mode, can be obtained by data near source in time Effectively handle.This mode is different from cloud computing and all data is transferred to data center, bypassed network bandwidth with The bottleneck of delay.Edge calculations seek to these independent dispersions that will be closed on space length either network distance with user Resource is united, and is provided, is stored and network service for application.Margin control is exactly the carrier of edge calculations.Edge position control Device is divided into two parts to the computation model of data: the cloud service of downlink and all things on earth interconnection services of uplink.In comparison, uplink All things on earth interconnection services be more complicated one kind.Here complicated one side is the complexity of network environment, is on the other hand embodied In the complexity of type of business.
The complexity of type of business is embodied in demand of the different business to QoS and is different.By taking time delay as an example, tightly Requirement of the anxious class business to time delay is inevitable very high, and it is that urgent class business preferentially provides the processing of system that this, which just needs margin control, Power.Aiming at the problem that processing of business real-time, the present invention wants to set up a kind of method for scheduling task of margin control, to meet The requirement of real-time of delay-sensitive traffic.Common centralized method for scheduling task has very much, such as prerequisite variable algorithm (FCFS), round robin (Round Robin), multilevel feedback queue algorithm etc..But the method for these task schedules does not all have According to QoS of survice demand assignment system disposal right, and the algorithm of some task schedules needs additional generate to calculate cost, such as Round robin just needs to determine to rotate the length of timeslice according to the task execution time of statistics, these all can bring one to system Fixed load.
Summary of the invention
Goal of the invention: in order to overcome the deficiencies in the prior art, the present invention provides one kind based on process and thread tune The margin control dynamic task scheduling method of degree, in complicated internet of things service, since different business is to the sensitivity of delay Degree is different, and conventional task schedule may delay the processing opportunity of urgent type business, it is therefore desirable to propose a kind of novel Margin control centralization method for scheduling task.A kind of side combined based on process scheduling with thread scheduling proposed by the present invention Edge controller dynamic task scheduling method is the different priority of delineation of activities according to sensitivity of the business to time delay, specifically Scheduling process combine the scheduling scheme of multi-process and multithreading.It is different types of that process scheduling is mainly used to reply priority Business, thread scheduling mainly for cope with high concurrent business of the same race.It can satisfy internet of things service substantially by the above method Real-time process demand, it is downward to improve edge calculations framework and the resource utilization of lifting system to a certain extent The real-time of slow responsive type business handles problem.
Technical solution: to achieve the above object, the technical solution adopted by the present invention are as follows:
A kind of margin control dynamic task scheduling method based on process and thread scheduling, according to business to the quick of time delay Sense degree is the different priority of delineation of activities, higher to the service priority that time delay is more sensitive;Scheduling process combine mostly into The scheduling scheme of journey and multithreading;Process scheduling is used to cope with the different types of business of priority, and thread scheduling is as process tune One element of degree, copes with the business of the same race of high concurrent, thread scheduling specifically includes following step by the way of dynamic priority It is rapid:
Step 1: the type of internet of things service being divided into four seed types according to the sensitive situations to time delay, respectively promptly Alarm class business, downlink control class business, Streaming Media class business, regular monitoring class business;
Step 2, in margin control it is respectively the received process of task turn-on data of four seed types, and assigns each The different port numbers PORT of a process, to establish the mapping relations of type of service and port;
Step 3, the process number Process ID of four class business process is obtained, and is referred to according to the process number renice of business Enable modification priority process priority P RI;
Step 4, inside the identical process of type of business, the business to be successively received opens different threads, thread according to It is executed according to dynamic priority height, the update method of dynamic priority is as follows:
Step 41, business initial priority is identical in process, is pori, initialize system clock;
Step 42, statistics obtains the general execution time t of the business in this processgen, enable fiducial time θ=tgen/ n, In, n indicate it is desirable that the number that is at most preempted of a task, the CPU usage highest of system when actual measurement takes 2-3;
Step 43, process receives new task, and creates new thread for it, the waiting time of all threads in update processWherein,Indicate updated thread latency,When indicating that the thread before updating waits Between;
Step 44, all threads are sorted according to the waiting time, waiting for a long time, priority is high, the meter of dynamic priority Calculation mode isWherein, pdynIndicate the priority of current thread,Indicate the waiting time of thread;
Step 45, system passes through fiducial time θ, repeats step 43.
Preferred: local intelligent terminal when sending data, can select corresponding end according to the type of service for sending data Mouthful, when margin control receives data, type of service can be determined according to the port of the business of reception, so that it is determined that business is excellent First grade PRI, high-priority service seize the system disposal right of low priority traffice, after high-priority service is finished, quilt The low priority traffice seized automatically continues execution.
Preferred: margin control is that the business of different priorities opens different processes, three attribute characterizations of process: Process number Process ID, PID, port numbers PORT, priority P RI, when a process is currently running, based on depriving principle, The disposal right for having distributed to it is deprived, it is distributed into other processes.
Preferred: depriving principle has: dynamic priority principle, static priority principle, short process priority principle, timeslice Principle.
Preferred: the size for the frequency n that a desired task is at most preempted is between 2-3.
Preferred: the time delay of the emergency alarm class business is in 10ms-100ms.
Preferred: the delay requirement of the downlink control class business is in 10ms-1s.
Preferred: the delay requirement of the Streaming Media class business is in 1s-5s.
Preferred: the time delay of the regular monitoring class business is to require to be second grade.
Preferred: thread state includes execution state, wait state, dead state, wherein execution state is dynamic priority Grade does not change, and wait state is dynamic priority raising, and dead state is dynamic priority clearing.
The present invention compared with prior art, has the advantages that
A kind of margin control dynamic task scheduling method based on process and thread scheduling proposed by the present invention, it is common Centralized method for scheduling task does not all determine scheduling strategy according to QoS demand, and the algorithm of some task schedules needs volume Outer generation calculates cost, for example round robin just needs to determine to rotate the length of timeslice according to the task execution time of statistics, These can all bring certain load to system.The present invention utilizes the process scheduling of margin control internal system and thread scheduling phase In conjunction with method, process scheduling be used to cope with the different types of business of priority, a member of the thread scheduling as process scheduling Element mainly copes with the business of the same race of high concurrent.The present invention uses the side of dynamic priority in the multithread scheduling of most critical Formula, meets the real-time process demand of task, and maximizes the resource utilization of system.
Detailed description of the invention
The margin control task schedule frame diagram that process scheduling Fig. 1 of the invention is combined with thread scheduling
Multithreading method for scheduling task work flow diagram Fig. 2 of the invention
The frame diagram of Fig. 3 margin control dynamic task scheduling method of the invention based on process and thread scheduling
Specific embodiment
In the following with reference to the drawings and specific embodiments, the present invention is furture elucidated, it should be understood that these examples are merely to illustrate this It invents rather than limits the scope of the invention, after the present invention has been read, those skilled in the art are to of the invention various The modification of equivalent form falls within the application range as defined in the appended claims.
A kind of margin control dynamic task scheduling method based on process and thread scheduling, as shown in figure 3, the present invention from The real-time processing and lifting system performance for improving delay-sensitive traffic are starting point, first according to business to the sensitivity of time delay Degree is the different priority of delineation of activities, higher to the service priority that time delay is more sensitive;Scheduling process combines multi-process With the scheduling scheme of multithreading;Process scheduling is mainly used to cope with the different types of business of priority, and thread scheduling is as process One element of scheduling is mainly used to cope with the business of the same race of high concurrent, and thread scheduling is by the way of dynamic priority.It utilizes The method that the process scheduling of margin control internal system is combined with thread scheduling meets the real-time process demand of task, and And the resource utilization of lifting system.
It is divided according to type of the sensitive situations to time delay to complicated internet of things service specific as follows (to time delay sensitivity Successively reduce):
(1) emergency alarm class business: the common scene of such business, such as car networking scene, industry manufacture scene and disappear Anti- scene, the delay criteria generally required is in 10ms-100ms;
(2) downlink controls class business: after margin control is to the business processing analysis of uplink, it is local to generally require collaboration Intelligent terminal assigns control instruction, and the delay requirement of this kind of business is generally in 10ms-1s;
(3) Streaming Media class business: specifically including the large-data operations such as video traffic, voice service, this kind of business when Prolong requirement generally in 1s-5s;
(4) regular monitoring class business: this business belongs to periodic traffic, be to time delay it is least sensitive, be typically also Second grade;
As shown in Figure 1, being margin control task schedule frame diagram of the invention, a kind of edge based on dynamic priority Controller method for scheduling task, the core technology of the technical solution are the dispatching methods of joint multi-process and multithreading.Process tune Degree is used to cope with the different types of business of priority, and an element of the thread scheduling as process scheduling, mainly reply are high simultaneously The business of the same race of hair.The present invention is in the multithread scheduling of most critical by the way of dynamic priority.
Multiprocess scheduling includes:
Margin control is that the business of different priorities opens different processes.Three attributes of process of the present invention Characterization: process number (Process ID, PID), port numbers (PORT), priority (PRI).When a process is currently running, it is System can be based on certain principle, deprive the disposal right for having distributed to it, it is distributed to other processes.Depriving principle has: preferential Principle (dynamic and static state), short process priority principle, timeslice principle etc. are weighed, process scheduling of the present invention is using quiet The mechanism of the principle of state priority, this task schedule is exactly the task scheduling strategy of preemptive type.
Specific steps are as follows:
Step 1: it is respectively the received process of task turn-on data of four seed types in margin control, and assigns The different port numbers of each process (PORT), to establish the mapping relations of type of service and port;
Step 2: the process number (Process ID) of four class business process is obtained, and is used according to the process number of business Renice instruction modification priority process priority (PRI);
Local intelligent terminal when sending data, can select corresponding port according to the type of service for sending data.Edge When controller receives data, type of service can be determined according to the port of the business of reception, so that it is determined that the priority of business (PRI).High-priority service can seize the system disposal right of low priority traffice.After high-priority service is finished, The low priority traffice being preempted automatically continues execution;
Multithread scheduling includes:
Multithread scheduling works inside some process, and the initial priority of all business is all identical.If into According to first come first served basis in journey, the processing for forcibly occupying system for the operational sustainability for first reaching margin control will lead to Power, should make each thread obtain the right to use that CPU distributes to process in turn.Realize two key technology virtual machines of thread scheduling Technology (VM) and container technique (Docker) are very complete, the formulation of the only scheduling rule lacked.The present invention can for into Business of the same race (initial priority is identical) in journey assigns thread new preferential inside process according to the waiting time of thread Grade (dynamic priority).
As shown in Fig. 2, multithreading method for scheduling task work flow diagram of the invention.The Rulemaking of multithread scheduling and Its explanation includes:
Scheduling principle: inside process (type of business is identical at this time), the business to be successively received opens different threads, Thread is executed according to dynamic priority height;
Thread state: it executes (dynamic priority does not change), wait (dynamic priority raising), dead (dynamic priority It resets);
The Rulemaking step of dynamic priority are as follows:
Step 1: business initial priority is identical in process, is pori, initialize system clock;
Step 2: statistics obtains the general execution time t of the business in this processgen, enable fiducial time θ=tgen/n。
Step 3: process receives new task, and creates new thread for it.The waiting time of all threads in update process
Step 4: all threads are sorted according to the waiting time, waiting for a long time, and priority is high.The meter of dynamic priority Calculation mode is
Step 5: system passes through fiducial time θ, repeats step 3;
Fiducial time, too small then dynamic priority change was too fast, and the process disposal right of will lead to alternates back and forth causes thrashing Phenomenon.The resource utilization highest of system when surveying n between 2-3 according to top instruction in linux system.
The above is only a preferred embodiment of the present invention, it should be pointed out that: for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of margin control dynamic task scheduling method based on process and thread scheduling, which is characterized in that including following Step:
Step 1: the type of internet of things service being divided into four seed types, respectively emergency alarm according to the sensitive situations to time delay Class business, downlink control class business, Streaming Media class business, regular monitoring class business;
Step 2, in margin control be respectively four seed types the received process of task turn-on data, and assign it is each into The port numbers PORT of Cheng Butong, to establish the mapping relations of type of service and port;
Step 3, the process number Process ID of four class business process is obtained, and is instructed and is repaired with renice according to the process number of business Change priority process priority P RI;
Step 4, inside the identical process of type of business, the business to be successively received opens different threads, and thread is according to dynamic State priority height executes, and the update method of dynamic priority is as follows:
Step 41, business initial priority is identical in process, is pori, initialize system clock;
Step 42, statistics obtains the general execution time t of the business in this processgen, enable fiducial time θ=tgen/ n, wherein n table Show the number that a desired task is at most preempted;
Step 43, process receives new task, and creates new thread for it, the waiting time of all threads in update processWherein,Indicate updated thread latency,When indicating that the thread before updating waits Between;
Step 44, all threads are sorted according to the waiting time, waiting for a long time, priority is high, the calculating side of dynamic priority Formula isWherein, pdynIndicate the priority of current thread,Indicate the waiting time of thread;
Step 45, system passes through fiducial time θ, repeats step 43.
2. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 1, feature Be: local intelligent terminal when sending data, can select corresponding port, Edge position control according to the type of service for sending data When device receives data, type of service can be determined according to the port of the business of reception, so that it is determined that the priority P RI of business, high Priority service seizes the system disposal right of low priority traffice, and after high-priority service is finished, what is be preempted is low excellent First grade business automatically continues execution.
3. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 2, feature Be: margin control is that the business of different priorities opens different processes, three attribute characterizations of process: process number Process ID, PID, port numbers PORT, priority P RI, based on principle is deprived, are deprived when a process is currently running It is distributed to other processes by the disposal right for distributing to it.
4. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 3, feature Be: depriving principle has: dynamic priority principle, static priority principle, short process priority principle, timeslice principle.
5. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 4, feature Be: the size for the frequency n that a desired task is at most preempted is between 2-3.
6. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 5, feature Be: the time delay of the emergency alarm class business is in 10ms-100ms.
7. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 6, feature Be: the delay requirement of the downlink control class business is in 10ms-1s.
8. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 7, feature Be: the delay requirement of the Streaming Media class business is in 1s-5s.
9. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 8, feature Be: the time delay of the regular monitoring class business is to require to be second grade.
10. the margin control dynamic task scheduling method based on process and thread scheduling according to claim 9, feature Be: thread state includes execution state, wait state, dead state, wherein and execution state is that dynamic priority does not change, Wait state is dynamic priority raising, and dead state is dynamic priority clearing.
CN201910245309.XA 2019-03-28 2019-03-28 Margin control dynamic task scheduling method based on process and thread scheduling Pending CN109947552A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910245309.XA CN109947552A (en) 2019-03-28 2019-03-28 Margin control dynamic task scheduling method based on process and thread scheduling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910245309.XA CN109947552A (en) 2019-03-28 2019-03-28 Margin control dynamic task scheduling method based on process and thread scheduling

Publications (1)

Publication Number Publication Date
CN109947552A true CN109947552A (en) 2019-06-28

Family

ID=67012407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910245309.XA Pending CN109947552A (en) 2019-03-28 2019-03-28 Margin control dynamic task scheduling method based on process and thread scheduling

Country Status (1)

Country Link
CN (1) CN109947552A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110891093A (en) * 2019-12-09 2020-03-17 中国科学院计算机网络信息中心 Method and system for selecting edge computing node in delay sensitive network
CN111131421A (en) * 2019-12-13 2020-05-08 中国科学院计算机网络信息中心 Method for interconnection and intercommunication of industrial internet field big data and cloud information
CN111200795A (en) * 2020-01-07 2020-05-26 南京邮电大学 Swarm-intelligent edge network control system and multitask scheduling method
CN111506413A (en) * 2020-07-02 2020-08-07 上海有孚智数云创数字科技有限公司 Intelligent task scheduling method and system based on business efficiency optimization
CN114418771A (en) * 2022-03-28 2022-04-29 深圳希施玛数据科技有限公司 Data transmission method and related device
WO2022141300A1 (en) * 2020-12-30 2022-07-07 华为技术有限公司 Task scheduling method and apparatus
CN115840632A (en) * 2023-02-21 2023-03-24 铜牛能源科技(山东)有限公司 Distributed scheduling management method and system based on time sequence database
CN117093345A (en) * 2023-09-05 2023-11-21 上海合芯数字科技有限公司 Task linked list execution method and device, terminal equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801101A (en) * 2006-01-17 2006-07-12 浙江大学 Thread implementation and thread state switching method in Java operation system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801101A (en) * 2006-01-17 2006-07-12 浙江大学 Thread implementation and thread state switching method in Java operation system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐思宇等: "面向多终端协同的多域融合边缘控制系统", 《物联网与无线通信-2018年全国物联网技术与应用大会论文集》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110891093A (en) * 2019-12-09 2020-03-17 中国科学院计算机网络信息中心 Method and system for selecting edge computing node in delay sensitive network
CN110891093B (en) * 2019-12-09 2022-02-22 中国科学院计算机网络信息中心 Method and system for selecting edge computing node in delay sensitive network
CN111131421A (en) * 2019-12-13 2020-05-08 中国科学院计算机网络信息中心 Method for interconnection and intercommunication of industrial internet field big data and cloud information
CN111131421B (en) * 2019-12-13 2022-07-29 中国科学院计算机网络信息中心 Method for interconnection and intercommunication of industrial internet field big data and cloud information
CN111200795A (en) * 2020-01-07 2020-05-26 南京邮电大学 Swarm-intelligent edge network control system and multitask scheduling method
CN111506413A (en) * 2020-07-02 2020-08-07 上海有孚智数云创数字科技有限公司 Intelligent task scheduling method and system based on business efficiency optimization
CN111506413B (en) * 2020-07-02 2020-09-18 上海有孚智数云创数字科技有限公司 Intelligent task scheduling method and system based on business efficiency optimization
WO2022141300A1 (en) * 2020-12-30 2022-07-07 华为技术有限公司 Task scheduling method and apparatus
CN114418771A (en) * 2022-03-28 2022-04-29 深圳希施玛数据科技有限公司 Data transmission method and related device
CN115840632A (en) * 2023-02-21 2023-03-24 铜牛能源科技(山东)有限公司 Distributed scheduling management method and system based on time sequence database
CN117093345A (en) * 2023-09-05 2023-11-21 上海合芯数字科技有限公司 Task linked list execution method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109947552A (en) Margin control dynamic task scheduling method based on process and thread scheduling
Zhang et al. Dynamic cloud task scheduling based on a two-stage strategy
US10754706B1 (en) Task scheduling for multiprocessor systems
CN1981484B (en) Hierarchal scheduler with multiple scheduling lanes and scheduling method
CN101968748B (en) Multithreading data scheduling method, device and network equipment
US20220342719A1 (en) Autonomous virtual radio access network control
CN104536827B (en) A kind of data dispatching method and device
US10146583B2 (en) System and method for dynamically managing compute and I/O resources in data processing systems
CN104079502B (en) Multi-user multi-queue scheduling method
CN111278052B (en) Industrial field data multi-priority scheduling method based on 5G slice
CN109842947B (en) Base station task oriented scheduling method and system
CN112506634B (en) Fairness operation scheduling method based on reservation mechanism
Ma et al. Chronos: Meeting coflow deadlines in data center networks
WO2019029721A1 (en) Task scheduling method, apparatus and device, and storage medium
Zhai et al. A computing resource adjustment mechanism for communication protocol processing in centralized radio access networks
CN110377411A (en) A kind of the workflow task dispatching method and system of Based on Distributed cloud
CN104010374B (en) A kind of method and device carrying out traffic scheduling
CN110347461B (en) Airplane cockpit human-computer interface information scheduling system and method based on migration workflow
US8756452B2 (en) Using pulses to control work ingress
Beltre et al. Framework for Analysing a Policy-driven Multi-Tenant Kubernetes Environment
CN117149441B (en) Task scheduling optimization method applied to IoT
Li Optimal offloading for dynamic compute-intensive applications in wireless networks
Kumar et al. Two-Level Priority Task Scheduling Algorithm for Real-Time IoT Based Storage Condition Assessment System
CN111538595B (en) MEC server task scheduling method based on task cutting
CN103501542B (en) A kind of method of self adaptation equitable proportion

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