###### tags: `co` `thu` # 計算機組織108 ## 1.(10%) 請說明在 DRAM 內部定址設計上,是如何做到位址線接腳數可以用到較少的數目。請以 16Mbit DRAM 晶片為例 使用位址多工來減少位址線接腳數。 以16Mbit DRAM 晶片為例 $16Mbit = 16M cell\times 1bit = 4Mcell\times 4bit$ $4M=2^{22}$,22條位址線 $2^{22}=2^{11}(row)\times 2^{11}(column)$ $2^{20}\times 8bit=1M\times8bit=8Mbit$ ## 2. (10%) How about the different between cache memory (SRAM) and RAM? (HINT: from organization, cost, speed, size, and applications) | | organization | cost |speed|size|application| | -------- | -------- | -------- |-------- |-------- |-------- | | SRAM | 一個flip-flop和兩個電晶體,不須更新電路(6個電晶體和2個NOT gate | 貴 |快 |小 |Cache | | DRAM | 1bit有一個電容和一個電晶體,須更新電路| 便宜 |慢 |大 |Main memory | ## 3. (20%) Please draw these two cache diagrams for MIPS, this cache specification of processor is listed as bellows: - The size of maximum memory (RAM) space is 4G Bytes - The size of cache memory is 4M Bytes - Cache line size is 4 Bytes (32bits) You can refer the following cache diagram of MIPS (4-way) for drawing MIPS processor cache diagram (a) Please draw the diagram for 2-way set-associate cache (tag ?bit : set ?bit : word ?bit), please calculate the total SRAM space needed for this 4MB cache memory. $4G=2^{32}$,需要$32bits$ $4=2^2$,word有$2bits$ $\frac{4M}{4}=2^{10}$,$2=2^1$,$10-1=9$,set有9$bits$ $32-9-2=21$,tag有$21bits$ $\frac{32+21+1}{32}\times 4KB=6.75KB$ (b) Please draw the diagram for 8-way set-associate cache (tag ?bit : set ?bit : word ?bit), please calculate the total SRAM space needed for this 4MB cache memory. $4GB=2^{32}bits$,address line 總共有32條 $4Bytes=2^{2}$,word共2bits $\frac{4MB}{4B} = 2^{10}$,$10-3=7$,set則為7bits $tag=32-2-7=23$ $\frac{32+23+1}{32}=\frac{56}{32}\times 4KB=7KB$ ## 4.Please calculate the average access time of this hard disk for transferring a 16GB video data file. As we known, the seek time of this HD is 0.8ms, spindle speed is 15000rpm, sectors per track is 1024, and byes per sector is 4096 bytes (advanced format). 公式為 $$T_a=T_s+\frac{1}{2r}+\frac{b}{rN}$$ so: $$T_a=0.8+\frac{1}{2\cdot \frac{15000}{60}}+\frac{16\cdot 2^{30}}{\frac{15000}{60}\cdot 4096\cdot 1024}$$ $$T_a=0.8+\frac{1+2^{13}}{500}$$ ## 5.(15%) Please draw diagrams and describe the functions in detail for RAID 1+0, RAID 0+1, and RAID 5(50). RAID 1+0: 1、先分割資料再鏡像,以RAID 1作為最低組合 2、當有一個磁碟受損,其餘硬碟仍可運作 | DISK 1 | DISK 2 | DISK 3 |DISK 3 | | -------- | -------- | -------- |-------- | | $A1$ | $A1'$ | $A2$ |$A2'$ | RAID 0+1: 1、先鏡像再分割,以RAID 0作為最低組合 2、若有一顆硬碟受損,則同組RAID 0硬碟皆無法運作 3、可靠性較低 | DISK 1 | DISK 2 | DISK 3 |DISK 3 | | -------- | -------- | -------- |-------- | | $A1$ | $A2$ | $A1'$ |$A2'$ | RAID 5: 1、同位元錯誤檢測循環分配在每個磁碟 2、N個disk用戶需要N+1個disk 3、常用於網路服務器 | DISK1 | DISK2 |DISK3 | | -------- | -------- |-------- | | $A1$ | $A2$ |$P_{A1、A2}$ | | $A3$ | $P_{A3、A4}$ | $A4$ | | $P_{A5、A6}$ | $A6$ |$A5$ | ## 6.(15%) Pleas describe the components and functions of DMA in detail. 1、DNA controller 從CPU接管I/O 2、會偷取CPU閒置時間 3、允許一個設備直接讀寫系統記憶體而不需CPU參與 ## 7.(10%) Please describe the Flnny’s (費林) computer classification(分電腦類法) SISD:單指令單資料流,每個指令部件每次僅解碼一條指令,且在執行時僅為操作部件提供一份數據 SIMD:單指令多資料流,採用一個控制器來控制多個處理器,同時對一組資料中的每一個分別執行相同的操作從而實現平行計算 MISD:多指令單資料流,具有n個處理單元,按n條不同的指令要求對同一資料及其中間結果進行不同的處理,一個處理單元的輸出又作為另一個處理單元的輸入,現實還沒有這種機器。 MIMD:多指令多資料流,使用多個控制器來異步地控制多個處理器來達到平行計算的效果。 參考資料:wiki ## 8.(7%) 請問下列各種 RAID 方法,至少需要幾顆硬碟才可以達到其功能? RAID 0:2 RAID 1:2 RAID 2:3 RAID 3:3 RAID 4:3 RAID 5:3 RAID 6:4 ## 9.(8%) Please describe the functions of Data Buffering. 1、資料以快速突發的方式從主記憶體傳輸到I/O設備 2、資料在I/O設備中緩衝再以它本身的速度傳送至電腦周邊的設備