플래시메모리시스템소프트웨어기술 류연승 2008 10
Contents Introduction NAND Flash Memory Architecture Software for NAND Flash Memory Conclusion - 2/34 -
We have entered an era of virtually unlimited storage, enabling the lifetime store Memex As We May Think, Vannevar Bush, 1945-3/34 -
MyLifeBits Project (http://researchmicrosoftcom/barc/mediapresence/mylifebitsaspx ) MyLifeBits is a lifetime store of everything It is the fulfillment of Vannevar Bush's 1945 Memex vision including fulltext search, text & audio annotations, and hyperlinks 1TB gives you 65+ years of: 100 email messages a day (5KB each) 100 web pages day (50KB each) 5 scanned pages a day (100KB each) 1 book every 10 days (1 MB each) 10 photos per day (400 KB JPEG each) 8 hours per day of sound - eg telephone, voice annotations, and meeting recordings (8 Kb/s) 1 new music CD every 10 days (45 min each at 128 Kb/s) - 4/34 -
Ubiquitous Storage The Solid Advantage (Source : Toshiba SD Presentation 2000 920) - 5/34 -
NAND Flash Memory Products Memory Card MMC (Multi Media Card) CF (Compact Flash) SMC (Smart Media Card) SD (Secure Digital), XD (extreme Digital) Memory Stick DOM (Disk On Module) Flash Disk(SSD) USB Memory - 6/34 -
Flash memory vs HDD - 7/34 -
SSD (Solid State Disk) - 8/34 -
SSD(Solid State Disk) vs HDD Seagate Baracuda ES2 ST3250310NS Samsung MLC SSD Capacity 250GB 250GB Sustained read rate 105 MB/s 200 MB/s Sustained write rate 105 MB/s 160 MB/s Average read/write time 85ms/85ms 160us/800us Power consumption - read/write - idle 106W 80W 041W 032W Weight 510g 754g - 9/34 -
SSD vs HDD 18 for Notebook computer - 10/34 -
저장장치의가격비교 $400 (2004 8) $260 (2004 8) $100 (2007 9) 8GB SD $100 (2007 9) $120 500GB (2007 9) Source : http://wwwhitachigstcom/hdd/technolo/overview/chart03html - 11/34 -
- 12/34 -
Introduction Memory Technology - 13/34 -
Flash memory vs HDD Access time comparison - 14/34 -
NAND flash memory architecture - 15/34 -
Characteristics of Flash Memory 플래시메모리장점 비휘발성 (Nonvolatile) 빠른접근속도 (Fast access speed) 저전력소비 (Low power consumption) 충격에강함 (Shock resistance) 작은크기 (Small size) 적은중량 (Light weight) 주요특징 ( = 문제점 ) 데이터를쓰기전에먼저지워야 (erase) 한다 삭제연산의횟수가제한적 ( 10 6 ) 읽기와쓰기속도가다르다 Erase(100X) > Write(10X) > Read(1X) 읽기 / 쓰기단위의크기와삭제단위의단위가다르다 Read/write : page Erase : block - 16/34 -
NAND flash memory architecture blocks and pages main spare 32 pages in a block 512B+16B in a page Three basic operations Read Block 0 Page 0 Page 1 Page 2 Page 3 Page 4 Page 31 512 512 512 512 512 16 16 16 16 16 Write (program) Erase Block 1 Data unit of operations read/write : page erase : block Block N-1-17/34 -
NAND flash memory architecture Small block NAND Large block NAND/OneNAND Block 0 Page 0 Page 1 Page 2 Page 3 Page 4 Page 31 main 512 512 512 512 512 Spare 16 16 16 16 16 Block 0 P 0 P 1 P 2 P 63 main Sector n Sector n+1 Sector n+2 Sector n+3 512 512 512 512 512 512 512 512 512 512 512 512 Spare 64 64 64 Block 1 Block 1 Block N-1 Block M-1-18/34 -
OneNAND flash memory architecture monolithic integrated circuit with a NAND Flash array using a NOR Flash interface Flash Array : (2K+64)B page size, (128K+4K)B block size BootRAM : 1KB 2 DataRAM : 4KB OTP(One Time Programmable) : 1 block area for secured user information - 19/34 -
Software for NAND flash memory - 20/34 -
Software Architecture for NAND Software layer Applications Operating System File Systems FTL (Flash Translation Layer) FTL (Flash Translation Layer) NAND Controller NAND Flash Memory - 21/34 -
Examples Samsung TFS4 Architecture - 22/34 -
Examples : Linux - 23/34 -
Examples : Software of Flash Memory Card - 24/34 -
FTL (Flash Translation Layer) FTL 이란? 플래시메모리장치를제어하는소프트웨어 (device driver) Functions Bad block management Error correction code (ECC) Logical-to-physical addressing Garbage collection Power-off recovery Wear-leveling - 25/34 -
Logical-to to-physical addressing (1/3) 고려사항 데이터변경을하려면, 먼저블록을삭제해야한다 한바이트라도변경하려면삭제연산이필요함 삭제연산은속도가느려서데이터변경성능을떨어뜨린다 out-of-place update 메카니즘 FTL 은변경을원래위치가아닌다른위치에수행하므로서성능을좋게해준다 ( 삭제연산을즉시하지않음 ) 원래위치의데이터는나중에 garbage collection 을수행하여삭제해준다 - 26/34 -
Logical-to to-physical addressing (2/3) Page Mapping Space overhead for page map table Logical Page Number Logical Page # 0 1 31 32 1 63 Physical Page # Page # 2 5 Page # Page # Page # Page # Mapping table update 1 23 3 4 2 64 65 95 Page # Page # Page # Page map table Flash memory - 27/34 -
Logical-to to-physical addressing (3/3) Block mapping Copy overhead during write operation Logical Address Logical Block Number Page # Logical Block # 0 1 31 32 1 63 Physical Block # Block # Block # Block # Block # Block # Block # + + 1 2 3 4 1 2 3 4 64 65 95 Block # Block # Block # Block map table Flash memory - 28/34 -
Garbage Collection 1 Select a victim block to clean 2 Copy valid pages in the victim block to free block 3 Erase the victim block 1 Select a victim block 2 copy valid pages block block block 3 erase the victim block invalid page valid page - 29/34 -
Wear leveling To maximize the life cycle of a NAND device Wear-leveling algorithm is mandatory 0 block program 23 1 block program 24 program 29 program 25 data 28 n-1 block data 1999 High probability to be worn out! n block program 23-30/34 -
FTL schemes Patents A Ban Flash File System, USA Patent # 5,404,485, Apr 1995 USA Patent # 5,937,425 (M-system) : Replacement Block scheme Korea Patent Application # 10-2000-0059731: Samsung SSR Korea Patent Application # 10-2004-0070322 : Shared Log Block scheme Linux MTD http://wwwlinux-mtdinfradeadorg/ NFTL, TrueFFS (M system) http://wwwm-syscom XSR (Extended Sector Remapper) (Samsung) - 31/34 -
FTL schemes Log Block scheme (by SNU, 2002) A Space-efficient Flash Translation Layer for CompactFlash Systems, IEEE Trans on Consumer Electronics, Vol 48, No 2, 2002 A Flash Compression Layer for SmartMedia Card (by Ban, 2004) Shared Log Block scheme (by Ryu, 2005) Korea Patent Application # 10-2004-0070322 (2006 년 8 월등록 ) Improvement of Space Utilization in NAND Flash Memory Storages, Workshop on Intelligent Storage System and Technology (LNCS 3820), Dec 2005-32/34 -
File systems for flash memory FAT (File Allocation Table) JFFS (Journaling Flash File System) http://sourcesredhatcom/jffs2/ YAFFS (Yet Another Flash File System) http://wwwaleph1couk/yaffs/indexhtml MFFS (Microsoft Flash File System) TFS, RFS, UniStore, PocketStore (Samsung) - 33/34 -