본문 바로가기

CS(Computer Science)/컴퓨터구조8

11. 메모리 구조 (2) Block Size Considerations Larger block은 miss rate를 줄여야함 (Spatial locality) 하지만 fixed-sized cache에서는 larger block => smaller number of cache line => more competition => more replacment => higher miss rate Larger miss penalty => miss에서 cache에 더 많은 data를 load 해야함 => 감소된 miss rate로부터 gain을 override => 해결책 : early restart / critical-word-first early restart : 원하는 block의 word가 반환되면 그 즉시 실행을 재개 critica.. 2023. 6. 4.
11. 메모리 구조(1) Memory Technology Access 시간 1) Static RAM (SRAM) 16kb~64kb : 0.5ns - 2.5ns 1mb~4mb : 5ns - 10ns 2) Dynamic RAM (DRAM) 50ns - 70ns 3) Flash storage 5-50 microsecond 4) Magnetic disk 5ms - 20ms 지역성의 원리 (Principle of Locality) - 주어진 시간에 Program은 memory의 작은 일부분만 접근한다 1) Temporal locality(시간 지역성) - 최근에 접근된 item들이 다시 접근될 확률이 높다 (loop내 instruction, index variable) 2) Spatial locality(공간 지역성) - 최근에 접근된 .. 2023. 6. 4.
10. 파이프라인 (3) Pipeline Performace -> 100ps for register read or write (ID, WB) -> 200ps for other stages (IF, EX, MEM) Instruction IF ID EX MEM WB Total time lw 200ps 100ps 200ps 200ps 100ps 800ps sw 200ps 100ps 200ps 200ps 700ps R-format 200ps 100ps 200ps 100ps 600ps beq 200ps 100ps 200ps 500ps Pipeline SpeedUp 만약 모든 stage의 시간이 똑같다라면 -> Time between instrunctions(pipelined) = Time between instructions(non-pi.. 2023. 6. 4.
10. 파이프라인 (2) Hazard -> 바로 다음 cycle에서 insturction을 이어서 실행 할 수 없는 상황 1) Structural hazards => 여러개의 instruction이 같은 장치를 같은 cycle에 사용하려고 할때 발생 2) Data hazards => 이전의 instruction에서 만들어줘야 할 data가 아직 준비되어 있지 않을 때 3) Control hazards => Data hazard와 비슷하지만 beq와 같이 PC 값에 영향을 주는 경우 Structural hazards -> resource의 사용 conflict -> 장치를 더 추가하여 해결함 ex) single ALU 사용 시 문제가 되는 사례 beq는 두개의 ALU 연산을 필요로 함 1) 두 Register의 value 비교 2.. 2023. 6. 4.
728x90