[Memory Hierarchy]
> Random-Access memory(RAM)
# 주요 특징
- RAM is traditionally pachaged as a chip
- 저장 단위는 'cell' (one bit per cell)
- 여러 RAM chips가 메모리를 구성한다.
# SRAM (Static RAM)
- 전원 공급이 유지된다면, 값(value)를 무한이 유지한다.
- 접근이 빠르고, 비싸다.
# DRAM (Dynamic RAM)
- 접근이 SRAM에 비해 상대적으로 느리고, 싸다.
> Connecting CPU and Memory
# bus; CPU와 memory는 bus에 의해서 연결된다.
-> bus는 주소, 데이터, 제어 신호를 전달하는 collection of parallel wires이다.
> Conventional DRAM Organization
> Reading DRAM Supercell (2,1)
# RAS를 통해 선택할 row의 정보를 보낸다.
# 전체 row를 internal row buffer에 복사한다.
# column address를 다시 한 번 보낸다.
# 해당 supercell이 보내진다.
/* 굉장히 빨리 이야기하고 넘어가심
> Nonvolatile Memories (비휘발성 메모리)
# 비휘발성 메모리는 전원이 꺼져도 데이터가 유지된다.
# 일반적으로 ROM(read-only memory)이라고 부른다.
# Types of ROMS
- Programmable ROM(PROM)
- Eraseable programming ROM(EPROM)
- Electrically erasable ROM(EEPROM)
- Flash memory
# Firmware; ROM에 저장된 프로그램
> Disk Geometry
> Multiple-platter View
> Disk Operation
> Disk capacity
# Capacity; 저장 가능한 최대 비트 수 (GB)
* 1GB = 10^9 Bytes
# Capacity의 결정 요소
- Recording density (bits/in)
- Track density (bits/in)
- Areal density (bits/in^2) = Recording density * Track density
> Recording zones
> Computing Disk Capacity
Capacity = (# bytes/sector) x (avg. # sectors/track) x (# tracks/surface) x (# surfaces/platter) x (# platters/disk)
Example) Given
512 bytes/sector
300 sectors/track (on average)
20,000 tracks/surface
2 surfaces/platter
5 platters/disk
Capacity = 512 x 300 x 20000 x 2 x 5 = 30,720,000,000 = 30.72 GB
>Disk Access Time Component
> Disk Access Time
Average time to access some target sector approximated by :
T(access) = T(avg_seek) + T(avg_rotation) + T(avg_transfer)
# Seek time
Time to position heads over the track containing target sector.
Typically 9ms
# Rotational latency
Time waiting for first bit of target sector to pass under r/w head.
½ x 1/RPMs x 60 sec/1min
# Transfer time
Time to read the bits in the target sector.
1/RPM x 1/(avg #sectors/track) x 60sec/1min
# Important points
- Access time dominated by seek time.
- First bit in a sector is the most expensive, the rest are free.
- SRAM access time is about 4 ns/doubleword, DRAM about 60 ns
- Disk is about 40,000 times slower than SRAM,
- 2,500 times slower then DRAM
> I/O Bus
컴퓨터의 여러 I/O device를 연결
> Solid State Disks
>SSD Performance Characteristics
> SSD Tradeoffs vs. Rotating Disks
> The CPU-Memory Gap
Memory 간의 속도 gap을 매꾸기 위해 여러 기술이 사용
> Locality
# Principle of Locality (지역성의 원리)
# Temporal locality (시간적 지역성); 최근의 instruction이 다시 실행될 가능성이 높다.
# Spatial locality (공간적 지역성); 근처의 instruction이 다시 실행될 가능성이 높다.
> Memory Hierarchies
locality of program을 파악해서 Memory Hierarchy에 맞는 메모리를 할당한다.
> Caching
# Cache; 자주 사용하는 데이터나 값을 미리 복사해 놓는 임시 장소
캐시는 저장 공간이 작고 비용이 비싼 대신 빠른 성능을 제공
# Hit
# Miss
- Placement policy
- Replacement policy; LRU(최근에 쓰이지 않은 block을 victim으로 설정)
'소프트웨어 전공 > 시스템 프로그램' 카테고리의 다른 글
[System Program] [7] [Virtual Memory] (0) | 2021.05.31 |
---|---|
[System Program] [9] Concurrent Programming (0) | 2021.05.31 |
[System Program] [5] Exceptions and Processes (0) | 2021.05.30 |
[System Program] [4] Cache Memory (0) | 2021.05.30 |
[System Program] [1] Data Presentation (0) | 2021.05.25 |