컴퓨터구조 퀴즈 9

함궈·2023년 5월 31일

1. Find data access time in ms.

• 1024 byte sector: 7,200 RPM

• average seek time: 11ms

• transfer rate: 34MB/sec

• controller overhead: 480 Mbits/sec

average rotational latency:

0.5rotation / (7,200 / 60 )RPS = 0.0041666...sec = 4.167ms

transfer time:

sector 크기 = 1024 bytes
1KB / (34 MB/sec) = 1KB / (34,000 KB/sec) = 0.000029 sec = 0.029ms

controller overhead:

sector 크기 = 1024 bytes
1KB / (480 Mbits/sec) = 1KB / ((480/8)MB/sec) = 0.000017 sec = 0.017ms

disk access time:

average seek time + average rotational latency + transfer time + controller overhead = 11ms + 4.167ms + 0.029ms + 0.017 = 15.213

2. For a direct-mapped cache design with a 8-bit address, the following byte-addressed cache references are recorded.

①1(00000001)→②134(10000110)→③212(11010100)→④1(00000001)→

⑤135(10000111)→⑥213(11010101)→⑦162(10100010)→⑧161(10100001)→

⑨2(00000010)→⑩44(00101100)→⑪41(00101001)→⑫221(11011101)

(a) The following bits of the address are used to access the cache. Show cache accesses of 12 data.

tag 4bits, index 4bits 일때,

indextagdata
000
001
010
011
100
101
110
111

① 1(00000001) tag : 0000, index : 0001
miss

indextagdata
000
001000000000001
010
011
100
101
110
111

② 134(10000110) tag : 1000, index : 0110
miss

indextagdata
000
001000000000001
010
011
100
101
110100010000110
111

③212(11010100) tag : 1101, index : 0100
miss

indextagdata
000
001000000000001
010
011
100110111010100
101
110100010000110
111

④ 1(00000001) tag : 0000, index : 0001
hit

indextagdata
000
001000000000001
010
011
100110111010100
101
110100010000110
111

⑤, ⑥, ⑦, ⑧, ⑨, ⑩, ⑪, ⑫ miss
hit ratio = 1/12

(b) The following bits of the address are used to access the cache. Show cache accesses of 12 data.

tag(4) index(3), block#(1)

① 1(00000001) tag : 0000, index : 000, block# : 1
miss

indextagdata
000000000000001
001
010
011
100
101
110
111

② 134(10000110) tag : 1000, index : 011, block# : 0
miss

indextagdata
000
001000000000001
010
011100010000110
100
101
110
111

③212(11010100) tag : 1101, index : 010, block# : 0
miss

indextagdata
000
001000000000001
010110111010100
011100010000110
100
101
110
111

④ 1(00000001) tag : 0000, index : 000, block# : 1
hit

indextagdata
000
001000000000001
010110111010100
011100010000110
100
101
110
111

⑤135(10000111) tag: 1000, index 011, block# 1

indextagdata
000
001000000000001
010110111010100
011100010000110, 10000111
100
101
110
111

⑥213(11010101) tag: 1101, index 010, block# 1

indextagdata
000
001000000000001
010110111010100, 11010101
011100010000110, 10000111
100
101
110
111

⑦162(10100010) tag 1010 index 001, block# 0

indextagdata
000
001101010100010
010110111010100, 11010101
011100010000110, 10000111
100
101
110
111

⑧161(10100001)→

⑨2(00000010)→⑩44(00101100)→⑪41(00101001)→⑫221(11011101)

0개의 댓글