Operating System Examples in CS Thinking

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Operating System.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in CS Thinking.

Concept Recap

System software that manages hardware resources (processor, memory, storage, devices) and provides services for application programs. The operating system acts as the intermediary between the user and the hardware, handling tasks like multitasking, file management, and device communication.

The OS is the manager of your computer โ€” it decides which program gets the processor's attention, handles file storage, and provides the interface you see.

Read the full concept explanation โ†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: The OS abstracts hardware complexity so applications don't need to know the details of every device โ€” they just ask the OS.

Common stuck point: Apps run on top of the OS, not instead of it. Closing all apps doesn't shut down the OS.

Sense of Study hint: When learning about operating systems, focus on their four main jobs: managing the processor (deciding which program runs when), managing memory (giving each program its own space), managing storage (organizing files and folders), and managing devices (talking to printers, keyboards, screens).

Worked Examples

Example 1

easy
What is an operating system and name three things it manages.

Answer

An OS manages hardware resources for applications. It manages: memory allocation, process scheduling, and file systems.

First step

1
Step 1: An operating system (OS) is software that manages computer hardware and provides services for applications. Examples: Windows, macOS, Linux, Android, iOS.

Full solution

  1. 2
    Step 2: It manages: (1) Memory โ€” allocating RAM to programs. (2) Processes โ€” running multiple programs and sharing CPU time. (3) Files โ€” organising data on storage devices with folders and permissions.
  2. 3
    Step 3: The OS acts as an intermediary between applications and hardware. Programs do not interact with hardware directly โ€” they ask the OS, which handles the details.
The operating system is the most important software on a computer. Without it, each application would need to handle hardware details directly, making software development extremely complex.

Example 2

medium
Explain how an operating system allows multiple programs to run at the same time, even on a single-core CPU.

Example 3

medium
A user plugs a USB camera that the OS doesn't recognize. Walk through what the OS needs to do to make it usable.

Example 4

hard
A laptop has 8 GB RAM. A process tries to allocate 20 GB. What does the OS do, and what risk arises?

Example 5

challenge
Argue why a user-mode application should not be able to directly access disk sectors, and what mechanism enforces this.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

medium
Explain why you need device drivers and what happens when you plug in a new printer without the correct driver installed.

Example 2

hard
Explain the concept of user permissions in an operating system. Why does a school network restrict what students can install or access?

Example 3

easy
Which decides which program gets the CPU next: the operating system or the user app?

Example 4

easy
True or false: closing all your apps shuts down the operating system.

Example 5

easy
Name the OS role that organizes files into folders and tracks where they are stored.

Example 6

easy
Does an application talk to a printer directly or through the operating system?

Example 7

easy
Running several programs seemingly at once is which OS feature?

Example 8

easy
True or false: an operating system is a kind of system software.

Example 9

easy
Why should you keep your OS updated? Give the one-word security reason.

Example 10

easy
The OS hides device details so apps just 'ask' for services. What is this principle called?

Example 11

medium
Two programs both want to write to the same file at once. Which OS role prevents conflict?

Example 12

medium
A program needs more RAM than is free. The OS moves some data to disk to free memory. Name this OS technique.

Example 13

medium
Order these from closest to hardware to furthest: user app, operating system, firmware.

Example 14

medium
An app freezes but the rest of the computer keeps working. What OS feature isolates the crash?

Example 15

medium
Which is NOT typically an OS responsibility: (a) memory management, (b) device drivers, (c) editing a photo?

Example 16

medium
On a phone, what software manages the touchscreen, battery, and app switching collectively?

Example 17

medium
When you save a document, the app calls the OS to write to disk. Which component does the OS use to talk to the specific disk?

Example 18

medium
Two users log into one computer with separate files and settings. Which OS feature keeps them separate?

Example 19

medium
A program asks the OS to open a file it lacks permission for. What should the OS do?

Example 20

challenge
Explain why putting more programs on a single-core CPU does not make them all run literally at the same instant, and how the OS creates the illusion.

Example 21

challenge
A user complains the OS update broke a printer. Argue why the fix is usually a driver update, not new hardware.

Example 22

challenge
Why is it safer for apps to request memory from the OS rather than grabbing any RAM address directly?

Example 23

easy
True or false: an operating system manages memory, devices, and files.

Example 24

easy
What kind of software talks to a specific piece of hardware on behalf of the OS?

Example 25

easy
Name two desktop operating systems.

Example 26

easy
Why does the OS keep running after you close all your apps?

Example 27

easy
Which of these is application software, not OS: (a) file explorer kernel module, (b) photo editor?

Example 28

medium
A program asks the OS to read a file. The mechanism by which apps request OS services is a ____.

Example 29

medium
A single-core CPU runs 4 apps 'at once' by time-slicing 1 ms per app. After 100 ms, how many slices has each app received on average?

Example 30

medium
Virtual memory lets a program use more memory than physical RAM by paging data to/from where?

Example 31

medium
Which OS feature prevents one crashing app from corrupting another?

Example 32

medium
User mode vs kernel mode: which one is privileged and can directly access hardware?

Example 33

medium
Two processes want the same printer. The OS uses a ____ to serialize their access.

Example 34

medium
A file system is the part of the OS that does what?

Example 35

medium
A user with limited rights cannot install drivers. What OS principle is being enforced?

Example 36

medium
On a single-core CPU, can true parallelism occur, or only concurrency via time-slicing?

Example 37

medium
What is the name for software loaded into hardware (e.g., your router) that runs before any OS app starts?

Example 38

hard
An OS uses round-robin with 4 processes and a 10 ms quantum. If process B needs 80 ms of CPU, how long until it finishes (assume no I/O, ignore overhead)?

Example 39

hard
Why does the OS, not the application, decide where in physical RAM your data lives?

Example 40

hard
An OS spends 60% of CPU on user processes and 40% on system work in a benchmark. What term describes the 40%?

Example 41

hard
Why is using a hardware feature called the MMU essential to enforcing process isolation?

Example 42

hard
After an OS update, an old printer stops working. Why is updating the driver usually the fix, not buying new hardware?

Example 43

challenge
On a 4-core CPU running 4 CPU-bound processes, is true parallelism possible? How does the OS scheduler differ from the single-core case?

Related Concepts

Background Knowledge

These ideas may be useful before you work through the harder examples.

computing system