Multi-tasking method according to simple priority inheritance scheme and embedded system therefor
First Claim
1. A multi-tasking method of executing a plurality of tasks according to a priority of each of the plurality of tasks, the multi-tasking method comprising:
- determining, by at least one processor, whether a resource that is to be used by a first task of the plurality of tasks is being used by a second task, wherein the first task is a task having the highest priority from among tasks which are ready to be executed by a Central Processing Unit (CPU);
comparing, by at least one processor, the priority of the first task and the priority of the second task according to the determination result and determining that the priority of the first task is higher than the priority of the second task; and
increasing, by at least one processor, the priority of the second task to a highest priority of all of the priorities of all tasks which are trying to occupy the CPU, according to the comparison result,wherein the all tasks include the tasks which are ready to be executed by the CPU and tasks which are not ready to be executed by the CPU.
1 Assignment
0 Petitions
Accused Products
Abstract
A multi-tasking method performs a plurality of tasks according to priority of each of the plurality of tasks. It is determined whether a resource that is to be used by a current task is being used by another task, a priority of the current task is compared to a priority of the task that is using the resource according to a result of the determination, and according to a result of the comparison, the priority of the task that is using the resource is increased to a highest priority of priorities of all tasks trying to occupy a CPU. Accordingly, conventional problems in the BPI and IIP schemes can be solved.
-
Citations
9 Claims
-
1. A multi-tasking method of executing a plurality of tasks according to a priority of each of the plurality of tasks, the multi-tasking method comprising:
-
determining, by at least one processor, whether a resource that is to be used by a first task of the plurality of tasks is being used by a second task, wherein the first task is a task having the highest priority from among tasks which are ready to be executed by a Central Processing Unit (CPU); comparing, by at least one processor, the priority of the first task and the priority of the second task according to the determination result and determining that the priority of the first task is higher than the priority of the second task; and increasing, by at least one processor, the priority of the second task to a highest priority of all of the priorities of all tasks which are trying to occupy the CPU, according to the comparison result, wherein the all tasks include the tasks which are ready to be executed by the CPU and tasks which are not ready to be executed by the CPU. - View Dependent Claims (2, 3, 4)
-
-
5. A non-transitory computer-readable storage medium storing a computer-readable program to cause a processor to execute a multi-tasking method of executing a plurality of tasks according to a priority of each of the plurality of tasks, the multi-tasking method comprising:
-
determining whether a resource that is to be used by a first task of the plurality of tasks is being used by a second task, wherein the first task is a task haying the highest priority from among tasks which are ready to be executed by a Central Processing Unit (CPU); comparing the priority of the first task and the priority of the second task according to the determination result and determining that the priority of the first task is higher than the priority of the second task; and increasing the priority of the second task to a highest priority of all of the priorities of tasks which are trying to occupy the CPU, according to the comparison result, wherein the all tasks include the tasks which are ready to be executed by the CPU and tasks which are not ready to be executed by the CPU.
-
-
6. An embedded system to execute a plurality of tasks according to a priority of each of the plurality of tasks, a Central Processing Unit (CPU) of the embedded system comprising:
-
a task processing unit determining whether a resource that is to be used by a first task of the plurality of tasks is being used by a second task, wherein the first task is a task having the highest priority from among tasks which are ready to be executed by the CPU; and a priority processing unit comparing the priority of the first task and the priority of the second task according to the determination result and determining that the priority of the first task is higher than the priority of the second task and increasing the priority of the second task to a highest priority of all of the priorities of all tasks which are trying to occupy the CPU, according to the comparison result, wherein the all tasks include the tasks which are ready to be executed by the CPU and tasks which are not ready to be executed by the CPU. - View Dependent Claims (7, 8, 9)
-
Specification