---
title: "What an Operating System Is: Privilege and System Calls"
description: "An operating system exists because programs cannot be trusted with the hardware directly. The processor runs in two modes, ordinary code cannot touch devices, and a system call is the one controlled d"
canonical: https://lightmysky.com/learn/computing/what-an-operating-system-is-privilege-and-system-calls-mt_0kMavEKxpX
source: https://lightmysky.com/learn/computing/what-an-operating-system-is-privilege-and-system-calls-mt_0kMavEKxpX.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# What an Operating System Is: Privilege and System Calls

An operating system exists because programs cannot be trusted with the hardware directly. The processor runs in two modes, ordinary code cannot touch devices, and a system call is the one controlled doorway from a program into the kernel.

Subject: Computing · Area: Computer Systems · Ages 19 to 20
Page: https://lightmysky.com/learn/computing/what-an-operating-system-is-privilege-and-system-calls-mt_0kMavEKxpX

## Ready when they can

- Trace what happens on a system call, from the trap to the return
- Name three things a program in user mode is not allowed to do
- Explain why a library call and a system call cost different amounts

## Lesson: The kernel doorway every program must use

With many cores running many programs at once, something must stay in charge of the whole machine. The operating system owns the memory, the disk, and every device, and it stands between your apps and the hardware so one buggy program cannot wreck the rest.

**Example.** When your program wants to read a file, it cannot grab the disk itself. It traps into the kernel, the processor switches to kernel mode, the kernel checks the request and fetches the data, then it returns the result and drops back to user mode.

Some actions are privileged, for the kernel only. Touching hardware devices directly, changing shared settings like the system clock, and grabbing memory or time meant for others are all off limits to ordinary code. The layer above the hardware owns these powers, and programs above it only get them by asking.

A library call is a plain jump to code already inside your program, so it is cheap. A system call traps into the kernel and back, which disturbs the processor and costs more. That is also why a fresh machine gets its operating system before anything else.

**Recap.** Programs live in user mode and reach the hardware only through system calls, which trap into the kernel and return.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Many Cores and the Limit on Speedup](https://lightmysky.com/learn/computing/many-cores-and-the-limit-on-speedup-mt_dy3-K9dV19)
- [Instruction Set Architecture as a Contract](https://lightmysky.com/learn/computing/instruction-set-architecture-as-a-contract-mt_pbwHRePY5M)

## Opens up

- [Authentication, Authorisation and Secure Defaults](https://lightmysky.com/learn/computing/authentication-authorisation-and-secure-defaults-mt_ofIiD4Bbpk)
- [Processes, Context Switches and What They Cost](https://lightmysky.com/learn/computing/processes-context-switches-and-what-they-cost-mt_oiOwHKUoXG)
