I teach undergraduate computer architecture and am reconsidering one of my homework assignments in which I ask students to simulate by hand (on paper) the behavior of different caches on the same access sequence. It is tedious to create such a problem in a way that the caches behave differently in an interesting way, and I'm sure doing the problems is tedious too (as is grading them). I'm willing to do the work and have students do the work if it's actually useful, but I'm not sure it is.

The purpose of the weekly homework assignments it to reinforce the material the students learn from the textbook (Computer Organization and Design by Hennessy and Patterson), lectures, and in-class exercises. There is already a full set of lab assignments that require wiring or coding (in assembly language or Verilog). There is not time for an additional lab assignment on cache simulation.

I have a separate homework assignment that asks higher-level questions about caches, such as which of two versions of code is likely to run faster if cache performance is taken into account. I think writing cache-aware programs is an important skill. Is simulating the differences between direct-mapped, 2-way set associative caches, and 4-way set associative caches an important part of students' education?


2 Answers 2


It sounds like you've already answered your question, but I'll throw in my two cents:

It depends.

Does every software engineer need to simulate the differences between direct-mapped, 2-way set associative caches, and 4-way set associative caches? Absolutely not. I've been a programmer for about 10 years now, and I think I have a pretty successful career, and I have no idea what those things even mean.

However, should some students, who are particularly interested in these kinds of things, take a deeper dive? Absolutely yes.

So, it comes down to a question of: is this course designed for students to get a high-level overview of computer architecture, or is this a more specialized course designed for students to get more information about the low-level details? In other words, is this a breadth or depth course?

You might want to give students a high-level overview, and then point particularly interested students at further reading, more advanced courses, or specialized fields they might study in grad school.


I'll suggest you step back and look at the picture from a distance. You describe the assignment as

  • Fiddly

  • On Paper

I'll assume, with no evidence that it is also

  • Individual assignment

Are your students in general good at those sorts of things already or would this be a first for the first two at least. Those kinds of things are worth doing, so if they don't have such experience then you have something nice for them already.

However, students also need to be able to

  • Write technical reports

  • Work in pairs or teams

  • Speaking in public

If the don't have those kinds of experiences already, but are good at "fiddly" then you might modify the assignment to include more of the latter ideas. I don't guess that lack of writing skill is your student's big problem, but don't know about teamwork.

So, for a new experience for them, you could put them in pairs to write a tech report recommending one cache mechanism or another. They would have to do much of the technical work, of course, but perhaps not to the same degree, but would have to spend more time/effort on the writeup to convince their colleagues (i.e. you) and the other students in a presentation.

I used to have good experience, when working with very good students, to give two assignment versions, where the students chose one. The versions were different in kind and different in difficulty, and stressed different things. They were correctly advertised. I was surprised at how often the students chose the harder one. Part of my advertising for the two versions of the assignment was the kind of skill they could expect to achieve by doing it. I also cautioned them that if they chose wrong they would be bored. They were graded the same and on the same scale.

  • $\begingroup$ Thanks, but I don't have room in my course to add an assignment of the magnitude you propose. (Another reader might.) $\endgroup$ Sep 6, 2017 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.