An operating system
usually segregates the available system memory into kernel space
and user space
. The kernel space is strictly reserved for running the kernel
, device drivers and any kernel extensions. This kernel space is usually never swapped out to the disk. On the other hand user space is the memory area used by all user mode applications and this memory can be swapped(paged) out at any time depending upon the current system requirement.
A user application cannot access the kernel space directly and similarly an kernel code cannot access the user space without checking whether the page is present in memory or swapped out.