Patent ID: 8171488

Claim:
A method of managing contexts that execute on a computer system, the method comprising: monitoring a plurality of contexts in a coscheduling grouping, wherein when the plurality of contexts are part of the coscheduling grouping, the plurality of contexts are scheduled concurrently except when temporarily not scheduled concurrently according to a relaxed coscheduling policy; determining a skew metric for the plurality of contexts based on unsynchronized scheduling of the plurality of contexts, wherein the skew metric is determined between the plurality of contexts due to the plurality of contexts being part of the coscheduling grouping; determining a time period during which a number of available physical computer processors to execute the plurality of contexts is less than a number of contexts in the plurality of contexts; and alternately scheduling and descheduling the plurality of contexts during the time period so that at least a first context and a second context are alternatively scheduled on a single available physical computer processor, wherein: the scheduling and descheduling occurs at a frequency such that the first and second contexts progress at comparable rates to bound the skew metric, the time period is a scheduling quantum when the first context and second context are coscheduled, and the first context and the second context are alternately scheduled in scheduling quantums that are smaller than the scheduling quantum of the time period.