A processor runs in user mode or in kernel mode. In user mode, the instructions that drive devices, change the memory map or stop the machine are refused, and only the memory the process was given is reachable. In kernel mode everything is allowed. The kernel of the operating system runs in kernel mode; every other program runs in user mode.
write. The program calls an ordinary library function, which executes the system-call instruction; the processor switches to kernel mode at a fixed entry point, where the kernel checks the descriptor and the buffer before doing the work. The result returns in a register, in user mode.