Assume the system has a 32-entry TLB with a 8KB page size. What should MAX and stride be set to in order achieve a TLB miss upon pretty much every access to the array "data" ?
int value=0;
int data[MAX];
for (int j;j <1000; j++)
{
for (int i =0, i<MAX; i+=stride)
{
value=value+data[i];
}
}
This is a practice final exam which has answer but I don't get it. Final answers are : stride=2k MAX=33*stride
Any complete answer which will help me figure out how to find number of TLB misses in such type of questions is really appreciated.