GATEverse
← GATE CSE 2006

Q81

MCQ2 marks, −0.5

A CPU has a 3232 KBKB direct mapped cache with 128128 byte-block size. Suppose AA is two dimensional array of size 512×512512 \times512 with elements that occupy 8−bytes8-bytes each. Consider the following two CC code segments, P1P1 and P2P2. P1P1: for (i=0; i<512; i++) { for (j=0; j<512; j++) { x +=A[i] [j]; } } P2: for (i=0; i<512; i++) { for (j=0; j<512; j++) { x +=A[j] [i]; } } P1P1 and P2P2 are executed independently with the same initial state, namely, the array AA is not in the cache and ii, jj, xx are in registers. Let the number of cache misses experienced by P1P1 be M1M1 and that for P2P2 be M2M2. The value of the ratio M1M2\frac{M_{1}}{M_{2}}:

Sign in to save attempts.

Loading…