Patent ID: 8245234

Claim:
A method comprising: receiving at time t i at a queue for execution on a processor a first task T 1 , wherein the first task T 1 has a first estimated execution time Δ i , and a first preferred wait time Γ i , and wherein the queue comprises at least one other task with a position j and an estimated execution time Δ j ; receiving at time t 2 at the queue for execution on the processor a second task T 2 for execution on the processor, wherein time t i is before time t 2 , and wherein the second task T 2 has a second estimated execution time Δ m and a second preferred wait time Γ 2 ; inserting the first task T 1 into the queue at a position k, wherein j≦k, such that: Γ i ≥ Δ m + ∑ j = 1 k - 1 ⁢ Δ j and Γ i < Δ m + ∑ j = 1 k ⁢ Δ j ; and executing the second task T 2 on the processor before executing the first task T 1 when Γ 2 <Δ i , wherein j=1 represents the position at the head of the queue.