With all due respect ... "Google it," and instantly read the last umpty-leven times this very same question has been answered.
Changing the CR3 value is expensive, and from the point of view of running kernel-code, completely unnecessary. Changing this register causes the CPU to flush a lot of caches that it'd rather not flush if it doesn't have to, and there's no reason to do it (and every reason not to ...) until a different user-land process is actually selected. The system might ping-pong between user mode and kernel mode dozens of times before deciding to switch to a different virtual-memory context.
Last edited by sundialsvcs; 10-30-2011 at 11:14 PM.
|