交大真的好少人PO啊
A:e d c
P1:busy(2) // 1~3 | P2:wait(S) // 1~5 : S=1 当到5的时候 S=2
wait(S) // 3 : S=1 | busy(2) // 5~7
busy(2) // 3~5 | signal(S) // 7 : S=2->...
signal(S) // 5 : S=1->2 | busy(1) // 7~8
busy(1) // 6 |
|
P1 turnaround = 6 | P2 turnaround = 8
average = (6+8)/2 = 7
B:d c 这题超不确定的
(2+64)*1024/512 = 132 所以17题我写d
(2+64)*1024/(512+256) = 88 所以18题我写c
C:a e b d
SSTF:120-134-103-97-88-52-190
A = 14 + 82 + 138 = 234
LOOK:120-97-88-52-103-134-190
B = 68 + 138 = 206
SCAN:130-97-88-52-0-103-134-190
C = 120 + 190 = 310
S = min(A,B)+C = 206+310 = 516
= 4*5^3 + 0*5^2 + 3*5^1 + 1
D:b a d <-这个也太bad了吧
Cache sizes = 64KB = 2^16 bytes = 2^14 words = 2^12 blocks = 4K blocks
block sizes = 4 words = 2^4 bytes
sizes of tag field = 32-12-4 = 16
OxDF105670, 0xDF10567C, Ox23A033A0, 0x23A034A0, 0xDF105678
﹋﹋ ﹋﹋ ﹋﹋ ﹋﹋ ﹋﹋
E:c b d
P0 = 2*4 + 3*4 + 5*9 + 1*7 = 72
P1 = 2*8 + 3*4 + 5*6 + 1*8 = 66
P0*50% = 36 = 2*4 + 3*4 + cp*9 + 1*7
cp = 1
请板上高人大大们跟我对一下答案,谢谢
之后应该还会在上来对下4大名校的答案