Patent ID: 7916146

Claim:
A method of processing a context switch from a first context to a second context in a processing pipeline including one or more processing units and an interface unit between a first processing unit and a second processing unit, comprising the steps of: halting processing of the second processing unit included in of the processing pipeline when switching from the first context to the second context; determining that the processing pipeline is operating in a spill mode, wherein, when in the spill mode, data transmitted to the second processing unit from other processing units included in the processing pipeline is redirected to a buffer memory only when the second processing unit is halted; determining that the first processing unit included in the processing pipeline is not idle; receiving tokens via a bus connected to an interface unit associated with the second unit, each token indicating an amount of memory space available in a buffer memory when the token is transmitted; examining a first token to determine an amount of the data to be transmitted to the second processing unit by the first processing unit that can be redirected to the buffer memory based on the memory space available in the buffer memory; redirecting the amount of the data to the buffer memory; and storing the amount of the data stored in the buffer memory in a first portion of an external memory reserved for the first context.