0
0
Operating Systemsknowledge~20 mins

Translation Lookaside Buffer (TLB) in Operating Systems - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
TLB Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary function of a Translation Lookaside Buffer (TLB)?

Choose the option that best describes the main role of the TLB in a computer system.

AIt stores recently used virtual-to-physical address translations to speed up memory access.
BIt manages the allocation of physical memory pages to different processes.
CIt handles input/output operations between the CPU and peripheral devices.
DIt encrypts data before storing it in the main memory for security.
Attempts:
2 left
💡 Hint

Think about how the CPU quickly finds where data is in physical memory when using virtual memory.

📋 Factual
intermediate
2:00remaining
What happens when a TLB miss occurs?

When the CPU looks for a virtual address in the TLB and does not find it, what is the next step?

AThe CPU uses the last known physical address for that virtual address.
BThe CPU immediately raises a page fault exception.
CThe CPU halts until the operating system resets the TLB.
DThe system looks up the page table to find the physical address and updates the TLB.
Attempts:
2 left
💡 Hint

Consider how the system handles address translation when the TLB does not have the needed entry.

🔍 Analysis
advanced
3:00remaining
How does TLB size affect system performance?

Analyze the impact of increasing the size of the TLB on system performance and explain the trade-offs involved.

AA larger TLB can reduce misses but may increase lookup time and hardware complexity.
BA smaller TLB reduces power consumption but causes more page faults.
CA larger TLB always improves performance with no downsides.
DTLB size does not affect performance because the page table handles all translations.
Attempts:
2 left
💡 Hint

Think about how cache size and speed relate to each other in hardware design.

Comparison
advanced
3:00remaining
Compare a fully associative TLB with a set-associative TLB.

Which statement correctly compares fully associative and set-associative TLBs?

ASet-associative TLBs have slower lookup times than fully associative TLBs because they check all entries.
BFully associative TLBs allow any entry to be stored anywhere, while set-associative TLBs restrict entries to specific sets.
CFully associative TLBs use less hardware than set-associative TLBs.
DSet-associative TLBs do not require replacement policies, unlike fully associative TLBs.
Attempts:
2 left
💡 Hint

Consider how entries are organized and searched in different cache types.

Reasoning
expert
3:00remaining
Why might an operating system flush the TLB during a context switch?

Explain the reason for clearing the TLB when switching from one process to another.

ATo free up memory space used by the TLB for the new process's data.
BBecause the TLB entries are encrypted and must be decrypted for each process.
CTo remove stale address translations that belong to the previous process, preventing incorrect memory access.
DTo reset the CPU clock speed for the new process's execution.
Attempts:
2 left
💡 Hint

Think about how virtual memory addresses differ between processes.