AlgoPlus//structures / system-calls
Read the theory

System Calls & Services

The guarded door from user mode into the kernel — a read() call, end to end.

CPU mode
USER (0)
Step
1/1
Legend
User space
Kernel space
Active stage
AI Tutor Workspace
In a nutshell
A system call is how a program asks the operating system to do something it isn't allowed to do itself, like read a file from disk. A special trap instruction flips the CPU from restricted user mode into privileged kernel mode, the right handler does the protected work, and then control returns to the program. That controlled doorway is exactly what stops ordinary code from touching hardware directly.
Ready
Press play to begin the cinematic walkthrough.
A system call is the guarded door into the kernel: a trap instruction flips the CPU to privileged mode, a handler does the work, then control returns to user mode. That boundary is what keeps user code from touching hardware directly.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for System Calls & Services.