---
title: "Programs and the Operating System"
book: "Primary & Middle School Computer Science"
subject: computer-science
language: en
chapter: 9
exercises: 10
source: https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system
license: CC-BY-NC-SA-4.0
credit: "One Computer Science Book, One Course (one-course.com)"
---

# Chapter 9 — Programs and the Operating System

Lina wants to play on her tablet, but its screen shows only a bar that fills slowly, and the word “updating”. She cannot do anything but wait, so she picks up a book. What is being changed inside the tablet? Who decided to change it? And what is the tablet doing during all that time?

![Waiting for an update to finish.](https://one-course.com/images/onecourse/chapters/computer-science-1/g4-programs-and-operating-system/img-ed79df69aa22.jpg)

*Waiting for an [update](#def-g4-programs-and-operating-system-install) to finish.*

**You already know.**

The [processor](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-processor) carries out [instructions](https://one-course.com/books/computer-science/1/en/chapter/2-instructions-in-order#def-g1-instructions-in-order-instruction); the [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory) holds the work in progress; the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage) keeps [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) (Chapters [6](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#ch-g3-inside-the-computer) and [7](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#ch-g3-files-and-folders)). Each piece of work is opened in a window ([Chapter 4](https://one-course.com/books/computer-science/1/en/chapter/4-using-a-computer#ch-g2-using-a-computer)).

## 9.1 A program is a list of instructions

**Definition 9.1 (Program).**

A *program* is a list of [instructions](https://one-course.com/books/computer-science/1/en/chapter/2-instructions-in-order#def-g1-instructions-in-order-instruction) for a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer), written by people and kept as a [file](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file). The [processor](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-processor) carries out its [instructions](https://one-course.com/books/computer-science/1/en/chapter/2-instructions-in-order#def-g1-instructions-in-order-instruction) one after another.

A [program](#def-g4-programs-and-operating-system-program) is kept in the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage), like any other [file](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file). To run it, the [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) copies it into the [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory), because the [processor](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-processor) reads its [instructions](https://one-course.com/books/computer-science/1/en/chapter/2-instructions-in-order#def-g1-instructions-in-order-instruction) from the [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory), where they can be reached quickly. A game, a [text editor](https://one-course.com/books/computer-science/1/en/chapter/4-using-a-computer#def-g2-using-a-computer-word-processor) and a drawing tool are all [programs](#def-g4-programs-and-operating-system-program). A photo or a story is not a [program](#def-g4-programs-and-operating-system-program): it is not a list of [instructions](https://one-course.com/books/computer-science/1/en/chapter/2-instructions-in-order#def-g1-instructions-in-order-instruction), it is information that a [program](#def-g4-programs-and-operating-system-program) works on.

## 9.2 Applications

**Definition 9.2 (Application).**

An *application* is a [program](#def-g4-programs-and-operating-system-program) made for one task of its user: drawing, writing, playing a game, listening to music, visiting web pages.

One [application](#def-g4-programs-and-operating-system-application) can be opened in several windows at once: two stories in two windows of the same [word processor](https://one-course.com/books/computer-science/1/en/chapter/4-using-a-computer#def-g2-using-a-computer-word-processor), for example. Several [applications](#def-g4-programs-and-operating-system-application) can also run at the same time: music plays while you write.

## 9.3 The operating system

When Lina saves a drawing, the drawing [application](#def-g4-programs-and-operating-system-application) does not drive the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage) itself. It asks another [program](#def-g4-programs-and-operating-system-program) to do it.

**Definition 9.3 (Operating system).**

The *operating system* is the [program](#def-g4-programs-and-operating-system-program) that starts first when a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) is switched on and runs all the others. It looks after the [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file), shares the [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory) and the [processor](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-processor) between the [programs](#def-g4-programs-and-operating-system-program), drives the [devices](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device), and keeps the users apart.

![The layers of a computer. A request goes down, one layer at a time, and the answer comes back up. The user talks to the applications, the applications ask the operating system, and only the operating system drives the hardware.](https://one-course.com/images/onecourse/chapters/computer-science-1/g4-programs-and-operating-system/fig-8898e4ff5852.svg)

*The layers of a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer). A request goes down, one layer at a time, and the answer comes back up. The user talks to the [applications](#def-g4-programs-and-operating-system-application), the [applications](#def-g4-programs-and-operating-system-application) ask the [operating system](#def-g4-programs-and-operating-system-os), and only the [operating system](#def-g4-programs-and-operating-system-os) drives the hardware.*

![The four things an operating system looks after.](https://one-course.com/images/onecourse/chapters/computer-science-1/g4-programs-and-operating-system/fig-f82f26165741.svg)

*The four things an [operating system](#def-g4-programs-and-operating-system-os) looks after.*

A [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) used by several people keeps their work apart.

**Definition 9.4 (User account).**

A *user account* is the place an [operating system](#def-g4-programs-and-operating-system-os) keeps for one person: a name, a password, the person’s own [folders](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-folder) and settings. The [operating system](#def-g4-programs-and-operating-system-os) lets each person open only their own account.

**Facts as of 2026.**

The main families of [operating systems](#def-g4-programs-and-operating-system-os) in 2026: Windows, macOS, Linux and ChromeOS on desktop [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) and laptops; Android, iOS and iPadOS on phones and tablets. Each family keeps changing: the makers bring out new versions and send [updates](#def-g4-programs-and-operating-system-install).

## 9.4 Starting up

**Definition 9.5 (Start-up).**

The *start-up* of a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) is what happens between pressing the power button and the moment the [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) is ready to use: a small [program](#def-g4-programs-and-operating-system-program) kept on the [motherboard](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-motherboard) checks the parts and starts the [operating system](#def-g4-programs-and-operating-system-os) from the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage).

![The start-up of a computer, step by step. It takes a few seconds.](https://one-course.com/images/onecourse/chapters/computer-science-1/g4-programs-and-operating-system/fig-2322bdfeeb3c.svg)

*The [start-up](#def-g4-programs-and-operating-system-startup) of a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer), step by step. It takes a few seconds.*

## 9.5 Installing and updating

**Definition 9.6 (Installing and updating).**

To *install* a [program](#def-g4-programs-and-operating-system-program) is to copy its [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) into the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage) of a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) and to tell the [operating system](#def-g4-programs-and-operating-system-os) about it, so that it can be started. To *update* a [program](#def-g4-programs-and-operating-system-program) is to replace some of its [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) by newer ones.

[Programs](#def-g4-programs-and-operating-system-program) are written by people, and people make mistakes. Some mistakes make a [program](#def-g4-programs-and-operating-system-program) stop or give wrong results; others leave a hole that a stranger could use to get into the [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer). When the makers find a mistake, they send an [update](#def-g4-programs-and-operating-system-install) that fixes it. This is what Lina’s tablet was doing: its [operating system](#def-g4-programs-and-operating-system-os) was replacing some of its own [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) by better ones, and the tablet could not be used while those [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) were being changed.

**Safe use.**

Accept the [updates](#def-g4-programs-and-operating-system-install) of your [operating system](#def-g4-programs-and-operating-system-os) and your [applications](#def-g4-programs-and-operating-system-application): many of them close holes that strangers could use. [Install](#def-g4-programs-and-operating-system-install) [programs](#def-g4-programs-and-operating-system-program) only from the places your [device](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device) or your school trusts, never from a message or a website that offers one out of nowhere.

## 9.6 Exercises

**Exercise 9.1 ★.**

Is it a [program](#def-g4-programs-and-operating-system-program)? A recipe card, a game, a photo, a [text editor](https://one-course.com/books/computer-science/1/en/chapter/4-using-a-computer#def-g2-using-a-computer-word-processor).

**Solution of Exercise 9.1.**

A recipe card: no, its [instructions](https://one-course.com/books/computer-science/1/en/chapter/2-instructions-in-order#def-g1-instructions-in-order-instruction) are for a cook, not for a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer). A game: yes. A photo: no, it is information, not [instructions](https://one-course.com/books/computer-science/1/en/chapter/2-instructions-in-order#def-g1-instructions-in-order-instruction). A [text editor](https://one-course.com/books/computer-science/1/en/chapter/4-using-a-computer#def-g2-using-a-computer-word-processor): yes.

**Exercise 9.2 ★.**

Give three things the [operating system](#def-g4-programs-and-operating-system-os) looks after.

**Solution of Exercise 9.2.**

Three of: the [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file); the [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory) and the [processor](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-processor), shared between the [programs](#def-g4-programs-and-operating-system-program); the [devices](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device); the users and their accounts.

**Exercise 9.3 ★.**

Where is a [program](#def-g4-programs-and-operating-system-program) kept when the [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) is switched off?

**Solution of Exercise 9.3.**

In the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage), as a [file](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file).

**Exercise 9.4 ★.**

Put the steps of a [start-up](#def-g4-programs-and-operating-system-startup) in order: (a) the [operating system](#def-g4-programs-and-operating-system-os) is copied into [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory); (b) the power button is pressed; (c) the login screen appears; (d) a small [program](#def-g4-programs-and-operating-system-program) on the [motherboard](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-motherboard) checks the parts; (e) the [operating system](#def-g4-programs-and-operating-system-os) is found in the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage).

**Solution of Exercise 9.4.**

(b), (d), (e), (a), (c).

**Exercise 9.5 ★.**

Give two reasons to accept [updates](#def-g4-programs-and-operating-system-install).

**Solution of Exercise 9.5.**

[Updates](#def-g4-programs-and-operating-system-install) fix mistakes that make [programs](#def-g4-programs-and-operating-system-program) stop or give wrong results, and they close holes that strangers could use to get into the [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer).

**Exercise 9.6 ★.**

Follow the drawing of the layers for “print this page”: what does each layer ask the one below?

**Solution of Exercise 9.6.**

The user asks the [application](#def-g4-programs-and-operating-system-application) to print the page; the [application](#def-g4-programs-and-operating-system-application) asks the [operating system](#def-g4-programs-and-operating-system-os) to send the page to the printer; the [operating system](#def-g4-programs-and-operating-system-os) drives the printer (a [device](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device)). The answer “printed” comes back up the same way.

**Exercise 9.7 ★.**

[Application](#def-g4-programs-and-operating-system-application) or [operating system](#def-g4-programs-and-operating-system-os)? (a) Drawing a cat. (b) Sharing the [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory) between two [programs](#def-g4-programs-and-operating-system-program). (c) Checking the spelling of a story. (d) Showing the login screen. (e) Sending [bytes](https://one-course.com/books/computer-science/1/en/chapter/8-memory-and-storage#def-g4-memory-and-storage-byte) to the printer.

**Solution of Exercise 9.7.**

(a) [Application](#def-g4-programs-and-operating-system-application). (b) [Operating system](#def-g4-programs-and-operating-system-os). (c) [Application](#def-g4-programs-and-operating-system-application). (d) [Operating system](#def-g4-programs-and-operating-system-os). (e) [Operating system](#def-g4-programs-and-operating-system-os).

**Exercise 9.8 ★★.**

Lina and her brother use the same [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer), each with a [user account](#def-g4-programs-and-operating-system-account). What does the [operating system](#def-g4-programs-and-operating-system-os) keep apart? Why is that useful?

**Solution of Exercise 9.8.**

Each one’s [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) and [folders](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-folder), settings and password. Each sees only their own work, cannot delete the other’s by mistake, and keeps their own things private.

**Exercise 9.9 ★★.**

Why is a [program](#def-g4-programs-and-operating-system-program) copied from the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage) into the [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory) before it runs?

**Solution of Exercise 9.9.**

The [processor](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-processor) reads its [instructions](https://one-course.com/books/computer-science/1/en/chapter/2-instructions-in-order#def-g1-instructions-in-order-instruction) from the [memory](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-memory), which is much faster than the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage); the [storage](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-storage) only keeps the [program](#def-g4-programs-and-operating-system-program) while it is not running.

**Exercise 9.10 ★★.**

While Tom visits a website, a window appears: “Your [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) is slow! Download this [update](#def-g4-programs-and-operating-system-install) now.” What should he do, and why?

**Solution of Exercise 9.10.**

Close the window without downloading anything, and tell an adult. Real [updates](#def-g4-programs-and-operating-system-install) come from the [operating system](#def-g4-programs-and-operating-system-os) or from the places the [device](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device) trusts, not from a window that appears on a website; such a window may try to [install](#def-g4-programs-and-operating-system-install) a harmful [program](#def-g4-programs-and-operating-system-program).
