[go: up one dir, main page]

CN103309734A - Embedded task scheduling method based on priority grouping - Google Patents

Embedded task scheduling method based on priority grouping Download PDF

Info

Publication number
CN103309734A
CN103309734A CN2013102503301A CN201310250330A CN103309734A CN 103309734 A CN103309734 A CN 103309734A CN 2013102503301 A CN2013102503301 A CN 2013102503301A CN 201310250330 A CN201310250330 A CN 201310250330A CN 103309734 A CN103309734 A CN 103309734A
Authority
CN
China
Prior art keywords
task
priority
ready
tasks
group
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
CN2013102503301A
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.)
Harbin Institute of Technology Shenzhen
Original Assignee
Harbin Institute of Technology Shenzhen
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 Harbin Institute of Technology Shenzhen filed Critical Harbin Institute of Technology Shenzhen
Priority to CN2013102503301A priority Critical patent/CN103309734A/en
Publication of CN103309734A publication Critical patent/CN103309734A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

基于优先级分组的嵌入式任务调度方法,涉及嵌入式系统中的任务调度领域,解决现有任务调度方法操作繁琐,需要大量的计算过程与存储空间,致使消耗资源大、不便于开发人员理解和修改的问题。包括步骤:将N个任务按优先级进行分组;按照组别优先级由高至低进行检索,并将有就绪任务的最高组别进行检索,获取具有最高优先级的就绪任务作为待切换任务;获取待切换任务信息并执行任务切换。本发明可广泛应用于嵌入式系统的任务调度。

Figure 201310250330

The embedded task scheduling method based on priority grouping involves the field of task scheduling in embedded systems, and solves the problem that the existing task scheduling method is cumbersome to operate, requires a large amount of calculation process and storage space, and consumes a lot of resources, which is not easy for developers to understand and understand. Modified question. The steps include: grouping N tasks according to priority; searching according to group priority from high to low, and retrieving the highest group with ready tasks, and obtaining the ready task with the highest priority as the task to be switched; Obtain information about tasks to be switched and perform task switching. The invention can be widely applied to task scheduling of embedded systems.

Figure 201310250330

Description

基于优先级分组的嵌入式任务调度方法Embedded Task Scheduling Method Based on Priority Grouping

技术领域technical field

本发明涉及嵌入式系统中的任务调度领域。The invention relates to the field of task scheduling in embedded systems.

背景技术Background technique

随着软硬件的快速发展,现代的嵌入式设备的功能变得日趋强大了。随着嵌入式设备所实现的功能越来越复杂,传统的单任务模型已经无法满足需求,于是在嵌入式设备中实现了操作系统,通过操作系统来统一对资源进行管理,调度各个任务。而对于嵌入式领域,都要求所采用的操作系统满足稳定性好,响应速度快,来应对各种对时间有着严格要求的情况。With the rapid development of software and hardware, the functions of modern embedded devices have become increasingly powerful. As the functions implemented by embedded devices become more and more complex, the traditional single-task model can no longer meet the needs. Therefore, an operating system is implemented in embedded devices, which manages resources and schedules various tasks uniformly through the operating system. For the embedded field, the operating system used is required to meet the requirements of good stability and fast response speed to deal with various situations that have strict requirements on time.

任务调度作为嵌入式操作系统的核心之一,主要功能是从多个用户任务中选择一个就绪的任务,然后调转到用户任务执行。嵌入式操作系统中的任务调度一般是基于优先级进行调度,即每个任务会根据其重要程度的不同赋予一个优先级,嵌入式系统中的调度器会选择优先级最高的就绪任务运行。但现有任务调度方法操作繁琐,需要大量的计算过程与存储空间。Task scheduling is one of the cores of the embedded operating system, and its main function is to select a ready task from multiple user tasks, and then transfer to the user task for execution. Task scheduling in embedded operating systems is generally based on priority scheduling, that is, each task will be given a priority according to its importance, and the scheduler in the embedded system will select the ready task with the highest priority to run. However, the existing task scheduling methods are cumbersome to operate and require a large amount of calculation process and storage space.

发明内容Contents of the invention

本发明为了解决现有任务调度方法操作繁琐,需要大量的计算过程与存储空间,致使消耗资源大、不便于开发人员理解和修改的问题,从而提供一种基于优先级分组的任务调度方法。In order to solve the problem that the existing task scheduling method is cumbersome to operate, requires a large number of calculation processes and storage space, consumes a lot of resources, and is not easy for developers to understand and modify, and thus provides a task scheduling method based on priority grouping.

基于优先级分组的嵌入式任务调度方法,它包括如下步骤:An embedded task scheduling method based on priority grouping, which includes the following steps:

步骤一:将N个任务按优先级进行分组;所述N个任务按优先级等级进行排序,分为P个优先级组,即每组个优先级;Step 1: group N tasks according to priority; said N tasks are sorted according to priority level and divided into P priority groups, that is, each group a priority;

所述任务进行排序按照优先级的等级从高到底排序或从低到高进行排序;The tasks are sorted according to the level of priority from high to bottom or from low to high;

步骤二:按照组别优先级由高至低进行检索,并将有就绪任务的最高组别进行检索,获取具有最高优先级的就绪任务作为待切换任务;Step 2: Retrieve according to group priority from high to low, and retrieve the highest group with ready tasks, and obtain the ready task with the highest priority as the task to be switched;

所述任务通过激活任务和终止任务进行激活和终止,其中:The tasks are activated and terminated by activating tasks and terminating tasks, where:

激活任务,用于激活优先级任务使其成为就绪任务;Activation task, which is used to activate the priority task to make it a ready task;

终止任务,用于终止就绪任务使其成为未就绪任务;Terminate task, which is used to terminate the ready task to make it an unready task;

步骤三:获取待切换任务信息并执行任务切换。Step 3: Obtain the task information to be switched and perform task switching.

本发明实现了基于优先级分组的嵌入式任务调度。本发明调度效率高、存储空间小、结构简单且适于更改任务较量的嵌入式实时系统的任务调度方法。采用本发明所述方法能够节省一般的搜索时间与查找次数,使能够存储的任务数量无限制。The invention realizes the embedded task scheduling based on priority grouping. The invention has the advantages of high dispatching efficiency, small storage space, simple structure and the task dispatching method of the embedded real-time system which is suitable for changing task comparison. The method of the invention can save general search time and search times, and make the number of tasks that can be stored unlimited.

图1为本发明基于优先级分组的嵌入式任务调度方法的流程图;Fig. 1 is the flowchart of the embedded task scheduling method based on priority grouping of the present invention;

图2为具体实施方式三所述执行任务切换的流程图;FIG. 2 is a flow chart of executing task switching described in Embodiment 3;

图3为具体实施方式四所述激活任务的流程图;FIG. 3 is a flowchart of the activation task described in Embodiment 4;

图4为具体实施方式五所述终止任务的流程图;Fig. 4 is a flow chart of terminating tasks described in Embodiment 5;

图5为具体实施例的调度模型示例图。Fig. 5 is an example diagram of a scheduling model of a specific embodiment.

具体实施方式Detailed ways

具体实施方式一,结合图1说明本具体实施方式。基于优先级分组的嵌入式任务调度方法,它包括如下步骤:Specific implementation mode 1, this specific implementation mode will be described with reference to FIG. 1 . An embedded task scheduling method based on priority grouping, which includes the following steps:

步骤一:将N个任务按优先级进行分组;所述N个任务按优先级等级进行排序,分为P个优先级组,即每组

Figure BDA00003392439400021
个优先级;Step 1: group N tasks according to priority; said N tasks are sorted according to priority level and divided into P priority groups, that is, each group
Figure BDA00003392439400021
a priority;

所述任务进行排序按照优先级的等级从高到底排序或从低到高进行排序;The tasks are sorted according to the level of priority from high to bottom or from low to high;

步骤二:按照组别优先级由高至低进行检索,并将有就绪任务的最高组别进行检索,获取具有最高优先级的就绪任务作为待切换任务;Step 2: Retrieve according to group priority from high to low, and retrieve the highest group with ready tasks, and obtain the ready task with the highest priority as the task to be switched;

所述任务通过激活任务和终止任务进行激活和终止,其中:The tasks are activated and terminated by activating tasks and terminating tasks, where:

激活任务,用于激活优先级任务使其成为就绪任务;Activation task, which is used to activate the priority task to make it a ready task;

终止任务,用于终止就绪任务使其成为未就绪任务;Terminate task, which is used to terminate the ready task to make it an unready task;

步骤三:获取待切换任务信息并执行任务切换。Step 3: Obtain the task information to be switched and perform task switching.

具体实施方式二、本具体实施方式与具体实施方式一不同的是步骤三:获取待切换任务信息包括任务状态信息、任务上下文信息和任务控制信息;Embodiment 2. The difference between this embodiment and Embodiment 1 is step 3: obtaining task information to be switched including task status information, task context information and task control information;

任务状态信息,用于标识任务的自身信息;Task status information, used to identify the task's own information;

任务上下文信息,用于保存调度过程中的现场信息;Task context information, used to save on-site information during the scheduling process;

任务控制信息,用于任务的调度和管理;Task control information for task scheduling and management;

所述任务状态信息包括任务的优先级、任务的当前状态和任务类型;The task status information includes the priority of the task, the current state of the task and the task type;

所述任务上下文信息包括通用寄存器的内容、控制寄存器的内容、用户堆栈指针和内核堆栈指针;The task context information includes the contents of the general register, the contents of the control register, the user stack pointer and the kernel stack pointer;

所述任务控制信息包括任务调度的相关信息、任务间通信的相关信息和任务的资源使用情况信息。The task control information includes task scheduling related information, inter-task communication related information and task resource usage information.

具体实施方式三、结合图2说明本具体实施方式,本具体实施方式与具体实施方式二不同的是步骤三所述执行任务切换过程为:Specific embodiment three, this specific embodiment is described in conjunction with Fig. 2, the difference between this specific embodiment and specific embodiment two is that the execution task switching process described in step three is:

步骤A1:用于获取任务切换开始信号的步骤;Step A1: a step for obtaining a task switching start signal;

步骤A2:用于关中断的步骤;Step A2: a step for disabling interrupts;

步骤A3:用于保存当前任务上下文信息Step A3: Used to save the current task context information

步骤A4:用于设置待切换任务为当前任务的步骤;Step A4: a step for setting the task to be switched as the current task;

步骤A5:用于装入待切换任务上下文信息的步骤;Step A5: a step for loading the context information of the task to be switched;

步骤A6:用于打开中断,执行任务切换的步骤。Step A6: a step for enabling interrupts and performing task switching.

具体实施方式四、结合图3说明本具体实施方式,本具体实施方式与具体实施方式一或三不同的是激活任务,用于激活优先级任务使其成为就绪任务过程为:Embodiment 4. This embodiment is described in conjunction with FIG. 3. The difference between this embodiment and Embodiment 1 or 3 is the activation task, which is used to activate the priority task and make it a ready task process:

步骤B1:用于获取待激活任务的优先级的步骤;Step B1: a step for obtaining the priority of the task to be activated;

步骤B2:用于判断任务优先级是否有效的步骤;若是则进入步骤B3,若否则退出过程;Step B2: a step for judging whether the task priority is valid; if so, enter step B3, otherwise exit the process;

步骤B3:用于将所述任务状态更改为就绪状态的步骤;Step B3: a step for changing the task state to a ready state;

步骤B4:用于将所述任务放入优先级队列中的步骤;Step B4: a step for putting the task into a priority queue;

步骤B5:用于判断所述任务优先级的编号是否大于其所在组的最高优先级;若是则进入步骤B6,若否则进入步骤B7;Step B5: It is used to judge whether the number of the priority of the task is greater than the highest priority of the group it belongs to; if so, go to step B6, otherwise go to step B7;

步骤B6:用于更新所述任务所在组的最高优先级编号的步骤;Step B6: a step for updating the highest priority number of the group to which the task belongs;

步骤B7:用于判断当前中断状态的步骤;若处于关中断则退出过程,若处于开中断则进行任务切换。Step B7: a step for judging the current interrupt state; if the interrupt is off, the process is exited, and if the interrupt is on, the task is switched.

具体实施方式五、结合图4说明本具体实施方式,本具体实施方式与具体实施方式四不同的是所述终止任务,用于终止就绪任务使其成为未就绪任务过程为:Embodiment 5. This embodiment is described in conjunction with FIG. 4. The difference between this embodiment and Embodiment 4 is that the termination task is used to terminate the ready task and make it become an unready task. The process is as follows:

步骤C1:用于获取终止任务信号的步骤;Step C1: a step for obtaining a task termination signal;

步骤C2:用于判断当前中断状态的步骤;若处于关中断则退出过程,若处于开中断则进入C3。Step C2: a step for judging the current interrupt state; if the interrupt is off, exit the process, and if the interrupt is on, enter C3.

步骤C3:用于设置当前任务为挂起状态的步骤;Step C3: a step for setting the current task as a pending state;

步骤C4:用于将当前任务从就绪队列中移出的步骤;Step C4: a step for removing the current task from the ready queue;

步骤C5:用于判断所述终止任务的优先级的编号是否大于其所在组的最高优先级;若是则进入步骤C6,否则进入步骤C7;Step C5: judging whether the number of the priority of the terminated task is greater than the highest priority of the group it belongs to; if so, go to step C6, otherwise go to step C7;

步骤C6:用于更新所述终止任务所在组的最高优先级编号的步骤;Step C6: a step for updating the highest priority number of the group to which the terminated task belongs;

步骤C7:用于进行任务切换的步骤。Step C7: a step for performing task switching.

本发明执行任务切换的平均代价为

Figure BDA00003392439400041
执行一次激活任务时的代价为一次比较操作,执行一次终止任务的平均代价为
Figure BDA00003392439400042
可知,系统进行调度任务所花费的总的代价为
Figure BDA00003392439400043
且当时,调度所花费的代价最小,而且随着系统中任务数量的减小,任务调度所需的代价减小。The average cost of performing task switching in the present invention is
Figure BDA00003392439400041
The cost of executing an activation task is a comparison operation, and the average cost of executing a termination task is
Figure BDA00003392439400042
It can be seen that the total cost for the system to schedule tasks is
Figure BDA00003392439400043
And when When , the cost of scheduling is the smallest, and as the number of tasks in the system decreases, the cost of task scheduling decreases.

结合图5说明具体实施例:A specific embodiment is described in conjunction with Fig. 5:

假设将任务按优先级进行编号,从0到63,编号越大,优先级越高,按编号从小到大将为8组,每组8个优先级。系统运行的某一时刻,优先级组7中就绪任务有56,57,58,59,其中就绪的最高优先级是59,优先级组6中没有就绪的优先级,然后依次确定每组的就绪任务中最高的优先级。Assume that the tasks are numbered according to the priority, from 0 to 63. The larger the number, the higher the priority. There will be 8 groups according to the number from small to large, and each group has 8 priorities. At a certain moment when the system is running, there are 56, 57, 58, and 59 ready tasks in priority group 7, among which the highest priority of ready is 59, and there is no ready priority in priority group 6, and then determine the ready tasks of each group in turn The highest priority among tasks.

当系统中任务定时中断发生时,首先判断是否有就绪的任务,当没有就绪任务的情况下,运行空闲任务,当存在就绪任务时,开始选择具有最高优先级的任务。从优先级组高到低依次查看组中是否有就绪的任务。优先级组7中就绪的最高优先级是59.于是选择59为当前就绪的最高任务优先级号,根据任务调度相关机构找到59号任务的任务控制模块,调度器进行任务切换,开始执行59号任务定义的用户程序。When a task timing interrupt occurs in the system, it first judges whether there is a ready task. If there is no ready task, run the idle task. When there is a ready task, start to select the task with the highest priority. From the highest priority group to the lowest, check whether there are ready tasks in the group. The highest priority of the ready task in priority group 7 is 59. Therefore, 59 is selected as the highest priority number of the currently ready task, and the task control module of task 59 is found according to the task scheduling related organization, and the scheduler performs task switching and starts to execute task 59 Task-defined user programs.

当激活一个任务优先级为43号任务时,43号任务属于优先级组5,原先优先级组5中最高优先级为42号任务,而此时43号任务比42号任务的优先级大,具有更高的优先级,于是更新优先级组5最高就绪优先级任务编号更新为43号。而当激活一个任务优先级为26号任务时,26号任务属于优先级组3,原优先级组3中最高优先级为31号任务,此时26号任务的优先级比31号任务优先级小,于是不更新优先级表。When activating a task whose priority is task No. 43, task No. 43 belongs to priority group 5. Originally, the highest priority in priority group 5 was task No. 42. At this time, task No. 43 has a higher priority than task No. 42. It has a higher priority, so the update priority group 5 highest ready priority task number is updated to No. 43. When activating a task whose priority is task No. 26, task No. 26 belongs to priority group 3, and the highest priority in the original priority group 3 is task No. 31. At this time, the priority of task No. 26 is higher than that of task No. 31. Small, so the priority table is not updated.

当终止一个任务优先级为42的任务时,42号任务属于优先级组5,原先优先级组5中最高优先级为42号任务,此时终止的42号任务为优先级组5中最高优先级任务,此时需要找出本组中剩余就绪任务中具有最高优先级的任务,于是更新优先级组5最高就绪优先级任务编号。When terminating a task with a task priority of 42, task No. 42 belongs to priority group 5, and the highest priority in priority group 5 is task No. 42. At this time, the terminated task No. 42 is the highest priority in priority group 5. In this case, it is necessary to find out the task with the highest priority among the remaining ready tasks in this group, so update the number of the task with the highest ready priority in priority group 5.

把本发明基于优先级分组的嵌入式任务调度方法与μC/OS-II的调度算法进行比较:μC/OS-II是嵌入式领域一款优秀的操作系统,尤其在调度算法受人称道。由于μC/OS-II只支持64个固定优先级数目,所以在基于优先级分组的算法中将取N=64,P=8,比较结果如下:Comparing the embedded task scheduling method based on priority grouping of the present invention with the scheduling algorithm of μC/OS-II: μC/OS-II is an excellent operating system in the embedded field, especially in the scheduling algorithm. Since μC/OS-II only supports 64 fixed priority numbers, N=64 and P=8 will be taken in the algorithm based on priority grouping, and the comparison results are as follows:

Figure BDA00003392439400051
Figure BDA00003392439400051

从对比可以看出,相比μC/OS-II调度算法,基于优先级分组调度算法节省了很大的空间,并且获得了很高的灵活性,而付出的时间代价确很少。而且在实际的应用中,使用的优先级数目一般不会超过64个,所以基于优先级分组的调度算法性能会非常的好。It can be seen from the comparison that compared with the μC/OS-II scheduling algorithm, the priority-based packet scheduling algorithm saves a lot of space and obtains high flexibility, but the time cost is indeed very small. Moreover, in practical applications, the number of priorities used generally does not exceed 64, so the performance of the scheduling algorithm based on priority grouping will be very good.

Claims (5)

1.基于优先级分组的嵌入式任务调度方法,其特征在于它包括如下步骤:1. based on the embedded task scheduling method of priority grouping, it is characterized in that it comprises the steps: 步骤一:将N个任务按优先级进行分组;所述N个任务按优先级等级进行排序,分为P个优先级组,即每组
Figure FDA00003392439300011
个优先级;
Step 1: group N tasks according to priority; said N tasks are sorted according to priority level and divided into P priority groups, that is, each group
Figure FDA00003392439300011
a priority;
所述任务进行排序按照优先级的等级从高到底排序或从低到高进行排序;The tasks are sorted according to the level of priority from high to bottom or from low to high; 步骤二:按照组别优先级由高至低进行检索,并将有就绪任务的最高组别进行检索,获取具有最高优先级的就绪任务作为待切换任务;Step 2: Retrieve according to group priority from high to low, and retrieve the highest group with ready tasks, and obtain the ready task with the highest priority as the task to be switched; 所述任务通过激活任务和终止任务进行激活和终止,其中:The tasks are activated and terminated by activating tasks and terminating tasks, where: 激活任务,用于激活优先级任务使其成为就绪任务;Activation task, which is used to activate the priority task to make it a ready task; 终止任务,用于终止就绪任务使其成为未就绪任务;Terminate task, which is used to terminate the ready task to make it an unready task; 步骤三:获取待切换任务信息并执行任务切换。Step 3: Obtain the task information to be switched and perform task switching.
2.根据权利要求1所述的基于优先级分组的任务调度方法,其特征在于步骤三:获取待切换任务信息包括任务状态信息、任务上下文信息和任务控制信息;2. The task scheduling method based on priority grouping according to claim 1, characterized in that step 3: obtaining task information to be switched includes task status information, task context information and task control information; 任务状态信息,用于标识任务的自身信息;Task status information, used to identify the task's own information; 任务上下文信息,用于保存调度过程中的现场信息;Task context information, used to save on-site information during the scheduling process; 任务控制信息,用于任务的调度和管理;Task control information for task scheduling and management; 所述任务状态信息包括任务的优先级、任务的当前状态和任务类型;The task status information includes the priority of the task, the current state of the task and the task type; 所述任务上下文信息包括通用寄存器的内容、控制寄存器的内容、用户堆栈指针和内核堆栈指针;The task context information includes the contents of the general register, the contents of the control register, the user stack pointer and the kernel stack pointer; 所述任务控制信息包括任务调度的相关信息、任务间通信的相关信息和任务的资源使用情况信息。The task control information includes task scheduling related information, inter-task communication related information and task resource usage information. 3.根据权利要求2所述的基于优先级分组的任务调度方法,其特征在于步骤三所述执行任务切换过程为:3. The task scheduling method based on priority grouping according to claim 2, characterized in that the execution task switching process described in step 3 is: 步骤A1:用于获取任务切换开始信号的步骤;Step A1: a step for obtaining a task switching start signal; 步骤A2:用于关中断的步骤;Step A2: a step for disabling interrupts; 步骤A3:用于保存当前任务上下文信息Step A3: Used to save the current task context information 步骤A4:用于设置待切换任务为当前任务的步骤;Step A4: a step for setting the task to be switched as the current task; 步骤A5:用于装入待切换任务上下文信息的步骤;Step A5: a step for loading the context information of the task to be switched; 步骤A6:用于打开中断,执行任务切换的步骤。Step A6: a step for enabling interrupts and performing task switching. 4.根据权利要求1或3所述的基于优先级分组的任务调度方法,其特征在于激活任务,用于激活优先级任务使其成为就绪任务过程为:4. according to claim 1 or 3 described task scheduling methods based on priority grouping, it is characterized in that activation task is used to activate priority task and make it become ready task process as: 步骤B1:用于获取待激活任务的优先级的步骤;Step B1: a step for obtaining the priority of the task to be activated; 步骤B2:用于判断任务优先级是否有效的步骤;若是则进入步骤B3,若否则退出过程;Step B2: a step for judging whether the task priority is valid; if so, enter step B3, otherwise exit the process; 步骤B3:用于将所述任务状态更改为就绪状态的步骤;Step B3: a step for changing the task state to a ready state; 步骤B4:用于将所述任务放入优先级队列中的步骤;Step B4: a step for putting the task into a priority queue; 步骤B5:用于判断所述任务优先级的编号是否大于其所在组的最高优先级;若是则进入步骤B6,若否则进入步骤B7;Step B5: It is used to judge whether the number of the priority of the task is greater than the highest priority of the group it belongs to; if so, go to step B6, otherwise go to step B7; 步骤B6:用于更新所述任务所在组的最高优先级编号的步骤;Step B6: a step for updating the highest priority number of the group to which the task belongs; 步骤B7:用于判断当前中断状态的步骤;若处于关中断则退出过程,若处于开中断则进行任务切换。Step B7: a step for judging the current interrupt state; if the interrupt is off, the process is exited, and if the interrupt is on, the task is switched. 5.根据权利要求4所述的基于优先级分组的任务调度方法,其特征在于所述终止任务,用于终止就绪任务使其成为未就绪任务过程为:5. The task scheduling method based on priority grouping according to claim 4, characterized in that the termination task is used to terminate the ready task and make it become an unready task process as follows: 步骤C1:用于获取终止任务信号的步骤;Step C1: a step for obtaining a task termination signal; 步骤C2:用于判断当前中断状态的步骤;若处于关中断则退出过程,若处于开中断则进入C3。Step C2: a step for judging the current interrupt state; if the interrupt is off, exit the process, and if the interrupt is on, enter C3. 步骤C3:用于设置当前任务为挂起状态的步骤;Step C3: a step for setting the current task as a pending state; 步骤C4:用于将当前任务从就绪队列中移出的步骤;Step C4: a step for removing the current task from the ready queue; 步骤C5:用于判断所述终止任务的优先级的编号是否大于其所在组的最高优先级;若是则进入步骤C6,否则进入步骤C7;Step C5: judging whether the number of the priority of the terminated task is greater than the highest priority of the group it belongs to; if so, go to step C6, otherwise go to step C7; 步骤C6:用于更新所述终止任务所在组的最高优先级编号的步骤;Step C6: a step for updating the highest priority number of the group to which the terminated task belongs; 步骤C7:用于进行任务切换的步骤。Step C7: a step for performing task switching.
CN2013102503301A 2013-06-24 2013-06-24 Embedded task scheduling method based on priority grouping Pending CN103309734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013102503301A CN103309734A (en) 2013-06-24 2013-06-24 Embedded task scheduling method based on priority grouping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013102503301A CN103309734A (en) 2013-06-24 2013-06-24 Embedded task scheduling method based on priority grouping

Publications (1)

Publication Number Publication Date
CN103309734A true CN103309734A (en) 2013-09-18

Family

ID=49134992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013102503301A Pending CN103309734A (en) 2013-06-24 2013-06-24 Embedded task scheduling method based on priority grouping

Country Status (1)

Country Link
CN (1) CN103309734A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914346A (en) * 2013-12-16 2014-07-09 西北工业大学 Group-based dual-priority task scheduling and energy saving method for real-time operating system
CN104750556A (en) * 2015-04-14 2015-07-01 浪潮电子信息产业股份有限公司 Method and device for dispatching HPC (high performance computing) cluster work
WO2016165467A1 (en) * 2015-09-16 2016-10-20 中兴通讯股份有限公司 Traffic flow-based task scheduling method and apparatus
CN107291542A (en) * 2017-06-27 2017-10-24 北京优特捷信息技术有限公司 A kind of intelligence performs the method and device of retrieval tasks
CN109408208A (en) * 2018-09-21 2019-03-01 深圳华大北斗科技有限公司 Multi-task processing method, equipment, system and the storage medium of navigation chip
CN118025049A (en) * 2024-04-15 2024-05-14 成都创科升电子科技有限责任公司 Control method and system for vehicle electric control based on scheduler and vehicle

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003186685A (en) * 2001-09-21 2003-07-04 Lg Electronics Inc Overload control method for real-time processing system
CN1490722A (en) * 2003-09-19 2004-04-21 清华大学 Hierarchical Task Switching Method Based on PowerPC Processor Architecture
CN101178664A (en) * 2007-12-12 2008-05-14 北京中星微电子有限公司 Task scheduling method and system in real-time operating system
CN102043667A (en) * 2010-11-25 2011-05-04 深圳市科陆电子科技股份有限公司 Task scheduling method for embedded operating system
CN102063325A (en) * 2011-01-06 2011-05-18 哈尔滨工业大学 Method for implementing multi-task real-time operating system embedded into 51 series singlechip

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003186685A (en) * 2001-09-21 2003-07-04 Lg Electronics Inc Overload control method for real-time processing system
CN1490722A (en) * 2003-09-19 2004-04-21 清华大学 Hierarchical Task Switching Method Based on PowerPC Processor Architecture
CN101178664A (en) * 2007-12-12 2008-05-14 北京中星微电子有限公司 Task scheduling method and system in real-time operating system
CN102043667A (en) * 2010-11-25 2011-05-04 深圳市科陆电子科技股份有限公司 Task scheduling method for embedded operating system
CN102063325A (en) * 2011-01-06 2011-05-18 哈尔滨工业大学 Method for implementing multi-task real-time operating system embedded into 51 series singlechip

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914346A (en) * 2013-12-16 2014-07-09 西北工业大学 Group-based dual-priority task scheduling and energy saving method for real-time operating system
CN104750556A (en) * 2015-04-14 2015-07-01 浪潮电子信息产业股份有限公司 Method and device for dispatching HPC (high performance computing) cluster work
WO2016165467A1 (en) * 2015-09-16 2016-10-20 中兴通讯股份有限公司 Traffic flow-based task scheduling method and apparatus
CN106547611A (en) * 2015-09-16 2017-03-29 中兴通讯股份有限公司 Method for scheduling task and device based on Business Stream
CN107291542A (en) * 2017-06-27 2017-10-24 北京优特捷信息技术有限公司 A kind of intelligence performs the method and device of retrieval tasks
CN107291542B (en) * 2017-06-27 2020-09-15 北京优特捷信息技术有限公司 Method and device for intelligently executing retrieval task
CN109408208A (en) * 2018-09-21 2019-03-01 深圳华大北斗科技有限公司 Multi-task processing method, equipment, system and the storage medium of navigation chip
CN109408208B (en) * 2018-09-21 2022-04-01 深圳华大北斗科技股份有限公司 Multitasking method, device and system of navigation chip and storage medium
CN118025049A (en) * 2024-04-15 2024-05-14 成都创科升电子科技有限责任公司 Control method and system for vehicle electric control based on scheduler and vehicle

Similar Documents

Publication Publication Date Title
US9632822B2 (en) Multi-core device and multi-thread scheduling method thereof
CN104156264B (en) A kind of base band signal process tasks in parallel real-time scheduling method based on many GPU
US8423799B2 (en) Managing accelerators of a computing environment
US9858115B2 (en) Task scheduling method for dispatching tasks based on computing power of different processor cores in heterogeneous multi-core processor system and related non-transitory computer readable medium
CN104199730B (en) A kind of single thread multi-task processing method based on synchronous i/o multiplexing mechanism
KR20180053359A (en) Efficient scheduling of multi-version tasks
CN105893263B (en) A kind of test assignment dispatching method
CN103309734A (en) Embedded task scheduling method based on priority grouping
CN101887383B (en) Process real-time scheduling method
CN104199739B (en) A kind of speculating type Hadoop dispatching methods based on load balancing
US20150121387A1 (en) Task scheduling method for dispatching tasks based on computing power of different processor cores in heterogeneous multi-core system and related non-transitory computer readable medium
CN102043667A (en) Task scheduling method for embedded operating system
CN104536827A (en) A data scheduling method and device
CN101339521A (en) A Dynamic Scheduling Algorithm of Task Priority
CN102541642B (en) Task management method for enhancing real-time performance
CN103488536B (en) Method for scheduling task, device and operating system
CN113495780A (en) Task scheduling method and device, storage medium and electronic equipment
TW201541347A (en) Multiprocessors systems and processes scheduling methods thereof
CN103677997B (en) Multi-core device and multi-thread scheduling method thereof
KR100959548B1 (en) Interrupt Scheduling Method
TW202101211A (en) A system and a method for handling an interrupt
CN103914346A (en) Group-based dual-priority task scheduling and energy saving method for real-time operating system
CN101968749A (en) Method for receiving message passing interface (MPI) information under circumstance of over-allocation of virtual machine
KR101725408B1 (en) Tasks scheduling method for realtime operating system
CN111597044A (en) Task scheduling method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130918