Flash Storage
Types
NOR Flash
- Fast read
- Slow write
- very slow erase
- Durability issue : 특정 cycle 이상 쓰면 damaged
NAND Flash
- NOR보다 Denser, Cheaper
- slow read / write / erase
- Durability issue : 특정 cycle 이상 쓰면 damaged
Flash memory overview

- Single / Multiple bits per cell
- Page : minimum unit of read / write
- Block : minimum unit of erasing
Operations
Read
Write
- 1 -> 0 transition만 가능 (empty page : 싹다 1)
Erase
SLC vs MLC

- performance 차이
- reliability 차이
FTL : Flash Translation Layer
overview

User
FTL
- logical -> physical mapping
- wear leveling
- address translation
- garbage collection
Flash
- page 단위로 쓰기
- block 단위로 erase
FTL Function 1. Flash address mapping

Type 1. per-page mapping
- flexible
- large table
- good space utilization
- mapping table size = page 수 * table entry size
Type 2. per-block mapping
- small table
- write-amplification issue (1번 write했는데 write가 여러번 발생)
- mapping table size = block 수 * table entry size

FTL Function 2. Erase before program
상황 : 한 block 내에서 A,B page가 modified되었을 때.

valid page는 다른 block으로 모조리 옮긴 뒤, 해당 block을 erase

FTL Function 3. Wear-leveling
block마다 erase횟수 세는 counter 존재 -> erase 수 비슷하게 맞춰준다
