Speeding Address Space Switching by Pre-Touching Critical Data
Original Publication Date: 2004-Nov-19
Included in the Prior Art Database: 2004-Nov-19
Pre-loading critical data can improve the performance of operating system address space switches.
Speeding Address Space Switching by Pre -Touching Critical Data
A near universal feature of modern multi-tasking computer operating systems is that each process running on the operating system is given a unique view of the system's memory. In order to provide this unique view, an operating system must perform a number of time critical operations during the period of time known as a context switch. A context switch can be described as the procedure by which the currently running process is stopped, its state saved and the next process' state is restored and it is started. The problem is that a requirement of the context switch is to perform an address space switch (this restores the new processes' unique view of memory) where we must wait for a period of time, in which the CPU can do not other useful work, for data to be loaded from memory. This invention solves this problem by reducing or eliminating the delay.
This is an emerging problem brought about by a number of factors in modern computer design. Among them: An ever increasing gap between CPU speed and memory bus speed, and equally important, the average working set size of applications is also increasing, meaning there is now more state to save with each context switch. Although this procedure is known to be performance critical and generally is carefully designed, there are no known previous attempts to speed it using special hardware features as is done in this approach.
Memory access latencies inherent in loading saved state from system memory can be reduced by pre-loading (touching) critical data structures at some point prior to where they are actually used. It has been discovered that this principle can be applied to speed an operating system's address space switch because the identity of data that will be needed is known long before it will actually be used. With this knowledge, it is possible to use a special instruction provided by the PowerPC* architecture to tell the system to begin loading critical da...