CPU Caches by Hand: Address Bits, Direct-Mapped & Set-Associative Caches, Hit/Miss Traces, Average Memory Access Time & Multi-Level Caches
See how memory caches make computers fast. You will split addresses into tag, index and offset, simulate a direct-mapped cache on an access trace, compare a 2-way set-associative cache with LRU, compute hit rates and average memory access time, add a second cache level and estimate the memory traffic of write policies, with every cell checked as you go.
- One-time payment
- 14-day money-back guarantee
- Secure checkout with Stripe
What you'll build
What you will be able to do
Each lab ends with a concrete result that you build yourself and the checker confirms, cell by cell.
- Compare the levels of a fictional memory hierarchy by size and latency, turn cycles into time for a loop of 10,000 reads and see why reading an array in order needs so few trips to memory.
- Derive the number of sets and the offset, index and tag bits of a small direct-mapped cache, then split six addresses into block number, set index and tag.
- Run a 12-access trace through a tiny direct-mapped cache: for every access you find the last earlier access to the same set, read which tag that left in the line, decide hit or miss and calculate the hit rate.
- Take the simulator's results for the trace of the last lesson, count how often each block was used before, label every miss as compulsory or conflict and calculate the hit rate a cache without conflicts could reach.
- Run the same trace through a 2-way set-associative cache of the same total size: decide hit or miss against both ways of the set, pick the least recently used way as the victim and measure how many misses the extra way avoids.
- Calculate the average memory access time of the simulator's processor with one and with two cache levels, the global miss rate and how sensitive the result is to the L1 miss rate.
- Count the bytes that travel to memory on a short read/write trace under write-through and under write-back, including dirty evictions and the final flush, and see which policy saves traffic.
- Compare eight cache designs from the simulator: work out the miss penalty from the block size, the AMAT of every design, pick the best one and show all eight in a column chart.
About this course
Caches are why a processor rarely waits for main memory, yet many people only know them as a diagram. In this course you simulate them cell by cell. You start with the memory hierarchy, converting cycles into time and seeing why locality matters. Then you split addresses into offset, index and tag for a given cache size, block size and number of ways. You run a direct-mapped cache on an access trace, classify compulsory and conflict misses and rebuild the same trace for a 2-way set-associative cache with LRU replacement. Average memory access time with a second level, write-through versus write-back traffic and a comparison of cache designs complete the picture. Every lab checks your cells. For CS students and engineers.
Curriculum
Course content
8 lessons · 8 labs · 2 h · final exam
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Final exam
Certificate
Finish with a certificate you can verify
Complete every lesson and pass the final exam to receive a certificate of completion for this course, with a unique credential ID and a public verification page.
- Names the course, your score and the date of issue
- A verification link for your CV or LinkedIn profile
- 12 questions, 75% to pass, unlimited retries.
A Tutorvo certificate confirms that you completed a course. It is not an official or professional qualification.
Before you buy
Questions about this course
Is this a subscription?
No. You pay $9.99 once for this course. There is no subscription and nothing renews automatically. Prices are in US dollars; taxes may be added where required.
What exactly do I get?
All lessons and labs of this course, the final exam and the certificate, including later updates to the course, for as long as Tutorvo offers it. Access is personal and tied to your account.
Can I get a refund?
Yes. If you are not satisfied, email hello@tutorvo.com within 14 days of buying and we refund the course in full via Stripe. The guarantee does not apply once a certificate for the course has been issued to you, or where there are signs of abuse.
When can I start?
Right after payment. Access starts immediately at your request; for consumers in the EU/EEA the statutory right of withdrawal therefore ends once access has begun, while our 14-day money-back guarantee applies regardless.
Do I need Excel or other software?
No. The labs run in a spreadsheet inside your browser on a laptop, tablet or phone. Function names and syntax follow Excel.
Is the certificate an official qualification?
No. It confirms that you completed all lessons of the course and passed its final exam. It is not an official, state-recognised or professional qualification. The name is taken from your profile when the certificate is issued.
Full details are in our Terms · hello@tutorvo.com
