Patent ID: 9639396
Date: 2017-05-02
CPC Classifications: G06F

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, 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.