Patent ID: 8356304

Claim:
A method of scheduling logical processor contexts to (P) different jobs in a multithreaded/multicore environment wherein a first predetermined number (N) of logical processor contexts may be carried out in a given context switch interval, said method comprising: determining a software/OS priority for each of said different jobs; defining super-context switch intervals of equal length, each of said super-context switch intervals divided into a predetermined number of context switch intervals of equal length; attributing a desired number of concurrent scheduling time quanta to each of said different jobs utilizing said software/OS priority and each of the super-context switch intervals; attributing each of said first predetermined number (N) of logical processor contexts for each context switch interval to a respective one of said different jobs utilizing one of a first sorting algorithm and a second sorting algorithm, wherein said first sorting algorithm comprises an algorithm to sort said different jobs according to software/OS priorities, and wherein utilization of said first sorting algorithm is a default mode of operation; determining an error value based on a difference between said desired number of concurrent scheduling time quanta per super-context switch interval and an average number of concurrent scheduling time quanta attributed per super-context switch interval to each of said different jobs, wherein said determining the error value comprises, determining the average number of concurrent scheduling time quanta attributed per super-context switch interval to each of said different jobs; determining for each job of said different jobs a difference value between said desired number of concurrent scheduling time quantum per super-context switch interval and said average number of concurrent scheduling time quanta attributed per super-context switch interval to each of said different jobs; and combining the difference values for all jobs to arrive at said error value; determining that the error value exceeds a predefined threshold for the error value; and switching to a sorting algorithm of said first sorting algorithm and said second sorting algorithm other than a presently selected sorting algorithm of said first sorting algorithm and said second sorting algorithm for a subsequent super-context switch interval in response to said determining that the error value exceeds a predefined threshold for the error value.