CN106201695A - It is applicable to the multi-task scheduling method of embedded software system - Google Patents
It is applicable to the multi-task scheduling method of embedded software system Download PDFInfo
- Publication number
- CN106201695A CN106201695A CN201610553807.7A CN201610553807A CN106201695A CN 106201695 A CN106201695 A CN 106201695A CN 201610553807 A CN201610553807 A CN 201610553807A CN 106201695 A CN106201695 A CN 106201695A
- Authority
- CN
- China
- Prior art keywords
- task
- priority
- node
- ready
- list
- 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.)
- Withdrawn
Links
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/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
Abstract
The invention discloses a kind of multi-task scheduling method being applicable to embedded software system, S1, arrange two dimension task queue, two dimension task queue comprises one-dimensional priority node array;S2, one-dimensional priority node array are structure of arrays, and Task-list is list structure, and Task-list node comprises two dvielements: represent this priority of task DBMS;Point to next chained list node data;S3, initializing two dimension task queue, if without the ready task of respective priority, then priority node value be empty, if there is ready task, then and priority node sensing All factors being equal, preference will be give to level ready task chained list;S4, initialize two dimension task queue at the end of to priority node array according to from high to low priority orders search, starts first not for sky priority node pointed by task;Hang over the end of respective priority node indication ready task chained list according to task priority when S5, task ready.Advantage of the present invention easily realizes, expense is little.
Description
Technical field
The present invention relates to software system multi-task scheduling method, especially relate to be applicable to many of embedded software system
Business dispatching method.
Background technology
Realizing multi-task scheduling based on embedded OS is the method that a lot of large-scale embedded software system uses, embedding
The dispatching method entering formula operating system has rationally, optimizes, powerful, need not the advantage that designer works out dispatching algorithm.
But the deficiency existed be expense big (committed memory is big), start the drawback that time length, fund input are many, therefore tend not to meet
The development demand of middle-size and small-size embedded software system.And to the embedded software system without operating system, its multi-task scheduling one
As by implement of interruption function, the advantage of this method be simple in construction, response in time, but shortcoming be number of tasks number be limited to interrupt
Quantity, task length limited is in the break period.
Summary of the invention
Present invention aim at providing a kind of multi-task scheduling method being applicable to embedded software system, it possesses scheduling
The feature that method is reasonable, structure easily realizes, expense is little, the startup time is short, fund input is few.
For achieving the above object, the present invention takes following technical proposals:
The multi-task scheduling method being applicable to embedded software system of the present invention, is carried out as steps described below:
S1, arranging two dimension task queue, the task queue of described two dimension comprises one-dimensional priority node array, each described excellent
First level nodal value is empty or the Task-list of the ready task node composition of level of pointing to that All factors being equal, preference will be give to;
S2, described one-dimensional priority node array are structure of arrays, and Task-list is list structure, described Task-list node
Including at least two dvielements, it may be assumed that represent the data of this task priority;Point to the data of next chained list node;
S3, initialize described two dimension task queue, if without the ready task of respective priority, then priority node value be sky,
If there is ready task, then priority node points to All factors being equal, preference will be give to level ready task chained list;
S4, initialize two dimension task queue and terminate or at the end of the task of performing, to priority node array according to from height to
Low priority orders is searched, and starts first not task pointed by the priority node of sky;
When S5, task ready, hang over the end of respective priority node indication ready task chained list according to task priority.
The invention has the advantages that the two-dimentional task queue comprising precedence information and ready task information by setting, according to
Priority searches priority node in descending order, performs first non-NULL priority node value indication task.Therefore have
The realization reasonable, easy of structure priority dispatching method, the advantage of expense little (committed memory is few), well meet middle-size and small-size embedding
The multi-task scheduling of formula software system realizes.
Accompanying drawing explanation
Fig. 1 is two dimension task queue structure chart of the present invention.
Fig. 2 is the task scheduling flow chart of embedded software system of the present invention.
Fig. 3 is ready task process chart of the present invention.
Detailed description of the invention
As Figure 1-3, the multi-task scheduling method being applicable to embedded software system of the present invention, according to following step
Suddenly carry out:
Arranging two dimension task queue, this two dimension task queue comprises one-dimensional priority node array, each priority node value
Task-list for the ready task node composition of empty or level of pointing to that All factors being equal, preference will be give to;
One-dimensional priority node array is structure of arrays, and Task-list is list structure, and Task-list node includes at least two
Dvielement, it may be assumed that represent the data of this task priority;Point to the data of next chained list node;
Assume priority node A [0] that two dimension task queue comprises five pointer type, A [1], A [2], A [3], A [4], respectively
Corresponding priority 1,2,3,4,5, and 5 be limit priority, 1 is lowest priority;
Assume that task node structure struct note N represents, it is assumed that each task node comprises two dvielements: represent this
The data of task priority, represent with integer variable int y;Point to the data of next chained list node, use pointer type void
* p represents;
Initialization task queue, if without the ready task of respective priority, then priority node value is empty, if there is ready
Task, then priority node points to All factors being equal, preference will be give to level ready task chained list;
Assume that the ready task that priority is 5 has two, represent with N1, N2, priority be 1 ready task have three, with N3,
N4, N5 represent, without the ready task of other priority.
Initialize two dimension task queue, A [4]=N1, N1 → p=N2, N2 → p=NULL;A[3]=NULL;A[2]=NULL;A
[1]=NULL;A [0]=N3, N3 → p=N4, N4 → p=N5, N5 → p=NULL;
Initialization task queue terminates, or at the end of performing of task, to excellent according to from high to low of priority node array
First level sequential search, starts first not task pointed by the priority node of sky;
The priority node that first is not empty is A [4], starts task N1 that A [4] points to;
During task ready, hang over the end of respective priority node indication ready task chained list according to task priority;
Assuming that task N6 is ready, priority is 3, then A [2]=N6, N6 → p=NULL.
Claims (1)
1. the multi-task scheduling method being applicable to embedded software system, it is characterised in that: carry out as steps described below:
S1, arranging two dimension task queue, the task queue of described two dimension comprises one-dimensional priority node array, each described excellent
First level nodal value is empty or the Task-list of the ready task node composition of level of pointing to that All factors being equal, preference will be give to;
S2, described one-dimensional priority node array are structure of arrays, and Task-list is list structure, described Task-list node
Including at least two dvielements, it may be assumed that represent the data of this task priority;Point to the data of next chained list node;
S3, initialize described two dimension task queue, if without the ready task of respective priority, then priority node value be sky,
If there is ready task, then priority node points to All factors being equal, preference will be give to level ready task chained list;
S4, initialize two dimension task queue and terminate or at the end of the task of performing, to priority node array according to from height to
Low priority orders is searched, and starts first not task pointed by the priority node of sky;
When S5, task ready, hang over the end of respective priority node indication ready task chained list according to task priority.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610553807.7A CN106201695A (en) | 2016-07-15 | 2016-07-15 | It is applicable to the multi-task scheduling method of embedded software system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610553807.7A CN106201695A (en) | 2016-07-15 | 2016-07-15 | It is applicable to the multi-task scheduling method of embedded software system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106201695A true CN106201695A (en) | 2016-12-07 |
Family
ID=57475100
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610553807.7A Withdrawn CN106201695A (en) | 2016-07-15 | 2016-07-15 | It is applicable to the multi-task scheduling method of embedded software system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106201695A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107102892A (en) * | 2017-03-28 | 2017-08-29 | 北京华云网际科技有限公司 | The treating method and apparatus of timer |
CN107291545A (en) * | 2017-08-07 | 2017-10-24 | 星环信息科技(上海)有限公司 | The method for scheduling task and equipment of multi-user in computing cluster |
CN109976885A (en) * | 2017-12-28 | 2019-07-05 | 中移物联网有限公司 | Event-handling method, device and storage medium based on multiple task operating system |
CN110737522A (en) * | 2019-10-16 | 2020-01-31 | 福州物联网开放实验室有限公司 | Scheduling method for standby tasks of embedded operating systems |
CN111277900A (en) * | 2018-12-05 | 2020-06-12 | 深圳市茁壮网络股份有限公司 | Starting method and device of set top box |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1519735A (en) * | 2003-01-24 | 2004-08-11 | 深圳市中兴通讯股份有限公司 | Process scheduling method in embedded type real time operating system |
CN101178664A (en) * | 2007-12-12 | 2008-05-14 | 北京中星微电子有限公司 | Task scheduling method and system in real-time operating system |
CN102004664A (en) * | 2010-10-18 | 2011-04-06 | 北京控制工程研究所 | Scheduling method of embedded real-time operating system of space vehicle |
CN102043668A (en) * | 2010-12-10 | 2011-05-04 | 成电汽车电子产业园(昆山)有限公司 | Method for activating task in embedded real-time operating system for multiple times |
CN102096605A (en) * | 2011-02-17 | 2011-06-15 | 成电汽车电子产业园(昆山)有限公司 | Multi-level resource management implementation method in embedded real-time operation system |
US20120134371A1 (en) * | 2009-08-07 | 2012-05-31 | Zte Corporation | Queue scheduling method and apparatus |
CN102541642A (en) * | 2011-12-30 | 2012-07-04 | 中国科学院软件研究所 | Task management method for enhancing real-time performance |
CN102591703A (en) * | 2011-01-10 | 2012-07-18 | 中兴通讯股份有限公司 | Task scheduling method and task scheduling device for operating system and computer |
-
2016
- 2016-07-15 CN CN201610553807.7A patent/CN106201695A/en not_active Withdrawn
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1519735A (en) * | 2003-01-24 | 2004-08-11 | 深圳市中兴通讯股份有限公司 | Process scheduling method in embedded type real time operating system |
CN101178664A (en) * | 2007-12-12 | 2008-05-14 | 北京中星微电子有限公司 | Task scheduling method and system in real-time operating system |
US20120134371A1 (en) * | 2009-08-07 | 2012-05-31 | Zte Corporation | Queue scheduling method and apparatus |
CN102004664A (en) * | 2010-10-18 | 2011-04-06 | 北京控制工程研究所 | Scheduling method of embedded real-time operating system of space vehicle |
CN102043668A (en) * | 2010-12-10 | 2011-05-04 | 成电汽车电子产业园(昆山)有限公司 | Method for activating task in embedded real-time operating system for multiple times |
CN102591703A (en) * | 2011-01-10 | 2012-07-18 | 中兴通讯股份有限公司 | Task scheduling method and task scheduling device for operating system and computer |
CN102096605A (en) * | 2011-02-17 | 2011-06-15 | 成电汽车电子产业园(昆山)有限公司 | Multi-level resource management implementation method in embedded real-time operation system |
CN102541642A (en) * | 2011-12-30 | 2012-07-04 | 中国科学院软件研究所 | Task management method for enhancing real-time performance |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107102892A (en) * | 2017-03-28 | 2017-08-29 | 北京华云网际科技有限公司 | The treating method and apparatus of timer |
CN107291545A (en) * | 2017-08-07 | 2017-10-24 | 星环信息科技(上海)有限公司 | The method for scheduling task and equipment of multi-user in computing cluster |
CN107291545B (en) * | 2017-08-07 | 2019-12-10 | 星环信息科技(上海)有限公司 | Task scheduling method and device for multiple users in computing cluster |
CN109976885A (en) * | 2017-12-28 | 2019-07-05 | 中移物联网有限公司 | Event-handling method, device and storage medium based on multiple task operating system |
CN111277900A (en) * | 2018-12-05 | 2020-06-12 | 深圳市茁壮网络股份有限公司 | Starting method and device of set top box |
CN110737522A (en) * | 2019-10-16 | 2020-01-31 | 福州物联网开放实验室有限公司 | Scheduling method for standby tasks of embedded operating systems |
CN110737522B (en) * | 2019-10-16 | 2023-03-03 | 福州物联网开放实验室有限公司 | Standby task scheduling method of embedded operating system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106201695A (en) | It is applicable to the multi-task scheduling method of embedded software system | |
Ma et al. | Remote sensing big data computing: Challenges and opportunities | |
Kwon et al. | Managing Skew in Hadoop. | |
Ananthanarayanan et al. | {GRASS}: Trimming stragglers in approximation analytics | |
AU2011369362B2 (en) | Application notifications | |
US9712646B2 (en) | Automated client/server operation partitioning | |
US11132383B2 (en) | Techniques for processing database tables using indexes | |
US11061539B2 (en) | Reference nodes in a computational graph | |
CN108171267B (en) | User group division method and device and message pushing method and device | |
US20140331235A1 (en) | Resource allocation apparatus and method | |
JP7047228B2 (en) | Data query methods, devices, electronic devices, readable storage media, and computer programs | |
TWI827792B (en) | Multipath neural network, method to allocate resources and multipath neural network analyzer | |
CN103262002A (en) | Optimizing communication of system call requests | |
CN102004664A (en) | Scheduling method of embedded real-time operating system of space vehicle | |
CN103608776A (en) | Dynamic work partitioning on heterogeneous processing device | |
CN110597606B (en) | Cache-friendly user-level thread scheduling method | |
CN105204938A (en) | Data-intensive process scheduling method of memory access | |
CN102708009A (en) | Method for sharing GPU (graphics processing unit) by multiple tasks based on CUDA (compute unified device architecture) | |
CN102306205A (en) | Method and device for allocating transactions | |
CN104239134A (en) | Method and device for managing tasks of many-core system | |
CN102541467A (en) | Scheduling method for read-write requests of object data server | |
CN102043668B (en) | Method for activating task in embedded real-time operating system for multiple times | |
US10733218B2 (en) | System, method, and program for aggregating data | |
CN103309734A (en) | Embedded task scheduling method based on priority grouping | |
CN117539548A (en) | Method, device, equipment and storage medium for executing instruction based on wait mechanism |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20161207 |