1. (A)
40 - 14 = 26
26 + 6 = 32 bits (4 bytes)
1. (B)
58 - 14 = 44
each level a page 16 K / 4 = 4 K entries per page, which is 12 bit.
So, devide 44 by 12 , we get 12, 12, 12, 8.
Hence the multi-level paging scheme, looks like the following:
------------------------------------------
8 12 12 12 14
------------------------------------------
1. (C)
64 K / 16 k = 4 (way)
2. A.
In MSI coherence strategy, M means Modify, S means Shared, I means Invalidated.
1. P1 read 100 100 is S in P1.
2. P2 read 104 104 is S in P2.
3. P1 send I 100 100 is M in P1.
4. P3 read 100 100 is S in P3.
P1 flush 100 100 is S in P1
(also P1 could send flushed, and P3 could have it as M. )
5. P4 read & send I 104 104 is I in P2, 104 is M in P4.
6. 100 is I in P3
(if P1 is flushed, then P3 has to write back).
2. B.
1. P1 read 100 100 is S in P1
2. P2 read 100 100 is S in P2
3. P1 send I 100 100 is I in P2, M in P1
4. P3 read 100 100 is S in P1, S in P3
5. P4 read & I 100 100 is I in P1, P3, M in P4
6. nothing
3. A.
Bandwidth Latency cost
-----------------------------------------------------------------------------------------
Bus O(1) O(1) O(n)
-----------------------------------------------------------------------------------------
Ring O(n) O(n) O(n)
-----------------------------------------------------------------------------------------
Crossbar O(n) O(1) O(n^2)
-----------------------------------------------------------------------------------------
Binary Hypercube O(n) O(logn) O(nlogn)
-----------------------------------------------------------------------------------------
2D Mesh O(n) O(n^1/2) O(n)
3. B.
Latency become much less important if using wormhole routing
Must use bisection bandwidth for bandwidth
4. A
1. lw r1, 100(r2)
2. lw r3, 200(r1)
3. sw r3, 100(r4)
4. lw r4, 100(r5)
5. add r6, r3, r4
6. sw r6, 300(r5)
7. addi r2, r2, 4
8. add r4, r2, r4
r1 from instruction 1 to instruction 2
r3 from instruction 2 to instruction 3
r3 from instruction 2 to instruction 5
r4 from instruction 4 to instruction 5
r4 from instruction 4 to instruction 8
r6 from instruction 5 to instruction 6
r2 from instruction 7 to instruction 8
4. B
1. lw r1, 100(r2)
2. lw r3, 200(r1)
3. sw r3, 100(r4)
4. lw r4, 100(r5)
5. add r6, r3, r4
6. sw r6, 300(r5)
7. addi r2, r2, 4
8. add r4, r2, r4
r2 from instruction 1 to instruction 7
r4 from instruction 3 to instruction 4
r4 from instruction 5 to instruction 8
4. B
lw r1, 100(r2) F D X M W
lw r3, 200(r1) F D X M X
sw r3, 100(r4) F D X M W
lw r4, 100(r5) F D X M W
add r6, r3, r4 F D X M W
sw r6, 300(r5) F D X M W
addi r2, r2, 4 F D X M W
add r4, r2, r4 F D X M W