HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A program makes 1000 fetches of instructions and data…
MediumComputer ScienceHigh School (9–10)Computer Science › Computer HardwareNumericalConceptualIGCSE

A program makes 1000 fetches of instructions and data…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A program makes 1000 fetches of instructions and data. A fetch from the cache takes 2 nanoseconds and a fetch from RAM takes 60 nanoseconds (these times are made up for the question). With a small cache, 900 of the fetches are found in the cache. With a larger cache, 980 are found there.

Find the total fetch time with each cache. Then explain why the larger cache helps.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

The clock speed is the number of clock cycles each second, in hertz: 3 GHz3\ \text{GHz}3 GHz is 3 billion cycles each second. In the simple model of this course, time = cycles needed ÷\div÷ cycles each second. More cores share the work that can be split, but the rest still runs on one core. A larger cache means fewer slow fetches from RAM. An embedded system performs a dedicated function inside a larger device.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. Small cache. 900 fetches take 2 ns each: 180018001800 ns. The other 100 take 60 ns each: 600060006000 ns. The total is 1800+6000=78001800 + 6000 = 78001800+6000=7800 ns.

Step 2. Larger cache. 980 fetches take 2 ns each: 196019601960 ns. The other 20 take 60 ns each: 120012001200 ns. The total is 1960+1200=31601960 + 1200 = 31601960+1200=3160 ns.

Step 3. Why. The larger cache holds more of the instructions and data the program uses. The CPU finds them in the fast cache more often, so it waits for the slow RAM less often.

Answer: 7800 ns with the small cache and 3160 ns with the larger cache. Fewer slow fetches from RAM makes the larger cache faster.

Log in to save this for later
← All Problems
← A video editing task needs 20 billion clock cycles of work on one core…A company makes a fridge that keeps its inside at 4 °C… →
More onComputer Science › Computer Hardware

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A family's home network has a laptop, two phones, a games console and a printer…Hard
  2. A network tool shows the IPv4 address of a laptop in binary: 11000000.10101000.00000001.00101101…Medium
  3. A printer's network interface card has the MAC address 00:1A:2B:3C:4D:5E…Easy
  4. A small design company has five staff. Two of them often work from home…Hard
  5. A music shop sells old songs on CD and keeps its sales records on a hard disk drive…Medium
All problems on this topic →