← IGCSE Computer Science Paper 1

OS function: managing memory

The OS decides which part of RAM each running program uses, keeps programs from overwriting each other's memory, and frees the space when a program closes.

Understanding OS function: managing memory in IGCSE Computer Science Paper 1

What it does: The check stops a program from accessing addresses outside its own block, so other programs' memory is protected. The OS allocates RAM to every running program so that several programs can run at once. Managing memory is one of the functions of the operating system. A keyboard is an input device and does not manage RAM. RAM has a fixed size. When it is full, the computer may slow down or be unable to start new programs until space is freed. Choosing which part of RAM a program uses is memory management. Scanning for viruses is done by antivirus utility software.

Common mistakes: The OS keeps each program's memory separate, so the game can only use the block it was given. It must not write to any block. The line should read: game uses only its own block. The OS allocates RAM to running programs, not ROM. ROM is read-only and holds firmware, so the line should say RAM.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 373–389) and word search (Modules 356–389).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which part of the computer does the OS decide how to share between running programs when it manages memory?
RAMROM
Matches
Two programs are both given RAM addresses 100 to 200 and can overwrite each other's data
↓
The OS has not kept the programs' memory separate. Each program must get its own block so they do not overlap.
Applying
Meanings
Term
memory management
Meaning
The OS decides which part of RAM each running program uses, keeps programs from overwriting each other's memory, and frees the space when a program closes.
Practice
IF program opens THEN
Testing
Gaps
block ← (browser)
Check Answer
Spots
3OS gives game its own block
4game can write to any block

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Flamingo' badge — Balanced Coder, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which part of the computer does the OS decide how to share between running programs when it manages memory?
A. ROM
B. RAM ✓
Memory management is about RAM. The OS decides which part of RAM each running program can use. ROM holds firmware and is not shared out between programs.
2. A student opens a web browser and a music player at the same time. What does the OS do with RAM?
A. Allocates a separate part of RAM to each program ✓
B. Gives all of the RAM to the browser only
The OS allocates RAM to every running program so that several programs can run at once.
3. Why does the OS keep each program's memory separate?
A. So one program cannot overwrite another program's data ✓
B. So programs can edit each other's data more easily
Separate memory areas protect each program. If programs could overwrite each other's memory, data could be lost or a program could crash.
4. A student closes a game. What should the OS do with the RAM the game was using?
A. Keep it reserved for the game forever
B. Free it so other programs can use it ✓
When a program closes, the OS frees its space in RAM so that the space can be reused by other programs.
5. Which statement is true about memory management?
A. It is a function of the operating system ✓
B. It is done by the keyboard
Managing memory is one of the functions of the operating system. A keyboard is an input device and does not manage RAM.

Match the Pairs

memory management → The OS decides which part of RAM each running program uses, keeps programs apart and frees the space when a program closes
allocate(browser, 512MB) → The OS gives the browser its own block of RAM to use while it runs
The OS keeps each program's memory separate so one program cannot overwrite another program's data → IF address NOT IN program.block THEN DENY
When a program closes, the OS frees its RAM so other programs can use the space → ON program.close: free(program.block)
Two programs are both given RAM addresses 100 to 200 and can overwrite each other's data → The OS has not kept the programs' memory separate. Each program must get its own block so they do not overlap.
A game is closed but the OS keeps its RAM reserved, so free RAM slowly runs out → The OS has not freed the memory when the program ended. It should release the RAM so it can be reused.

Key Term

memory management
The OS decides which part of RAM each running program uses, keeps programs from overwriting each other's memory, and frees the space when a program closes.

Fill in the Blanks

1. block ← allocate(browser)
Hint: Type the memory management action that gives a program its own part of RAM.
2. IF closed = TRUE THEN free(block)
Hint: Type the action the OS performs to release a program's memory once it closes.
3. IF address < start OR address > end THEN DENY()
Hint: Type the logical keyword that makes this true when the address is outside the program's own block of memory.
4. IF freeRam < size THEN WAIT()
Hint: Type the comparison operator that checks if the free RAM is smaller than what the program needs.
5. block ← allocate(editor) RUN(editor, block) free(block)
Hint: Type the variable that holds the memory the OS must release at the end.

Spot the Error

Question 1
A PROGRAM game STARTS
B OS finds free space in RAM
C OS gives game its own block
D game can write to any block
Line D — The OS keeps each program's memory separate, so the game can only use the block it was given. It must not write to any block. The line should read: game uses only its own block.
Question 2
A user opens a web browser
B OS allocates ROM to browser
C browser is given its own area
Line B — The OS allocates RAM to running programs, not ROM. ROM is read-only and holds firmware, so the line should say RAM.
Question 3
A IF program starts THEN
B OS frees its RAM space
C ELSE keep the RAM reserved
D ENDIF
Line A — The OS frees RAM when a program closes, not when it starts. The condition should be: IF program closes THEN.
Question 4
A A and B are both running
B OS gives each the same block
C A cannot overwrite B's data
Line B — If two programs shared one block, they could overwrite each other's data. The OS must give each program its own separate block.
Question 5
A RAM is full
B user opens one more program
C OS gives it unlimited RAM
D computer slows or shows error
Line C — RAM is limited and cannot grow by itself. When it is full the OS cannot allocate enough RAM, so the computer slows down or reports an error. The line should be: OS cannot give it enough RAM.

Student with a class code? Join your class →