ICS3U Computer Science • Ontario Grade 11

Revision sheet: computer systems, files and the environment (ICS3U)

This sheet is not a summary of the computer systems chapter of ICS3U, Introduction to Computer Science, Grade 11: you already have your notes.

What the sheet covers

It answers one question only, what makes students lose marks on components, software, files, backups, malware, energy and e-waste, and which precise gesture avoids each loss.

Most of these mistakes give a part, a program or a copy the job of another: the arithmetic is right, the answer is not. Every number on this sheet was computed, and the programs were run in Python 3.

  • 9 mistakes that cost marks
  • 3 figures
  • 15 min reading
Do the chapter's exercises

The thread of the chapter

Each part, program and copy has one job: the CPU computes, RAM holds what is running and forgets it at power off, storage keeps files, a compiler translates once and an interpreter at each run, a backup survives what destroys the original; most lost marks give one of them the job of another.

Topics covered

  • Central processing unit
  • Random access memory
  • Read-only memory
  • Secondary storage
  • Peripheral devices
  • Operating system
  • Source code and machine code
  • Compiler and interpreter
  • Absolute and relative paths
  • Full and incremental backups
  • Malware and system protection
  • Energy consumption and e-waste

The essentials

Who does what inside the computer

  • • The CPU runs the instructions one after another and does the arithmetic; its cache is a small, fast memory that keeps what was used most recently.
  • • RAM holds the programs that are running and their variables, and is erased at power off. Storage, an SSD or a hard drive, keeps the files and installed programs.
  • • ROM keeps the firmware that starts the computer. The motherboard links the parts by its buses; the power supply feeds them.
  • • To run a program, the operating system copies it from storage into RAM. An assignment stores a value in RAM; an arithmetic operation is done in the CPU.
  • • A laptop with 16 GB of RAM and a 1 TB SSD: 16 GB is how much can be open at once, 1 TB how much can be kept.
motherboard and its busesCPUand cacheRAMvolatileROMfirmwareVideo cardStorageSSD, keptInputkeyboardOutputmonitor
Programs and files live in storage and run from RAM: the CPU takes its instructions and data from RAM, not from the SSD, and RAM forgets everything at power off.

Before answering a question on a component, say whether its contents survive power off: that one fact separates RAM and cache from ROM and storage.

Software in three kinds, and its translation

  • • An application does a task for its user; a programming language gives the words and rules to write instructions; an operating system manages the CPU, the RAM and the files for every program.
  • • Source code is what the programmer writes; machine code is the numbers the CPU runs, made for one processor family.
  • • A compiler translates the whole source once into a machine code file, which then runs without the compiler; an interpreter translates and runs the source at each run.
  • • A program run 25 times: 1 translation compiled, 25 translations interpreted, in the textbook model.
  • • An IDE gathers the source code editor, the compiler or interpreter, and the debugger, which runs the program line by line.

Python first turns the source into bytecode, which its interpreter runs; the course treats Python as interpreted and Java and C++ as compiled. The Java compiler checks the whole program and translates it into bytecode, which the Java Virtual Machine then runs, not into machine code.

Energy is a power multiplied by a time

  • • Energy in kWh = power in W × time in h / 1000, and the cost = energy × price per kWh.
  • • A 300 W gaming PC used 3 h a day for 30 days: 300 × 3 × 30 = 27000 Wh = 27 kWh; at a price of 0.10 dollar per kWh, 2.70 dollars.
  • • A device left on counts all its hours: a week has 168 h, and 8:00 to 16:00 on five days is only 40 of them.
  • • In a fleet renewed evenly, the machines retired each year are the fleet divided by the years of use, and their parts replaced count in the e-waste too.

Write the unit after every number of the computation: W, h, Wh, kWh, dollars. A missing / 1000 then shows at once.

The rules in table form

Each row reads from left to right: the assumptions, then the result. A red cell is not an answer, it is the finding that the form settles nothing and the instruction to rewrite it. Every case is followed by a worked example.

Kinds of backup

A folder of 20 GB, a full backup on Sunday, then 1 GB of changes on Monday, 2 GB on Tuesday and 1.5 GB on Wednesday, different files each day. The drive fails on Thursday.

KindWhat it copiesTo restore on Thursday
full the whole folder the last full backup alone

Example: A full backup every night writes 20 GB each time.

incremental the changes since the last backup the full, then every incremental in order: 4 backups

Example: Wednesday's incremental is 1.5 GB; the week from Sunday to Wednesday writes 20 + 1 + 2 + 1.5 = 24.5 GB.

differential the changes since the last full the full, then the last differential: 2 backups

Example: Wednesday's differential is 1 + 2 + 1.5 = 4.5 GB.

copy on the same drive the whole folder, beside the original nothing: it failed with the drive not a backup

Example: Both copies sat on the drive that failed: 0 copies survive.

What to do: Keep the backup on another device, ideally in another place: an external drive in another room, or a cloud service.

Archiving is not backing up: it moves finished files out of the working folder to an archive drive, which must itself be kept safe.

The mistakes that cost marks

These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.

1. A drive that is full

the whole question, and the money of the upgrade

What not to write

“My 1 TB SSD is full, so I will add 16 GB of RAM.”

What to write

“RAM holds what is open, not what is kept: the SSD stays full. Archive old files, delete what is not needed, or add storage.”

Why: Memory and storage are both counted in GB, which is where the confusion starts; RAM is erased at power off, so it cannot keep a file.

2. Choosing an upgrade from the Task Manager

2 to 3 marks on a justification question

What not to write

“CPU 35 %, memory 98 %, disk 90 %: the disk is the problem, buy a faster SSD.”

What to write

“The memory is full, at 98 %: the system moves parts of the open programs to the disk and back, which keeps the disk busy. More RAM is the upgrade.”

Why: The bottleneck is the component near 100 % that causes the others to wait; a busy disk can be a consequence of a full memory, not its cause.

3. A compiled program

1 to 2 marks

What not to write

“My game was compiled, so the compiler must be installed on every computer that runs it.”

What to write

“The compiler translated it once; the machine code file runs alone, on the operating system and processor family it was made for. An interpreted program needs its interpreter at each run.”

Why: Compiling happens once, before the runs; interpreting happens during each run.

4. Resolving a relative path

the answer, and a program that opens the wrong file

What not to write

“From /home/lena/cs/a1/tests, ../main.py is /home/lena/cs/main.py.”

What to write

“.. climbs ONE folder, to a1: ../main.py is /home/lena/cs/a1/main.py. The main.py of a2 is ../../a2/main.py.”

/home/lena/cs/a1/main.pytests/cases.txta2/main.pycurrent folder../main.pyFrom tests, .. climbs ONE folder, to a1
From the current folder tests, .. reaches a1, so ../main.py is the main.py of a1; reaching a2 needs a second .., then a2.

Why: Each .. climbs one folder from where you stand; count the pieces of the path with your finger on the tree.

5. Copying a folder for safety

every hour of work since the project began, when the drive fails

What not to write

“I copy my project into a Backup folder every night, on the same SSD: it is backed up.”

What to write

“A copy on the same drive protects against a file deleted by mistake, not against a failure of the drive. A backup goes to another device, ideally in another place.”

Why: A backup must not share the fate of the original: same drive, same failure.

6. Naming a malware

1 mark per malware, and the wrong counter in a protection plan

What not to write

“A worm needs someone to open an infected attachment before it spreads.”

What to write

“That is a virus, which needs a host that someone runs. A worm spreads by itself through the network, using a flaw: updates close that flaw.”

Why: Each kind of malware has its way in, and a thorough plan closes each one: patches for worms, antivirus scans for viruses, official sources for Trojan horses, macros disabled, a disconnected backup for everything else.

7. Computing the energy of a device

the answer, 1000 times too large, and every cost computed from it

What not to write

“A 250 W printer left on for 8 h uses 250 × 8 = 2000 kWh.”

What to write

“250 × 8 = 2000 Wh = 2 kWh.”

Why: Watts times hours give watt-hours; the price is per kilowatt-hour, so divide by 1000.

8. Restoring incremental backups

every file not changed on Thursday

What not to write

“I restore Thursday's incremental: it is the most recent.”

What to write

“Restore the last full backup, then every incremental after it, in order: each one holds only its day's changes.”

Why: An incremental copies the changes since the last backup of any kind; alone, it is a small part of the folder.

9. The e-waste of a fleet

the answer, three times too large, and the comparison of the two policies

What not to write

“900 laptops of 1.5 kg replaced every 3 years make 900 × 1.5 = 1350 kg of e-waste a year.”

What to write

“Each year 900 / 3 = 300 laptops retire: 300 × 1.5 = 450 kg a year. Kept 5 years: 180 laptops, 270 kg a year.”

Why: The whole fleet retires once over its years of use, not every year; parts replaced to make a laptop last are e-waste too.

Which method to choose

Which component limits the computer?

Read the symptom and the Task Manager, then decide.

  • If files cannot be saved, the drive is near full → storage: archive, delete or add storage; RAM changes nothing

    Example: an SSD of 256 GB with 250 GB used

  • If slow with many programs open, memory near 100 % → RAM: close programs or add memory

    Example: memory 97 %, CPU 30 %

  • If memory full and disk busy → still RAM: the disk works because the memory is full

    Example: memory 98 %, disk 90 %

  • If slow during a long computation, CPU near 100 % → the processor: more cores or a faster one

    Example: a video export at 100 % CPU

  • If images stutter at high resolution, the rest is idle → the video card

    Example: a game at 4K with the CPU at 40 %

An upgrade helps when it targets the component near 100 %: a faster part elsewhere waits as well.

How the answer is expected to be written

A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.

Evaluating a backup plan

When to use it: « A drive fails on Wednesday at 20:00: what is lost, and what must be restored? »

  1. 1 Find the last backup made before the failure, on a device that survived it.
  2. 2 List the backups to restore, in order: the last full, then the incrementals after it, or the last differential.
  3. 3 Count the work done after that backup: that is the work lost.
  4. 4 Compare with the other plan in the same unit, hours of work or GB stored.

Concluding sentence

“The last usable backup is Tuesday's at 21:00; restoring Saturday's full, then Sunday's, Monday's and Tuesday's incrementals loses only Wednesday's work, 1 h.”

The trap: Counting a copy on the failed drive as the last backup.

Marking: A common split: 1 mark for the backups to restore, 1 for their order, 1 for the work lost.

Computing an energy cost

When to use it: « What does the lab cost if it stays on at night? »

  1. 1 Add the power of every device: computer and monitor, times their number.
  2. 2 Count every hour they are on: nights and weekends.
  3. 3 Multiply, then divide by 1000 for kWh.
  4. 4 Multiply by the price per kWh given, and round to the cent at the end.

Concluding sentence

“10 sets of 100 W left on 128 h a week use 10 × 100 × 128 / 1000 = 128 kWh, that is 12.80 dollars at 0.10 dollar per kWh.”

The trap: Forgetting the monitors or the weekend, or the / 1000.

Marking: A common split: 1 mark for the power, 1 for the hours, 1 for the kWh, 1 for the cost with its unit.

Check before you hand in

Five minutes of checking recover more marks than one more problem started in a hurry.

  • The hours of a week

    The hours on and off must add up to 168.

    40 h of class and 128 h off: 40 + 128 = 168.

  • The order of magnitude of a cost

    A cost per week for one room is a few dollars or tens of dollars; thousands mean a missing / 1000.

    A 250 W printer on for 8 h at 0.10 dollar per kWh costs 0.20 dollar, not 200.

  • The restore list starts with a full

    A list of backups to restore that does not begin with a full backup is wrong.

    Saturday's full, then Sunday's, Monday's and Tuesday's incrementals.

  • Count the .. against the tree

    Each .. climbs one folder: put your finger on the current folder and move it once per piece.

    From a1/tests, ../../a2/main.py climbs to a1, then cs, then goes down to a2.

The typical problem, taken apart

Judging a backup plan after a failure

Lena keeps her 35 GB independent-study project on her laptop's SSD. A full backup runs on Saturday at 21:00, then an incremental each evening at 21:00, to an external drive kept in another room. She works from 19:00 to 21:00 every day. The changes are 0.8 GB on Sunday, 2.4 GB on Monday and 1.2 GB on Tuesday, different files each day. The SSD fails on Wednesday at 20:00. Which backups does she restore, how much work is lost, and what would a Saturday full backup alone have lost?

Satfull35 GBSunincr.0.8 GBMonincr.2.4 GBTueincr.1.2 GBWedincr.never madeFailure Wed 20:00: restore Sat, then Sun, Mon, Tue, in that orderLena's backups at 21:00, to a drive kept in another room
Wednesday's backup was never made: the restore stops at Tuesday's incremental, and only the hour from 19:00 to 20:00 on Wednesday is lost.

Step 1

Last backup before Wednesday 20:00: Tuesday's incremental at 21:00, on the external drive, which survived.

Why

Against a failed drive, only a copy on another device counts; Wednesday's backup was due after the failure.

Step 2

Restore Saturday's full, then Sunday's, Monday's and Tuesday's incrementals: 4 backups, 35 + 0.8 + 2.4 + 1.2 = 39.4 GB read from the drive.

Why

Each incremental holds only its day's changes, so the chain starts at the full and keeps its order.

Step 3

Work lost: Wednesday 19:00 to 20:00, that is 1 h.

Why

Everything done before Tuesday 21:00 is in a backup; only what came after it is lost.

Step 4

Saturday full alone: the sessions of Sunday, Monday and Tuesday, 3 × 2 h, and Wednesday's hour: 7 h lost.

Why

The plan is judged at the worst moment, in the same unit for both plans.

Step 5

Storage from Saturday to Tuesday: 39.4 GB with incrementals, against 4 × 35 = 140 GB with a full backup every night.

Why

Incrementals give nightly protection for a fraction of the space.

The conclusion, written out

“She restores Saturday's full backup, then Sunday's, Monday's and Tuesday's incrementals, and loses 1 h of work, against 7 h with a Saturday backup alone.”

The classic mistake on this problem: Restoring Tuesday's incremental alone, which gives back only the files changed on Tuesday.

Learn by heart

  • • CPU computes; RAM holds what runs and forgets at power off; storage keeps files.
  • • An assignment goes to RAM; an arithmetic operation to the CPU.
  • • The bottleneck is the component near 100 %; a full memory makes the disk busy.
  • • Compiler: one translation, then runs alone. Interpreter: one translation per run.
  • • Machine code fits one processor family; source code is for people.
  • • Absolute path from /; relative path from the current folder; .. climbs one folder.
  • • Virus: needs a host. Worm: spreads alone. Trojan horse: hides in a useful program.
  • • Restore the full first, then every incremental in order. A copy on the same drive is not a backup.
  • • kWh = W × h / 1000; a week has 168 h.
  • • E-waste per year = fleet / years × mass, replaced parts included.

Frequently asked questions

What is the difference between RAM and storage?

RAM is the working memory: it holds the programs that are open and their data, it is fast, and it is erased when the power goes off. Storage, an SSD or a hard drive, keeps the files and installed programs when the computer is off. More RAM lets more be open at once; it adds no room for files.

Is a copy of my files on the same drive a backup?

No. A copy on the same drive helps if you delete a file by mistake, but it fails with the drive, and it is lost in a theft or a fire as well. A backup is kept on another device, such as an external drive in another room or a cloud service, so that it survives what destroys the original.

What is the difference between a virus and a worm?

A virus attaches itself to a host, a program or a file, and spreads only when someone runs that host. A worm needs no host and no user action: it travels by itself from computer to computer over a network, often through a security flaw. Installing the updates closes the flaws worms use; antivirus scans catch infected files.

Is Python compiled or interpreted in ICS3U?

In the course, Python is treated as an interpreted language: its interpreter translates and runs the program each time you run it, so a misspelled name is found only when its line runs. Python first turns the source into an intermediate code called bytecode, a detail beyond the course. C++ and Java are the usual examples of compiled languages; the Java compiler checks the whole program and produces bytecode, which the Java Virtual Machine runs, rather than machine code.

How do you calculate how much electricity a computer uses?

Multiply the power in watts by the number of hours it is on to get watt-hours, then divide by one thousand to get kilowatt-hours. Multiply by the price of one kilowatt-hour to get the cost. Count every device, the monitor included, and every hour, nights and weekends included.

Mark this sheet as read or add it to your favourites: a free account, no password, keeps your read sheets and favourites from one visit to the next, tells you which chapter to tackle next and lets you ask for the method or exercise you are missing. Create your space, an email is enough.

Practise it

Corrected exercises: Computer systems, files and the environment, ICS3U

A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.

  • 10 corrected exercises
  • 100 points
  • 120 minutes
Do the exercises
Something missing from this sheet? A method, a trap, an exercise to practise it, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

© Ahmed Squalli Houssaini. Revision sheet published at www.letuteurscientifique.ca/en/fiches/ics3u-computer-systems-environment. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

Preparing for an ICS3U unit test?

I tutor Grade 11 computer science in English or in French, online. Get in touch for a first session.

Site by Studio Squalli