Starvation control in a data processing system
First Claim
1. A method within a data processing system, comprising:
- grading each task that enters the data processing system with a priority value and with a lifetime;
populating a main list with tasks in the data processing system that are in a ready-for-scheduling state;
scheduling, for executing on a central processing unit (CPU), a task in the main list that has a highest priority value;
identifying tasks in the main list that are not scheduled for execution on the CPU;
providing a starvation list;
copying into the starvation list tasks in the main list that are not scheduled for execution on the CPU;
executing on the CPU a task in the main list that has a highest priority among the tasks currently in the main list;
removing such task from the main list and from the starvation list;
repeating, a preselected number of times, the executing and the removing;
scheduling, for execution on the CPU, a highest priority task in the starvation list prior to scheduling other tasks that are currently in the main list;
providing a counter;
counting, by the counter, each occasion that any task that is not also in the starvation list is executed on the CPU;
determining whether a current number of occasions that any task not in the starvation list is executed on the CPU is equal to a threshold value, andif so, then schedule for execution on the CPU a highest priority task in the starvation list prior to scheduling for execution on the CPU any other task in the main list, and after completion of the execution on the CPU of the highest priority task in the starvation list, removing such task from the starvation list and from the main list, andif not so, then perform again the steps of executing, removing and counting; and
responsive to determining that there are no tasks in the starvation list and that there is at least one task in the main list, re-copying into the starvation list tasks in the main list that are not scheduled for execution on the CPU.
15 Assignments
0 Petitions
Accused Products
Abstract
A data processing system (100) includes a main list (126) of tasks, main scheduling scheme, a starvation list (128) of tasks, and a secondary scheduling scheme. A method identifies tasks in the main list that are potentially-starving tasks and places the potentially-starving tasks in the starvation list. A starvation monitor (130) controls starvation of tasks in the system by determining when to use the secondary scheduling scheme to schedule, for execution on a CPU (132), a highest priority task in the starvation list prior to scheduling, pursuant to the main scheduling scheme, other tasks in the main list. The starvation monitor determines a number of times that a task in the main list is pre-empted, by other tasks in the main list, from being scheduled for execution on the CPU. A counter (131) is incremented each occasion that any task not in the starvation list is executed on the CPU.
47 Citations
15 Claims
-
1. A method within a data processing system, comprising:
-
grading each task that enters the data processing system with a priority value and with a lifetime; populating a main list with tasks in the data processing system that are in a ready-for-scheduling state; scheduling, for executing on a central processing unit (CPU), a task in the main list that has a highest priority value; identifying tasks in the main list that are not scheduled for execution on the CPU; providing a starvation list; copying into the starvation list tasks in the main list that are not scheduled for execution on the CPU; executing on the CPU a task in the main list that has a highest priority among the tasks currently in the main list; removing such task from the main list and from the starvation list; repeating, a preselected number of times, the executing and the removing; scheduling, for execution on the CPU, a highest priority task in the starvation list prior to scheduling other tasks that are currently in the main list; providing a counter; counting, by the counter, each occasion that any task that is not also in the starvation list is executed on the CPU; determining whether a current number of occasions that any task not in the starvation list is executed on the CPU is equal to a threshold value, and if so, then schedule for execution on the CPU a highest priority task in the starvation list prior to scheduling for execution on the CPU any other task in the main list, and after completion of the execution on the CPU of the highest priority task in the starvation list, removing such task from the starvation list and from the main list, and if not so, then perform again the steps of executing, removing and counting; and responsive to determining that there are no tasks in the starvation list and that there is at least one task in the main list, re-copying into the starvation list tasks in the main list that are not scheduled for execution on the CPU. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method within a data processing system, comprising:
-
assigning priority information to each task that enters the data processing system; providing storage for a main list; populating the main list with tasks which entered the data processing system that are in a ready-for-scheduling state; identifying tasks in the main list that are potentially-starving tasks; providing storage for a starvation list; populating the starvation list with the potentially-starving tasks such that the potentially-starving tasks remain in the main list; scheduling, for executing on a CPU, a task in the main list that currently has a highest priority among tasks currently in the main list; removing such scheduled task from the main list and, if such scheduled task is also in the starvation list, removing such scheduled task from the starvation list after the CPU executes the such scheduled task; selecting a threshold value; counting each occasion that any task that is not also in the starvation list is executed on the CPU; determining whether a current number of occasions that any task not in the starvation list is executed on the CPU is equal to the threshold value, and if so, then schedule for execution on the CPU a highest priority task in the starvation list prior to scheduling for execution on the CPU any other task in the main list, and after completion of the execution on the CPU of the highest priority task in the starvation list, removing such task from the starvation list and from the main list, and if not so, then repeat steps of scheduling, removing and counting; and responsive to determining that there are no tasks in the starvation list and that there is at least one task in the main list, re-populate the starvation list with tasks from the main list. - View Dependent Claims (13, 14, 15)
-
Specification