摘要 |
A method and apparatus for enabling a processor to perform a save and restore on a context switch incrementally and on demand. In one embodiment, when OS switches to a new process, the processor saves only those registers that have been modified in the current process. The processor may not bring in these registers for the new process, rather, the processor will load them on demand. If instructions from the new process do not locate their source operand in the register file, it will initiate a miss handling flow for the register and restore the register value in the register file. Then the pipeline will reissue the instruction that missed in the register file.
|