Patent ID: 8352946

Claim:
A method for managing tasks in a computer system having a plurality of central processing units (CPUs), comprising: associating, by the system, a migration readiness queue with each of the plurality of CPUs, the migration readiness queue having a front-end and a back-end; determining, by the system, a readiness of a task that is to be executed on a particular CPU based on an amount of memory to be referenced by the task, the particular CPU being one of the plurality of CPUs; placing, by the system, the task in the migration readiness queue of the particular CPU based on a status indicating migration ready, the status being signaled to a CPU scheduler by the task; when the task has the status of migration ready, being determined prior to a current execution time slice, and the task is preempted from execution during the current execution time slice, then placing, by the system, the task at the front-end of the migration readiness queue; when the task has the status of not migration ready, being determined prior to a current execution time slice, and the task is preempted from execution during the current execution time slice, then placing, by the system, the task at the back-end of the migration readiness queue; and selecting, by the system, at least one task from the front-end of the migration readiness queue associated with the particular CPU for migration, when the particular CPU receives a task migration command.