Clock speed or more cores: which helps which task

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Clock speed or more cores: which helps which task

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Your old single-task game runs on only one core and feels slow. Which upgrade helps most?
A A CPU with a higher clock speed (GHz)
B A CPU with more cores
2. You have a browser, music, a chat app and a document all open at once. What helps most?
A More cores, so programs can run side by side
B Only a higher clock speed
3. Which statement is true about clock speed?
A A higher GHz adds extra cores to the CPU
B A higher GHz makes a core finish its steps faster
4. A video editor exports a video. The software splits the work into parts. Which CPU suits it better?
A 2 cores, because video export only uses one core
B 8 cores, because the parts can run at the same time
5. A quad-core CPU is always exactly four times faster than a single-core CPU. True or false?
A False
B True

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1cpu.clock = 4.5 GHz AMany programs open together is a many-tasks job, so more cores would help more than clock speed alone
2cpu.cores = 8 Bexport_video(cores = 8)
3Exporting a video can be split into parts, so extra cores can each work on a chunk at the same time CThis assumes a perfect 4x speed-up, but parts of a task cannot be split, so the real gain is smaller
4A quad-core CPU is not always 4x faster, because some of the task cannot be split across cores DA higher clock speed makes a single task run faster, because each core finishes its steps more quickly
5Many programs open at once is slow, so buy a higher GHz single core only EMore cores let many programs, or one job split into parts, run at the same time
6quad_core_time = single_core_time / 4 Fspeedup < 4 * single_core

Definitions

clock speed vs cores

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
oneTask = TRUE IF oneTask THEN raise _____ speed ENDIF
2.
openApps = 8 IF openApps > 4 THEN add _____ ENDIF
3.
exportParts = 4 IF exportParts _ 1 THEN PRINT "use many cores"
4.
speedup = 3.2 IF speedup _ 4 THEN PRINT "not 4x faster"
5.
speed = 3.6 ___ IF speed > 3 THEN PRINT "fast one task"

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A jobs = 1
B if jobs > 1:
C print("Higher GHz helps")
Question 2
A jobs = 6
B if jobs > 1:
C print("Fewer cores help")
Question 3
A cores = 4
B parts = 8
C t1 = 40 # mins on 1 core
D ideal = t1 * cores
Question 4
A unit = "GB"
B speed = 3.6
C print(speed, unit)
Question 5
A cores = 4
B real_speedup = 2.8
C print(real_speedup == cores)

Answer Key

Clock speed or more cores: which helps which task
Section A: Quick Questions
Q1
A — A CPU with a higher clock speed (GHz)
Q2
A — More cores, so programs can run side by side
Q3
B — A higher GHz makes a core finish its steps faster
Q4
B — 8 cores, because the parts can run at the same time
Q5
A — False
Section B: Match the Pairs
Q1
cpu.clock = 4.5 GHz → A higher clock speed makes a single task run faster, because each core finishes its steps more quickly
Q2
cpu.cores = 8 → More cores let many programs, or one job split into parts, run at the same time
Q3
Exporting a video can be split into parts, so extra cores can each work on a chunk at the same time → export_video(cores = 8)
Q4
A quad-core CPU is not always 4x faster, because some of the task cannot be split across cores → speedup < 4 * single_core
Q5
Many programs open at once is slow, so buy a higher GHz single core only → Many programs open together is a many-tasks job, so more cores would help more than clock speed alone
Q6
quad_core_time = single_core_time / 4 → This assumes a perfect 4x speed-up, but parts of a task cannot be split, so the real gain is smaller
Section C: Definitions
Q1
clock speed vs cores — Higher clock speed (GHz) speeds up one task at a time; more cores help when many tasks, or a task split into parts, run together. Quad-core is not always 4x faster.
Section D: Fill in the Blanks
Q1
oneTask = TRUE IF oneTask THEN raise clock speed ENDIF
Q2
openApps = 8 IF openApps > 4 THEN add cores ENDIF
Q3
exportParts = 4 IF exportParts > 1 THEN PRINT "use many cores"
Q4
speedup = 3.2 IF speedup < 4 THEN PRINT "not 4x faster"
Q5
speed = 3.6 GHz IF speed > 3 THEN PRINT "fast one task"
Section E: Spot the Error
Q1
B — One job means a single task running at a time, so the test should be jobs == 1. Higher clock speed speeds up one task. jobs > 1 would describe many tasks.
Q2
C — With many tasks running together, extra cores let them run side by side. The message should say more cores help, not fewer.
Q3
D — An ideal video export split across 4 cores takes the one-core time divided by the number of cores. Multiplying would make the export take longer, which is wrong.
Q4
A — CPU clock speed is measured in gigahertz (GHz). GB means gigabytes, which measures storage or memory size.
Q5
C — A quad-core is not always 4x faster, because some work cannot be split up. The real speedup is usually less than the number of cores, so it should use <.