Patent ID: 7716668
Filing Date: 2010-05-11
Classification: G06F

Abstract:
1. A method for scheduling thread execution, comprising: maintaining a circular array structure having a plurality of time slots therein, wherein each of the plurality of time slots corresponds to a timeslice during which CPU resources are allocated to a particular thread; configuring each time slot in the circular array to include a queue of threads scheduled for execution during that time slot; maintaining a pointer index for referencing one time slot in the circular array and whereby advancement through the circular array is provided by advancing the pointer index; maintaining an array of threads requesting immediate CPU resource allocation based on the queue of threads; calculating a next time slot during which a currently executing thread should next resume execution; appending the currently executing thread to the queue of threads scheduled for execution at the calculated time slot; identifying a next sequential non-empty time slot containing a queue of threads scheduled for execution during that time slot; updating the pointer index to point to the identified next sequential non-empty time slot; appending any contents of the indexed time slot to the array of threads requesting immediate CPU resource allocation; removing the thread at a top of the array of threads requesting immediate CPU resource allocation; determining whether the thread at the top of the array of threads requesting immediate CPU resource allocation is identical to the currently executing thread; maintaining execution of the currently executing thread for the following time slot if it is determined that the thread at the top of the array of threads requesting immediate CPU resource allocation is identical to the currently executing thread; suspending the currently executing thread; and activating the thread at the top of the array of threads requesting immediate CPU resource allocation if it is determined that the thread at the top of the array of threads requesting immediate CPU resource allocation is not identical to the currently executing thread.