Question: Consider the following C program: int X[N]; int step = M; /* M is some predefined constant */ for (int i = 0; i <
int X[N];
int step = M; /* M is some predefined constant */
for (int i = 0; i < N; i += step) X[i] = X[i] + 1;
(a) If this program is run on a machine with a 4-KB page size and 64-entry TLB, what values of M and N will cause a TLB miss for every execution of the inner loop?
(b) Would your answer in part (a) be different if the loop were repeated many times? Explain.
Step by Step Solution
3.54 Rating (178 Votes )
There are 3 Steps involved in it
For these sizes a M has to be at least 4096 to ensure a TLB miss for ev... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
761-C-S-D-B-O-S (330).docx
120 KBs Word File
