Disable paging of drivers and kernel core

There is an option to force the kernel core and drivers to stay in RAM (non-pageable) and not swap to the harddisk. When the option is enabled, then it will lock a “large” amount of RAM, that the paging algorithm cannot touch, even if it might be able to make a more optimal use of the RAM.

By default it is possible for the kernel core and the drivers to mark themselves as non-pageable, so it is only in rare situations that one should force all to become non-pageable. If having plenty of RAM available then this option doesn’t make any difference, as it will have no need to page out the kernel core and drivers.

This setting is useful for debugging drivers as it ensures that all kernel code and data is always memory resident. Also on 64 bit Windows by forcing the kernel into RAM, then it will allow proper kernel stack traces.

To force the core into RAM edit this DWORD registry key:

[HKEY_LOCAL_MACHINE \System \CurrentControlSet \Control \Session Manager \Memory Management]
DisablePagingExecutive = 1 (1 = Force to RAM, 0 = Allow to page, Default = 0)

More Info MS KB184419

Note until Win2k SP4 a flaw existed which could cause the system to hang when this registry entry was enabled. More Info MS KB323608

Credits ArsTechnica.com