본문 바로가기
[컴퓨터구조] #18. Virtual Memory(2) Lec 18. Virtual Memory_2 (Large and Fast: Exploiting Memory Hierarchy) - Translation Lookaside Buffer (TLB) : page table이 main memory 안에 저장되어있기 때문에, memory access 할 때마다 적어도 두 번 메모리 접근 해야함. (page table 접근하여 VA->PA 할 때, 명령어나 데이터 가져올 때) => page table entry를 갖고있는 cache인 TLB를 사용. (VA->PA를 위해 메인메모리까지 가지 않아도 됨) - TLB Structure Let’s assume that, Virtual address is 32-bit wide, Physical address is 30-bi.. 2022. 6. 7.
[컴퓨터구조] #17. Virtual Memory(1) Lec 17. Virtual Memory_1 (Large and Fast: Exploiting Memory Hierarchy) - Virtual Memory : technique provided by operating systems • Physical address: address in main memory • Virtual address: address in virtual space • Virtual memory: technique that uses main memory as a “cache” for secondary storage 메인메모리를 secondary storage에 대한 cache인 것 처럼 다룸. - Motivation of Virtual Memory 1) Sharing of memory.. 2022. 6. 4.
[컴퓨터구조] #16. Cache(2) Lec 16. Cache_2 (Large and Fast: Exploiting Memory Hierarchy) - Performance Execution time = CPU execution cycles + memory stall cycles (실행 시간) = (CPU가 의미있게 돌아가는 시간) + (메모리에 접근하느라 멈춰있는 시간) CPU time = #insts × CPI(=명령어 당 사이클 수) × T = clock cycles(=총 소요되는 사이클 수) x T = (CPU execution clock cycles + Memory-stall clock cycles) x T *가정 : cache hit does not require any extra CPU cycle for execution. MA.. 2022. 6. 3.
[컴퓨터구조] #15. Cache(1) Lec 15. Cache_1 (Large and Fast: Exploiting Memory Hierarchy) - CPU vs Memory Performance CPU 성능 : 1.5년마다 2배의 속도로 성장 DRAM 성능 : 10년마다 2배의 속도로 성장 -> 성능 격차⬆ -> memory wall : 컴퓨터 시스템의 성능을 끌어올리는데 메모리가 벽(장애)으로 작용 - Memory Wall : CPU와 DRAM의 성능격차가 점점 커져서, 성능 결정이 거의 메모리에 의해서 됨. -> memory hiearchy design(메모리를 계층적으로 설계) 이 중요해짐. ex) SRAM(속도⬆,가격⬆) - DRAM - Magnetic disk(속도⬇, 가격⬇) - Cache : small memory insid.. 2022. 5. 29.
[컴퓨터구조] #14. Pipeline MIPS(3) Lec 14. Pipeline MIPS_3 (The Processor) - Dependencies (lec 12 참고) ② Data Hazards : 두개의 인접한 명령어 사이에 존재하는 data의 dependency로 인해 발생(데이터 의존성). * 해결책1 : Forwarding (or Bypassing) * 해결책2 : Code Scheduling to Avoid Stalls ③ Control Hazards : 조건의 참/거짓을 알아야 다음 명령어를 알 수 있음. * 해결책1 : Add hardware in ID stage * 해결책2 : Delayed Branch - ② Data Hazards * 해결책1 : Insert nop (0x0000_0000) -> 기능적으로는 문제없지만 성능적으로 2c.. 2022. 5. 20.
[컴퓨터구조] #13. Pipeline MIPS(2) Lec 13. Pipeline MIPS_2 (The Processor) * datapaths / controllers - Pipelined Datapath flip-flop (datapath) = pipeline register : stage 구분용. 이전 stage의 값을 기억했다가 새로운 클럭(rising edge)일 때마다 다음 stage에 넘겨줌. - lw * WB 단계에서 주의할 점) Write register를 저장해두었다가 사용해야함! : WB 단계에서 lw $s0, 8($t1) 명령어를 처리중인데, 그 시점에 Write register 에 접근하면 lw 명령어 이후에 fetch한 다른 명령어로 부터 나온 타겟($s0 이 아닌 것)을 가리킬 수 도 있음. 따라서 lw에서의 타겟을 알맞게 지칭.. 2022. 5. 13.