GATE / CS ARCHIVE

GATE CSE 1992 / QUESTION 5(a)

Average write-through access time

Computer Organization & Architecture · Cache Memory · Full GATE CSE 1992 paper

GATE 1992, Q5(a) Descriptive
Report issue

Cache Memory

Question 5(a), GATE 1992: Main memory takes 500 ns and cache 50 ns. Requests are 80% reads and 20% writes; read hit ratio is 0.9. Writes update cache and main memory simultaneously. Find average access time.
Tap to enlarge
Answer & solution

Answer: 180 ns for sequential cache lookup then main-memory read on a miss; 176 ns if miss latency already includes lookup or reads begin in parallel. (no official key was published)

Separate access types before averaging. A read hit costs 50 ns. Under the usual serial lookup model, a read miss first spends 50 ns discovering the miss and then 500 ns accessing main memory, for 550 ns. Therefore E[read]=0.9(50)+0.1(550)=100 ns.

The statement explicitly says write-through updates are simultaneous, so the write completes when the slower device completes: E[write]=max(50,500)=500 ns. Adding 50+500 for a write would contradict this parallel-update stipulation. No write buffer or early processor release is stated.

Weighting by request mix gives E[access]=0.8(100)+0.2(500)=180 ns. Equivalently, the overall probabilities are 0.72 read hit, 0.08 read miss and 0.20 write, giving 0.72(50)+0.08(550)+0.20(500).

There is a timing-model ambiguity: if main-memory access starts in parallel with cache lookup, or a quoted 500 ns miss time is interpreted as total latency including lookup, then a miss costs 500 rather than 550 ns. That model gives E[read]=95 ns and overall 176 ns. The text establishes simultaneous writes but does not explicitly establish read overlap; 180 ns is the serial-read result, while 176 ns requires the alternative convention. This is effective time per processor memory request, not a change to the physical 500 ns main-memory device latency.

Original paper, page 5