1 Flash Memory based Storage (CSE598D) Thursday April 5, 2007 Youngjae Kim.

Slides:



Advertisements
Similar presentations
Paging: Design Issues. Readings r Silbershatz et al: ,
Advertisements

Flash storage memory and Design Trade offs for SSD performance
Trading Flash Translation Layer For Performance and Lifetime
CMPE 421 Parallel Computer Architecture MEMORY SYSTEM.
What is memory? Memory is used to store information within a computer, either programs or data. Programs and data cannot be used directly from a disk or.
Chapter 11: File System Implementation
Avishai Wool lecture Introduction to Systems Programming Lecture 8.3 Non-volatile Memory Flash.
Embedded Real-Time Systems Design Selecting memory.
Overview: Memory Memory Organization: General Issues (Hardware) –Objectives in Memory Design –Memory Types –Memory Hierarchies Memory Management (Software.
IT Systems Memory EN230-1 Justin Champion C208 –
Data Storage Technology
Solid State Drive Feb 15. NAND Flash Memory Main storage component of Solid State Drive (SSD) USB Drive, cell phone, touch pad…
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
Operating Systems CMPSC 473 I/O Management (2) December Lecture 24 Instructor: Bhuvan Urgaonkar.
Physical Memory By Gregory Marshall. MEMORY HIERARCHY.
Slide 1 Windows PC Accelerators Reporter :吳柏良. Slide 2 Outline l Introduction l Windows SuperFetch l Windows ReadyBoost l Windows ReadyDrive l Conclusion.
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
Computing Hardware Starter.
Flash memory Yi-Chang Li
Chapter 10 Storage and File Structure Yonsei University 2 nd Semester, 2013 Sanghyun Park.
Origianal Work Of Hyojun Kim and Seongjun Ahn
1. Memory Manager 2 Memory Management In an environment that supports dynamic memory allocation, the memory manager must keep a record of the usage of.
/38 Lifetime Management of Flash-Based SSDs Using Recovery-Aware Dynamic Throttling Sungjin Lee, Taejin Kim, Kyungho Kim, and Jihong Kim Seoul.
Speaker: 吳晋賢 (Chin-Hsien Wu) Embedded Computing and Applications Lab Department of Electronic Engineering National Taiwan University of Science and Technology,
Lecture No 11 Storage Devices
STORAGE DEVICES Presentation By: Saurabh Mishra. A data storage device is a device for recording (storing) information (data). CD, Hard Disk and Flash.
Overview of Physical Storage Media
3 Computing System Fundamentals
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Memory.
DFTL: A flash translation layer employing demand-based selective caching of page-level address mappings A. gupta, Y. Kim, B. Urgaonkar, Penn State ASPLOS.
Design of Flash-Based DBMS: An In-Page Logging Approach Sang-Won Lee and Bongki Moon Presented by Chris Homan.
Embedded System Lab. Jung Young Jin The Design and Implementation of a Log-Structured File System D. Ma, J. Feng, and G. Li. LazyFTL:
+ CS 325: CS Hardware and Software Organization and Architecture Memory Organization.
Virtual Memory Virtual Memory is created to solve difficult memory management problems Data fragmentation in physical memory: Reuses blocks of memory.
Design of Flash-Based DBMS: An In-Page Logging Approach Sang-Won Lee and Bongki Moon Presented by RuBao Li, Zinan Li.
Storage Structures. Memory Hierarchies Primary Storage –Registers –Cache memory –RAM Secondary Storage –Magnetic disks –Magnetic tape –CDROM (read-only.
Computer Systems Week 14: Memory Management Amanda Oddie.
Operating Systems CMPSC 473 I/O Management (3) December 07, Lecture 24 Instructor: Bhuvan Urgaonkar.
Paging (continued) & Caching CS-3013 A-term Paging (continued) & Caching CS-3013 Operating Systems A-term 2008 (Slides include materials from Modern.
© GCSE Computing Computing Hardware Starter. Creating a spreadsheet to demonstrate the size of memory. 1 byte = 1 character or about 1 pixel of information.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Lecture 22 SSD. LFS review Good for …? Bad for …? How to write in LFS? How to read in LFS?
A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in computer where data is to be processed.
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
Memory The term memory is referred to computer’s main memory, or RAM (Random Access Memory). RAM is the location where data and programs are stored (temporarily),
Jeffrey Ellak CS 147. Topics What is memory hierarchy? What are the different types of memory? What is in charge of accessing memory?
XIP – eXecute In Place Jiyong Park. 2 Contents Flash Memory How to Use Flash Memory Flash Translation Layers (Traditional) JFFS JFFS2 eXecute.
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
Application-Managed Flash
 The emerged flash-memory based solid state drives (SSDs) have rapidly replaced the traditional hard disk drives (HDDs) in many applications.  Characteristics.
COS 518: Advanced Computer Systems Lecture 8 Michael Freedman
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Chapter 2 Memory and process management
Memory COMPUTER ARCHITECTURE
Chapter 11: File System Implementation
Main Memory Management
McGraw-Hill Technology Education
COS 518: Advanced Computer Systems Lecture 8 Michael Freedman
Main Memory Background Swapping Contiguous Allocation Paging
Chap. 12 Memory Organization
2.C Memory GCSE Computing Langley Park School for Boys.
Contents Memory types & memory hierarchy Virtual memory (VM)
McGraw-Hill Technology Education
Page Cache and Page Writeback
COS 518: Advanced Computer Systems Lecture 9 Michael Freedman
Dong Hyun Kang, Changwoo Min, Young Ik Eom
Presentation transcript:

1 Flash Memory based Storage (CSE598D) Thursday April 5, 2007 Youngjae Kim

2 Disk Drive vs. Flash Memory Read / Write (+) Lost cost per bit (-) Mechanical movement (SPM & VCM) (-) High power consumption (10-15W) (-) Heavy weight compared to flash Read / Program / Erase (+) Random Access (+) Non-volatile (+) Low Power Consumption (2W) (-) Erase before Write (-) Erasing operation in the unit of block (not page) (-) Maximum # of erase operations per cell (-) High cost per bit

3 MOS (Metal-Oxide Semiconductor) Memory Hierarchy

4 History of Flash Memory

5 NOR and NAND Flash Array (a) NOR (b) NAND

6 NOR and NAND Flash Array

7 NAND Flash Memory – Program/Erase F-N tunneling –Give a higher voltage and electrons are trapped through gate into floating gate transistor.

8 Flash Memory Comparison NOR (Code Executable in Place like Memory) –Fast read and slow write NAND (Data-storage) –Fast write and lower cost Flash TypePerformanceApplication Code Storage NOR -Intel/Sharp -AMD/Fujitsu/Toshiba Important: -High Random Access -Byte Programming Acceptable: -Slow Programming -Slow Erasing Program Storage -Cellular Phone -DVD, Set TOP Box for BIOS File Storage NAND -Samsung/Thoshiba Important: -High Sped Programming -High Speed Erasing -High Speed Serial Read Acceptable: -Slow Random Access Small form factor -Digital Still Camera -Silicon Audio, PDA -Mass storage as Silicon Disk-Drive

9 NAND Flash Non-Volatile Flash Cards Various Standard Memory Cards

10 Functional Block Diagram for SAMSUNG K9K8G08U0M NAND Flash

11 Array Organization for SAMSUNG K9K8G08U0M NAND Flash Block: Erasing Unit Page: Addressable Unit

12 NAND Flash Technology

13 Comparison for Different Memory Types Design and evaluation of the compressed flash translation layer for high-speed and large-scale flash memory storages Proc. SoC Design Conference, pp , September, 2003

14 Outline Flash Memory Technology –NAND vs. NOR Block Mapping Schemes –Emulating Disk with Flash Memory Garbage Collection Hybrid Hard Drives –Window Vista

15 NAND Type Flash Memory Operation –Read / Write Page unit (Size of a page = Size of a sector (512B) in hard drive) –Erase Block unit (A set of pages) Characteristics –Not in-place update Erase an entire erase block for in-place update of page Original block Free block 1. Update page 0 in free block 2. Copy the rest of Pages (1,2,3,4) 3. Obsolete original block

16 Block-Mapping Technique (1/2) Emulate Block device (Disk-Drive) with Flash Memory –In traditional disk drive, 1.File system calls a device drive, requesting block read/write 2.Device driver stores the data and retrieve it from flash device Problems in Simple Linear Mapping –Lifetime shortening of flash memory by the limit of write operations 100,000 – 1,000,000 per cell –High risk of data loss due to the size difference between file system data block and erase block unit of flash

17 Block-Mapping Technique (2/2) Maximum number of write operation –Some data block may be written much more than others No problem in hard drive Operation time to the cell get slow down => wear and burn out Data loss risk from size difference between data block and erase unit in flash –Example Copy an entire unit (128KB) into RAM and modify 4KB while erasing the entire unit and write back. But, power loss –(128KB + 4KB) data loss

18 Block-Mapping Idea (1/2) Maintain mapping table –Virtual Block # - Physical Flash Address (Sector) Update Process 1.Do not overwrite the sector, instead, write to another free sector 2.Update mapping table (+) Evenly distribute the wear of erase units (+) Fast write (because of not-erasing process) (+) Minimize data loss when power off (possibly revert to the previous state) Write Process 1.Search for a free/erased sector 2.Initially, all the bits for (Sector and Header) should be 1s. 3.Clear free/used bit 4.Write virtual block # into the header and then write data in the sector 5.Clear prevalid/valid bit 6.Clear valid/obsolete bit of previous sector

19 Block-Mapping Idea (2/2) Power off during write operation (Case 1) If the power off occurs before new sector is set to be valid then ignore the data written (Case 2) Even if new sector is set valid, but if the power is off before the previous sector becomes obsolete, then both of them are valid. Select any one according to their versioning numbers

20 Data Structure for Mapping

21 Flash Translation Layer Fully emulate magnetic disks with flash memory –Support random-access Two features of flash memory –Erase before write –Erase unit size (block) is not the same as read/write size (page). File System Block Device Driver HOST Flash Device Controller ROMRAM Flash Memory IDE, SCSI

22 Page-Level Mapping Logical Sector Number to Physical Sector Number Limitation –Large SRAM => High Cost

23 Block-Level Mapping Logical Block Number to Physical Block Number + Offset 2 3 Limitation –Involving extra flash memory operation with write requests

24 Hybrid Approach (Page + Block) Write Trace Page Block Replace Block Log-Block

25 Garbage Collection To make spare for new and update blocks –Obsolete sectors must be reclaimed. –To reclaim a sector is done by erasing an entire unit. (Reclamation operates on entire erase units.) Reclamation –In background (e.g., when CPU is idle) –On-demand (e.g., when no free sectors) –Goal Wear-leveling Efficient reclamation Reclaiming process 1.Select erase units for reuse 2.Copy valid sectors (within an erasing unit) 3.Update mapping table 4.Erase the reclaimed erase units and add them to sector-reserve

26 Wear Leveling Limitation –Maximum number of erases/writes per cell (10K – 1M) Reliability of cell decreases (e.g., bad block). Wear Leveling –To evenly distribute the cell usages over the cells –Wear-Leveling versus Efficiency They are contradictory. For, example, erasing unit containing STATIC data –For efficiency, it should not be reclaimed because any storage is not free up. –For wear-leveling, it should be reclaimed because it reduces the wear of other units.

27 Wear-Centric Reclamation (1/3) [Lofgren et al. 2000, 2003] Sector: Free Sector: Valid Counter Sector: Free Counter Sector: Valid Sector: Free Sector: Invalid Sector: Valid Counter Most Worn-Out Unit (Reclaimed) Least Worn-Out Unit Spare Unit 2 3 Using an erase counter of erase unit 1.When the most worn-out unit is reclaimed, its counter is compared to that of the least worn-out unit. 2.If greater than threshold (e.g.,15,000), the contents of the most worn out unit are copied to the least worn out unit. And the most worn-out unit becomes spare. 3.Otherwise, just keep going as it does Wear-leveling –Moving static blocks to worn-out sectors –Usually sector with static data is least-worn out unit 1 Flash

28 Wear-Centric Reclamation (2/3) [Jou and Jeppesen III 1996] Sector: Free Sector: Valid Sector: Free Reclaimed Unit 1 Free Unit 3 Sector: Free Sector: Valid Sector: Free Reclaimed Unit 0 1 Free Unit Priority queue sorted by wear U1U Using the wear (number of erasure) –The valid contents of erase unit reclaimed are copied to another unit. –But, the unit is not erased immediately –It’s marked as erasure unit and added to queue of erase candidate (RAM) –The queue is sorted by wear –Whenever system needs a free unit and the unit with least wear is erased Flash RAM

29 Other Wear-Centric Reclamations (3/3) Using erase latencies [Han 2000] –Erase latency increases with wear. –Erase times are used to rank erase unit by wear. –It avoids to store erase counters. Randomized wear-leveling [Woodhouse 2001] –Every 1000 th reclamation, a unit containing only valid data is selected. –Pros and Cons (+) Moving static data from units with little wear to units with more wear (-) Extreme wear imbalance can occur. (e.g., a little worn-out unit with invalid data many never be reclaimed.)

30 Wear-Leveling with Efficient Reclamation (1/2) Using a weighted benefit/cost [Kawaguchi et al. 1995] –Benefit: the amount of invalid space in the unit –Cost: the need to read the valid data and to write back elsewhere –Weight: the age of the block, time since last invalidation Large weight → the remaining valid data are relatively static. benefit cost X weight

31 Wear-Leveling with Efficient Reclamation (2/2) Using Hot block and Cold block [Kawaguchi et al. 1995] –Cold block: Block allocated with low wear level –Hot block: Block with high wear level –Observation Units with dynamic data tend to be almost empty upon reclamation. Static units do not need to be reclaimed at all. Flash Cold BlocksHot Blocks 1 Free Blocks 2

32 Hybrid Hard Disk (HDD) Seagate’s ReadyDrive –HDD Prototype of Samsung & Seagate for Labtop (WinHEC conf. 2006) –128 MB NAND Flash Memory in hard disk Store frequently accessed sectors of data for quick reads (e.g., FAT table) –Flash is used to make less frequent disk power down and up. –Advantages Reliability, Power-Efficient, and Improved Performance Experiment –Run Office Applications –Spun up every three and four minutes –10% power saving (May 24, 2006)

33 Seagate’s 5400 RPM Hybrid Hard Drive 160 GB of regular perpendicular (PMR) space 256 KB flash memory It is for Windows Vista in Q

34 NAND Flash: Possible to replace the existing hard disks? This is suitable for mobile device. –Mobile device (e.g., Portable Digital Player, Cell Phone, etc.) Most applications are media (audio, video, etc.) Reads are dominate rather than writes. How about for server disk? –High cost/Large capacity for NAND flash, compared to traditional disk 64GB flash disk (Samsung, 2006) vs. 300GB Seagate Cheetah 15K.5 –Low reliability of data because of wear-out Many writes could wear out the cells.

35 FLASHCACHE [HCSS’94] DRAM Management –LRU block replacement Flash Management –Segment = A set of blocks/Erasing unit –Segment list (Free/Clean/Dirty) –Segment replacement (FIFO or LRU) Disk Management –Power management by spin up/down

36 eNVy [ASPLOS’94]

37 eNVy [ASPLOS’94] Write operation –Flash memory: Copy-on-write operation –SRAM is used as a Write Buffer for fast writes on flash. –Page replacement on SRAM: FIFO Page-mapping (logical to physical addresses) on SRAM

38 NVCache [MASCOTS’06] To reduce the power consumption of disk NVCache –To reduce disk power consumption by combining adaptive disk spin-down algorithm –To extend spin-down periods by undertaking in NVCache

39 Non-volatile Memory File Systems JFFS2 (Journaling Flash File System) –Built-in linux kernel after 2.4.X –JFFS1 (1999) → JFFS2 (2001) → JFFS3 (on- going)

40 Non-volatile Memory File Systems Using NVRAM at file system level –Conquest file system [USENIX’02] Persistent RAM (a sort of NVRAM) NVRAM stores “metadata”, “small files”, “executables”, and “shared libraries”. –HeRMES file system [HotOS’01] Magnetic RAM (a sort of NVRAM) NVRAM stores “metadata” and “small data / a few of first blocks”. –(+) reduce metadata overhead for writes/reads to improve performance NVRAM is use for write cache. –(+) enhance write performance (by buffering and reordering writes)