Learning path

Full curriculum

Full curriculum

Unit content

User mode, kernel mode and system calls

Modern operating systems separate ordinary application execution from privileged kernel execution.

Privilege levels

A program normally runs in user mode, where the processor restricts operations that could compromise the system, such as directly reconfiguring memory protection or controlling hardware devices.

The operating-system kernel runs in kernel mode, where privileged instructions and kernel memory are accessible. The processor tracks this execution privilege in hardware state; software cannot gain kernel privilege by ordinary assignment or branching.

A user account with administrative permissions is not the same concept as CPU kernel mode.

System calls

Applications still need services that only the kernel can provide. A system call is a controlled transition into a predefined kernel entry point.

user program
    ↓ system call
kernel validates and performs service
    ↓ return
user program

Exceptions and interrupts

An exception originates from the current instruction stream, such as an invalid operation or page fault. An interrupt is typically raised asynchronously by hardware.

Their causes differ, but both can transfer execution through controlled privileged entry mechanisms.

The user/kernel boundary lets applications share hardware and kernel services without receiving unrestricted authority over the machine.