โ† Back to subjects
โญ 0
IB Diploma Computer Science SL ยท Topic 6 โ€” Resource management
Mini-Lesson

Resource management

Topic 6 asks how limited resources โ€” memory, processor time, bandwidth, storage โ€” are shared out. The operating system is the manager: it handles memory, the processor, peripherals and running programs.

Work through each screen, answer the questions as you go (some are wordy, some are calculations) and collect โญ stars. Press Start when you are ready.

Resources

System resources

Key resources a system must manage:

  • Primary memory (RAM) and secondary storage (disk capacity).
  • Processor speed and number of cores.
  • Bandwidth and network connectivity.
  • Cache, screen resolution, sound and graphics processors.

Every resource is finite, so demand can exceed supply and must be scheduled and prioritised.

OS

Role of the operating system

The operating system (OS) manages resources so programs and users can share the machine:

  • Memory management โ€” allocate and protect memory between programs.
  • Processor management โ€” schedule which process runs next.
  • Peripheral / device management โ€” control input and output devices.
  • Security and file management.
Sort it

Who or what handles it?

Tap an item, then the category it belongs to.

๐Ÿงฉ Managed by the OS

๐Ÿ”ง Hardware resource

๐Ÿ“ฆ Dedicated system

Memory

Paging and virtual memory

To run programs larger than physical RAM, the OS uses virtual memory: part of the disk is used as if it were extra RAM. Memory is divided into fixed-size pages that are swapped between RAM and disk as needed (paging).

Too much paging causes thrashing, where the system spends more time swapping than computing, and slows dramatically.

Quick check

Virtual memory

?What is virtual memory?
Scheduling

Scheduling and multitasking

Multitasking lets several processes appear to run at once. The scheduler gives each a slice of CPU time and switches quickly between them. Different scheduling policies (round-robin, priority) balance fairness and responsiveness.

Quick check

Scheduling

?Which OS function decides which process gets the CPU next when many are ready to run?
Interrupts

Interrupts and polling

Devices signal the CPU in two ways:

  • Interrupt โ€” the device sends a signal that makes the CPU pause, save its state and run an interrupt handler. Efficient: the CPU only reacts when needed.
  • Polling โ€” the CPU repeatedly checks each device. Simple, but wastes cycles when nothing has happened.
Quick check

Interrupt vs polling

?Why is using interrupts usually more efficient than polling?
Dedicated

Dedicated systems

A dedicated (embedded) system is built for one task โ€” a smart thermostat, an ATM, a washing-machine controller. It has limited, fixed resources and a specialised OS, so resource management is simpler but tightly constrained.

Calculate

Screen memory

1A 24-bit colour image uses 3 bytes per pixel. How many bytes of memory does a 1920 by 1080 screen need for one full frame?
bytes
Hint: 1920 times 1080 times 3.
Match it

Match the OS job

Tap a description on the left, then the OS function.

Description
OS function
Cache

The memory hierarchy

Memory forms a hierarchy, fastest and smallest first: registers, cache, RAM, then secondary storage. Cache holds recently and frequently used data close to the CPU. A high cache hit rate means most requests are served from fast cache, greatly improving performance.

Quick check

Cache purpose

?Why does a CPU use a small, very fast cache?
Calculate

Screen memory (2)

2How many bytes does one frame of a 640 by 480 screen need at 24-bit colour (3 bytes per pixel)?
bytes
Hint: 640 times 480 times 3.
Recap

The big ideas to know

Resources: memory, processor, bandwidth, storage, cache, GPU

OS roles: manage memory, processor, peripherals, security

Virtual memory: disk used as extra RAM, divided into pages

Scheduling: shares the CPU for multitasking

Interrupts vs polling: react on demand vs constantly check

Dedicated systems: one task, fixed limited resources

You have covered the whole of Topic 6 โ€” resource management. Press Finish to see your score.

๐Ÿ†

Mini-lesson complete!

โญโญโญ

You have worked through Resource management. ๐ŸŽ‰

Your stars: 0 / 0

Next: test yourself in the Evaluate stage Confidence Quiz, then lock it in with Verify.

๐Ÿ“ฃ Smashed it? Share your score

Challenge a mate to beat your stars, or show a parent how you got on.

โ†’ Back to all subjects