US 12,277,441 B2
Dynamic scheduler for Internet-of-Things based smart environments
Sardar Zafar Iqbal, Dammam (SA); Hina Gull, Dammam (SA); Saqib Saeed, Dammam (SA); Madeeha Saqib, Dammam (SA); Mohammed Alqahtani, Dammam (SA); Yasser A. Bamarouf, Dammam (SA); Gomathi Krishna, Dammam (SA); and May Issa Aldossary, Dammam (SA)
Assigned to Imam Abdulrahman Bin Faisal University, Dammam (SA)
Filed by Imam Abdulrahman Bin Faisal University, Dammam (SA)
Filed on Dec. 15, 2021, as Appl. No. 17/551,815.
Prior Publication US 2023/0185605 A1, Jun. 15, 2023
Int. Cl. G06F 9/48 (2006.01); G06F 1/08 (2006.01)
CPC G06F 9/4881 (2013.01) [G06F 1/08 (2013.01); G06F 9/485 (2013.01)] 16 Claims
OG exemplary drawing
 
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.