Suppose now that the processor executes the same C code, where an integer array element is 4 bytes, and the loop is interchanged: int a[32][32]; for (j=0;j<32;j++) for (i=0;i<32;i++) a[i][j] = i+j; Assume that the address of a[0][0]=DD100. How many TLB misses will this code incur? How many TLB hits will this code incur?
Added by Stacy V.
Close
Step 1
The TLB is a cache used by the hardware to improve virtual address translation speed. It stores the recent translations of virtual memory to physical memory addresses. When a virtual address is translated, the TLB is checked first to see if the translation is Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 95 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Suppose we have a processor with a base CPI of 1.0, assuming all references hit in the primary cache, and a clock rate of 4 GHz. Assume a main memory access time of 100 ns, including all the miss handling. Suppose the miss rate per instruction at the primary cache is 2%. How much faster will the processor be if we add a secondary cache that has a 5 ns access time for either a hit or a miss and is large enough to reduce the miss rate to main memory to 0.5%?
Madhur L.
Consider program P, which runs on a 1GHz machine M in 10 seconds. An optimization is made to P, replacing all instances of multiplying a value by 4 (mult X, X, 4) with two instructions that set x = x + x twice. Call this new optimized program, P'. The CPI of a multiply instruction is 4, and the CPI of an 'add' is 1. After recompiling, the program now runs in 9 seconds on machine M. How many multiplies were replaced by the new compiler?
Shaiju T.
Suppose the memory cells at addresses 00 through 05 in the machine described in Appendix C contain the following (hexadecimal) bit patterns: $$\begin{array}{cc} \text { Address } & \text { Contents } \\ 00 & 20 \\ 01 & \mathrm{C} 0 \\ 02 & 30 \\ 03 & 04 \\ 04 & 00 \\ 05 & 00 \end{array}$$ What happens if we start the machine with its program counter containing $00 ?$
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD