3 views

Consider the following C program:

int X[N];
int step = M; /* M is some predefined constant */
for (int i = 0; i < N; i += step) X[i] = X[i] + 1;
1. 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?
2. Would your answer in part $(a)$ be different if the loop were repeated many times? Explain.
| 3 views