32. LA: Hints for Computer System Design Flashcards
What are 8 hints that Butler Lampson gave for Computer System Design?
- Separate normal and worst case
- Plan to throw one away
- Use brute force
- Do one thing well
- Shed load
- Use hints
- Compute in the background
- Cache answers
Describe the hint “Separate normal and worst case” and give an example of how to use it
The MIPS R3000 provides separate TLB (normal case) and general (worst case) exception handlers
**Describe the hint “Plan to throw one away” and give an example of how to use it
Might as well make it (whatever system you’re designing) simple. Before implementing two-level page tables, try a linked list, or a list of segments. Don’t over-design the first draft.
**Describe the hint “Use brute force” and give an example of how to use it
Particularly for the first implementation. Don’t make things fast until they need to be.
Apply Amdahl’s Law. Unsorted linked list page tables are easier to maintain and not a performance problem until you can demonstrate that the overhead of page translation is dominating.
Describe the hint “Do one thing well” and give an example of how to use it
Write an interface just for manipulating your page tables. Test it. Then use it as part of a complete ASST3 solution
Describe the hint “Shed load” and give an example of how to use it
When you run out of swap, start failing calls to fork or exec
Describe the hint “Use hints” and give an example of how to use it
A page being mapped in the TLB is a hint that it isn’t safe to evict.
Without holding a lock, a page looking available in the coremap is a hint that it may be after the coremap lock is acquired
**Describe the hint “Compute in the background” and give an example of how to use it
Writing pages to disk when the system is idle makes swap out much faster
**Describe the hint “Cache answers” and give an example of how to use it
Use a cache. Cache’s are everywhere. The TLB is a cache. The buffer is a cache. Saving process TLB entries across context switches is an example of using a cache