| CPC G06F 9/4881 (2013.01) [G06F 1/08 (2013.01); G06F 9/485 (2013.01)] | 16 Claims |

|
1. A scheduling method in a real time operating system for a central processing unit (CPU) for running a number of and diverse set of processes, for an Internet of Things network, in a ready queue, the scheduling method, performed in the CPU, for assigning time quantum to each process in the ready queue, comprises:
dividing, by a scheduler having circuitry including program instructions configured for calculating, the ready queue having P processes into two lists, list 1 contains n processes while list 2 contains m processes, where n+m=P;
averaging total execution times of the n and m processes in each list to get Avg1 and Avg2;
generating a first time quantum s based on an average Avg1 and Avg2 of each list;
generating a second time quantum t, different from the first time quantum s, based on the average Avg1 and Avg2 of each list;
comparing total execution time of a candidate process which needs to be assigned to the CPU with each of the time quantum values s and t;
dynamically selecting and assigning, by the scheduler, one of the time quantum s or the time quantum t, based on the comparing, as the assigned time quantum value closest to the total execution time of the candidate process, which is a time period for running the candidate process on the CPU;
running, by the CPU, the candidate process within the assigned time quantum value; and
repeating the scheduling method while processes are in the ready queue.
|