32. LA: Hints for Computer System Design Flashcards

1
Q

What are 8 hints that Butler Lampson gave for Computer System Design?

A
  1. Separate normal and worst case
  2. Plan to throw one away
  3. Use brute force
  4. Do one thing well
  5. Shed load
  6. Use hints
  7. Compute in the background
  8. Cache answers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the hint “Separate normal and worst case” and give an example of how to use it

A

The MIPS R3000 provides separate TLB (normal case) and general (worst case) exception handlers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

**Describe the hint “Plan to throw one away” and give an example of how to use it

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

**Describe the hint “Use brute force” and give an example of how to use it

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe the hint “Do one thing well” and give an example of how to use it

A

Write an interface just for manipulating your page tables. Test it. Then use it as part of a complete ASST3 solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe the hint “Shed load” and give an example of how to use it

A

When you run out of swap, start failing calls to fork or exec

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe the hint “Use hints” and give an example of how to use it

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

**Describe the hint “Compute in the background” and give an example of how to use it

A

Writing pages to disk when the system is idle makes swap out much faster

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

**Describe the hint “Cache answers” and give an example of how to use it

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly