# Andrew S. Tanenbaum (OS) Edition 4 Exercise 3 Question 53 (Page No. 261)

89 views

Write a program that demonstrates the effect of $TLB$ misses on the effective memory access time by measuring the per-access time it takes to stride through a large array.

1. Explain the main concepts behind the program, and describe what you expect the output to show for some practical virtual memory architecture.
2. Run the program on some computer and explain how well the data fit your expectations.
3. Repeat part $(b)$ but for an older computer with a different architecture and explain any major differences in the output.

## Related questions

1
62 views
You are given the following data about a virtual memory system: The $TLB$ can hold $1024$ entries and can be accessed in $1$ clock cycle $(1\: nsec).$ A page table entry can be found in $100$ clock cycles or $100\: nsec.$ The average page replacement time is $6\: msec.$ ... by the $TLB\:\: 99\%$ of the time, and only $0.01\%$ lead to a page fault, what is the effective address-translation time?
Write a program that can be used to compare the effectiveness of adding a tag field to $TLB$ entries when control is toggled between two programs. The tag field is used to effectively label each entry with the process id. Note that a nontagged $TLB$ can be ... your simulation behaves as expected for a simple (but nontrivial) input example. Plot the number of $TLB$ updates per $1000$ references.
How can the associative memory device needed for a $TLB$ be implemented in hardware, and what are the implications of such a design for expandability?
A computer whose processes have $1024$ pages in their address spaces keeps its page tables in memory. The overhead required for reading a word from the page table is $5\: nsec.$ To reduce this overhead, the computer has a $TLB,$ which holds $32$ (virtual page, physical page frame) pairs, and can do a lookup in $1\: nsec.$ What hit rate is needed to reduce the mean overhead to $2\: nsec?$