Did you know that there is a registry key that specifies whether kernel-mode drivers and kernel-mode system code can be paged to disk when not in use? 

 

The key is DisablePagingExecutive (REG_DWORD) located in HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management. 

 

The value 0 (default) means that drivers and system code can be paged to disk as needed.  Value 1 means that drivers and system code must remain in physical memory.  Note: for the change to become effective, you must reboot.

 

Device driver programmers sometimes use this key when debugging device drivers to ‘pin’ the code and data so it is always in memory.  Also, on machines with a lot of memory, this setting can improve performance, but this would depend on the installed applications and their resource utilization.