Patent ID: 7448036

Claim:
A method for preempting tasks performed by a processor in a computer system, said method comprising: configuring, by a user of the computer system, a preempt value, and storing the preempt value in a memory accessible by the processor; receiving, from the user, a range of priorities selected from a plurality of possible priorities, wherein the queuing is only performed when the new task priority and the current task priority are each within the range of priorities; and after the configuring: receiving a request from a new task, wherein the new task includes a new task priority; comparing the new task priority to a current task priority, the current task priority corresponding to a current task currently being serviced by the processor; preempting the current task in favor of the new task in response to the new task priority being better than the current task priority by an amount greater than or equal to the preempt value; queuing the new task in response to the new task priority not being better than the current task priority by the preempt value; determining that the new task priority is better than the current task priority but not by the amount that is greater than or equal to the preempt value; queuing the new task in a favorable queue position in response to the determination, wherein the favorable queue position is in front of any queued tasks with worse priorities than the new task.