SME
Operating Systems · Problem type
Effective access time with a TLB
Use this for “A TLB lookup takes 10 ns, memory takes 100 ns, and 90% of lookups hit. What is the effective access time?”
This is an example. Type your own values to start a new problem.
EAT (ns)
=
h
×
(
t (ns)
+
m (ns)
)
+
(1
−
h
)
×
(
t (ns)
+
2
×
m (ns)
)
Formulas
EAT
=
h
×
(
t
+
m
)
+
(1
−
h
)
×
(
t
+
2
×
m
)
120 = 0.9 × (10 + 100) + (1 − 0.9) × (10 + 2 × 100)
Assumptions
•
A TLB miss reads the page table in memory once, then the data: a one-level table.
•
The TLB is searched before every access, hit or miss; type t = 0 if your course ignores it.
•
Every page is in memory: no page faults.
Step-by-step
WE KNOW
h = 0.9, t = 10 ns, m = 100 ns
FIND
effective access time (EAT)
Step 1 · Find effective access time (EAT)
Use EAT = h × (t + m) + (1 − h) × (t + 2 × m)
Weigh each case’s time by how often it happens: hits read memory once, misses twice.
EAT = 0.9 × (10 + 100) + (1 − 0.9) × (10 + 2 × 100)
EAT = 0.9 × 110 + 0.1 × (10 + 200)
EAT = 0.9 × 110 + 0.1 × 210
EAT = 99 + 21
EAT = 120 ns
Check
Put the numbers back in. Both sides should match.
120 = 0.9 × (10 + 100) + (1 − 0.9) × (10 + 2 × 100) ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.
Related lessons
Memory management
Main lesson
Effective access time with page faults
Use this for “Memory takes 100 ns, a page fault takes 8 ms to service, and 1 access in 100 000 faults. What is the effective access time?”
Page replacement: FIFO and LRU
Use this for “Pages are referenced 1, 3, 1, 2, 4, 3, 1, 4 with 3 frames, all empty at the start. How many page faults does FIFO make, and LRU?”