Patent ID: 8166486

Claim:
A method comprising: creating a scheduling policy that creates a first workload for a main thread and at least one second workload for at least one non-main thread, the scheduling policy distributing at least one first iteration of a parallelized loop to the workload of the main thread and at least one second iteration of the parallelized loop to the workload of the non-main thread; evaluating a start-up cost of the workload of the non-main thread, wherein evaluating comprises calculating an updated storage metric, the updated storage metric measuring a first time cost incurred by the non-main thread to read at least one global variable that is shared between the non-main thread and the main thread, calculating a storage latency metric, the storage latency metric measuring a second time cost for updating and storing the global variable, and calculating a cold startup overhead metric, the cold startup overhead metric measuring a third time cost for warming at least one cold resource, wherein calculating a cold startup overhead metric comprises identifying at least one load operation likely to miss in the cold resource, and for each at least one load operation computing a first probability of execution for the at least one load operation, and calculating a load warm-up cost for the at least one load operation by multiplying the first probability of execution by a first cache latency, the first cache latency representing a first amount of time to bring data required by the at least one load operation from a memory to the cold resource; and based on the start-up cost, migrating at least a portion of the workload of the non-main thread to the workload of the main thread.