Modern operating system uses virtual memory to provide separate address spaces or separate regions of a single address space.
kernel space
and user space
.Linux
, macos
, windows
all utilizes kernel space
These separations provide memory protection and hardware protection from malicious or errant software behavior.
kernel space
is strictly reserved for running a privileged operating system kernel, kernel extensions, and most device drivers.
user space
is the memory area where application software and some drivers execute.
All code that runs outside the operating system's kernel.