930 likes | 960 Views
Storage Systems. 郭大維 教授 ktw@cs ie . nt u.edu.tw 嵌入式系統 暨無線網路 實驗室 (Embedded Systems and Wireless Networking Laboratory) 國立臺灣大學資訊工程學系. Reading: Kam-yiu Lam and Tei-Wei Kuo, “Real-Time Database Systems: Architecture and Techniques”, Kluwer Academic Publishers, 2000
E N D
Storage Systems 郭大維 教授 ktw@csie.ntu.edu.tw 嵌入式系統暨無線網路實驗室 (Embedded Systems and Wireless Networking Laboratory) 國立臺灣大學資訊工程學系 Reading: Kam-yiu Lam and Tei-Wei Kuo, “Real-Time Database Systems: Architecture and Techniques”, Kluwer Academic Publishers, 2000 Krishna and Kang, “Real-TimeSystems,” McGRAW-HILL, 1997.
Storage Systems Real-Time Disk Scheduling Flash-Memory Storage Systems
Real-Time Disk Scheduling • Motivation: Disparity between CPU and disk speed. • access time =queuing time + seek time + latency delay + transfer time • Strategies to improve the performance of disk service: • First-come-first-served (FCFS) algorithm*: • Poor because of no consideration in deadlines and arm movements. • Earliest-deadline-first (EDF) algorithm: • Not optimum in minimizing the number of transaction deadlines missed. 380 390 1 4 Requests Deadlines Track 1 20 390 2 40 1 3 60 380 4 80 4 Track Embedded Systems and Wireless Networking Lab.
Real-Time Disk Scheduling • Scan (or elevator) algorithm*: • Start at one end of the disk, and moves toward the other end, servicing requests as it reaches each track, until it gets to the other end of the disk. At the other end, the direction of head movement is reversed and servicing continues. • Bad for service requests at either end of a disk. • C-Scan (Circle Scan) algorithm*: • Goal: Provide a more uniform wait time. • As does Scan scheduling, servicing requests as it goes. However, when the head reaches one end, it immediately returns to the beginning of the disk. 5 30 70 150 225 295 399 Track queue=295, 30, 150 queue=5, 70, 225 Embedded Systems and Wireless Networking Lab.
Real-Time Disk Scheduling • Shortest-seek-time-first (SSTF)algorithm*: • A greedy algorithm which always selects the request with the minimum seek time from the current request queue. • Starvation of some requests... • A variation of SCAN: • Classify requests into classes. • Service requests in the same class in terms of SCAN. • Service classes in order of their priorities. • Q: How many priority levels are enough, and how to partition them? 5 30 70 150 225 305 399 Track queue=305, 30, 5, 225 queue=305, 150 * It means no consideration of deadlines. Embedded Systems and Wireless Networking Lab.
Real-Time Disk Scheduling • A weighted scheduling algorithm: • Sort requests in the waiting queue in the increasing order of their deadlines. • Each request is assigned a weight wi depending on their order in the queue. • Let di be the distance the arm has to move from its current position to serve the request. • Consider q requests at a time to reduce the algorithm complexity. • Service the request with the highest priority pi = 1/ (wi di) • Q: How to assign processes weights wi? • A variation of the weighted scheduling algorithm: • Motivation: Consider deadline instead of deadline order! • Service the request with the highest priority pi = f(di , di) = a di + (1-a) di . a is a design factor, and choosing a in the range 0.7 to 0.8 looks good. Reading: A. Silberschatz and P.B. Galvin, “Operating System Concepts,” 4th Ed., Addison-Wesley Publishing Company, 1994. C.M. Krishna and K.G. Shin, “Real-TimeSystems,” McGRAW-HILL, 1997. S. Chen, J.A. Stankovic, J.F. Kurose, and D.F. Towsley, “Performance Evaluation of Two New disk scheduling Algorithms for Real-Time Systems,” J. of Real-Time Systems, 3(3):307-336, 1991. Embedded Systems and Wireless Networking Lab.
Real-Time Disk Scheduling • Another paper for discussion: • A.L. N. Reddy and J.C. Wyllie, “I/O Issues in Multimedia System,” IEEE Transactions on Computers, March 1994. Embedded Systems and Wireless Networking Lab.
Flash-Memory Storage Systems 郭大維 教授 ktw@csie.ntu.edu.tw 嵌入式系統暨無線網路實驗室 (Embedded Systems and Wireless Networking Laboratory) 國立臺灣大學資訊工程學系
Agenda • Introduction • Management Issues • Performance vs Overheads • Other Challenging Issues • Conclusion Embedded Systems and Wireless Networking Lab.
Introduction – Why Flash Memory • Diversified Application Domains • Portable Storage Devices • Consumer Electronics • Industrial Applications • SoC and Hybrid Devices • Critical System Components Embedded Systems and Wireless Networking Lab.
Trends in VLSI Technology Source: www.icknowledge.com Embedded Systems and Wireless Networking Lab. * This slide was from the ASP-DAC’06 talk delivered by Prof. Sang L. Min from the Seoul National University.
January 3, 2020 12 Trends in Flash Memory Development • Significant dropping of the price per GB – More than 40% per year • Exponential increasing in the density and capacity Source: IDC, Jun 2007 IBM Journal of Research and Development, Nov 2008
January 3, 2020 13 Trends in Flash Memory Development • Market size: More than 15 billions US dollars in 2008 • Revenue growth: More than 10% in 2008 IC Technology, NAND Flash CostTrend, 2008 Source: iSuppli, Apr 2008
Introduction – Trends in Storage Technology September 2006 Samsung 2GB USB 2.0 Flash Drive Price: $49.99 Less Rebate: - $25.00 Final Price:$24.99* T-One 2GB Microdrive/3600RPM $144.99 Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005 Embedded Systems and Wireless Networking Lab.
Introduction – Trends in Storage Technology March 2007 Transcend 8GB CompactFlash Card Price: $84.85 ScanDisk 4GB CompactFlash Card Price: $55.99 Microdrive 4GB Compact Flash Type II Price: $116 Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005. Amazon.com Embedded Systems and Wireless Networking Lab.
Trends – Storage Media March 2008 Seagate ST302504FDA1E1-RK FreeAgent Desktop 250 GB USB External Hard Drive (USD79.99) HITACHI 6GB Microdrive MD6GBBP (USD169.95) Transcend 8GB SDHC SD CARD (USD30.30) Transcend 32GB SSD, 2.5- Inch, SATA, MLC (USD343.30) Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005 Component Times, Nov 2007. * Parts of this slide was from the ASP-DAC’06 talk delivered by Prof. SangLyul. Min from the Seoul National University. Embedded Systems and Wireless Networking Lab.
Trends – Storage Media Seagate FreeAgent 500GB 3.5-Inch USB 2.0 Hard Drive ST305004FDA1E1-RK (USD85.99) HITACHI 6GB Microdrive MD6GBBP (USD149.99) 20Gb IBM HDD Transcend 8GB SDHC SD CARD (USD19.95) Transcend 32GB SSD, 2.5- Inch, SATA, MLC (USD92.24) • October 2008 Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005, and Component Times, Nov 2007. The first commercial flash chip was presented by Toshiba in 1985 as a 256Kbit chip, where 1Mb DRAM was introduced in 1986. All Rights Preserved, Tei-Wei Kuo, National Taiwan University * Parts of this slide was from the ASP-DAC’06 talk delivered by Prof. SangLyul. Min from the Seoul National University.
Trends – Storage Media Seagate FreeAgent Desk 1 TB USB 2.0 Hard Drive ST310005FDA2E1-RK (USD119.99) 4GB HITACHI MICRODRIVE CF+ TYPE II TRAVEL KIT (MD4GB/ A HMS360604D5CF00) (USD25.00) Transcend 2.5" SSD 64 GB SATA-II (USD144.12) Transcend 16GB SDHC SD CARD (USD39.50) • May 2009 Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005, and Component Times, Nov 2007. The first commercial flash chip was presented by Toshiba in 1985 as a 256Kbit chip, where 1Mb DRAM was introduced in 1986. All Rights Preserved, Tei-Wei Kuo, National Taiwan University * Parts of this slide was from the ASP-DAC’06 talk delivered by Prof. SangLyul. Min from the Seoul National University.
Trends – Storage Media Seagate FreeAgent Desk 1.5 TB USB 2.0 Hard Drive ST315005FDA2E1-RK (USD145.77) 4GB HITACHI MICRODRIVE CF (USD19.00) Transcend 128 GB SATA-2 2.5-inch Solid State (USD283.99) Transcend 16GB SDHC SD CARD (USD36.49) • November 2009 Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005, and Component Times, Nov 2007. The first commercial flash chip was presented by Toshiba in 1985 as a 256Kbit chip, where 1Mb DRAM was introduced in 1986. All Rights Preserved, Tei-Wei Kuo, National Taiwan University * Parts of this slide was from the ASP-DAC’06 talk delivered by Prof. SangLyul. Min from the Seoul National University.
Trends – Storage Media Western Digital WD Elements 2 TB USB 2.0 Desktop External Hard Drive WDBAAU0020HBK-NESN (USD109.99) Kingston SSDNow V Series 128 GB SATA 2.5- Inch Solid State Drive (USD224.35) Transcend 32GB SDHC SD CARD (USD50.99) • November 2010 Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005, and Component Times, Nov 2007. The first commercial flash chip was presented by Toshiba in 1985 as a 256Kbit chip, where 1Mb DRAM was introduced in 1986. All Rights Preserved, Tei-Wei Kuo, National Taiwan University * Parts of this slide was from the ASP-DAC’06 talk delivered by Prof. SangLyul. Min from the Seoul National University.
2,000,000 Miles Per Hour Fly By Night Boeing747 The Ultimate Limit on Mechanical Devices • A Microdrive Example 1/100” Flying Height Source: http://www.hitachigst.com/ Source: Richard Lary, The New Storage Landscape: Forces shaping the storage economy, 2003. Embedded Systems and Wireless Networking Lab. * This slide was from the ASP-DAC’06 talk delivered by Prof. Sang L. Min from the Seoul National University.
Flash Makers – NAND Flash Memory [EE Times,11/30/2007] For years, NAND prices have dropped by an average of 40 percent or more per year. Source: iSuppli Corp (Unit: Million Dollars) http://hugoleijtens.spaces.live.com/blog/cns!4B94B7453D4BFD9E!988.entry Embedded Systems and Wireless Networking Lab.
Flash Stories – Solid-State Disks • < 50% Heat, Ultra Silence, Light Weight, MTTF – 200M hours (HDD – 30M hours), Energy Efficiency IDC, SanDisk - Component Times, Nov 2007 Embedded Systems and Wireless Networking Lab.
Flash Stories – Flash Wars • Fab • 300mm Wafer Fab by Toshiba and SanDisk at Yokkaichi, Japan • 80,000 Wafers per Month (2008) • 210,000 Wafers per Month • 300mm Wafer Fab by IM Flash Technologies (Intel & Micron) at Utah • Joint Venture: Sony and Qimonda, Hynix and Sandisk • Technology • 32nm (Samsung, Intel), 43nm (Toshiba), 50nm (IM) Embedded Systems and Wireless Networking Lab.
Introduction – The Characteristics of Storage Media 13X 83X 67X 390X Reference Devices/Modules: DRAM: DDR-400. NOR FLASH: Silicon Storage Technology SST39LF010. NAND FLASH: Samsung K9K8G08U0M. Disk: Seagate ST31000333AS
Non-Volatile Memory Macronix International Co., Component Times, Nov. 2007 Embedded Systems and Wireless Networking Lab.
Control Gate Drain Source IDS Selected cell Introduction – Single-Level Cell (SLC) • Each Word Line is connected to control gates. • Each Bit Line is connected to the drain. Cell NOR Flash All Rights Preserved, Tei-Wei Kuo, National Taiwan University
Introduction – Single-Level Cell (SLC) • NAND accesses each cell through adjacent cells, while NOR allows for individual access to each cell.1 • The cell size of NAND is almost half the size of a NOR cell. * "Flash Memory Moves from Niche to Mainstream," Chip Design Magazine, April/May 2006. NOR Flash NAND Flash All Rights Preserved, Tei-Wei Kuo, National Taiwan University
Introduction – Multi-Level Cell (MLC) vs SLC Embedded Systems and Wireless Networking Lab.
Comparison of SLC and MLC • 1-bit/Cell SLC NAND Flash • 100,000 Program/Erase cycles (with ECC)[1] • 10 years Data Retention[1] • 2-bits/Cell MLC NAND Flash • 10,000 Program/Erase cycles (with ECC) [2] • 10 years Data Retention[2] • 4-bits/Cell MLC NAND FLASH Developers (2006) • M-systems, Intel, Samsung, and Toshiba [1] ST Micro-electronics NAND SLC large page datasheet (NAND08GW3B2A) [2] ST Micro-electronics NAND MLC large page datasheet (NAND04GW3C2A) * USD34.65 per GB for NOR, USD6.79 per GB for NAND (March 2007) Embedded Systems and Wireless Networking Lab.
Introduction – Consumer Applications Electronic Engineering Times, July 2005 Embedded Systems and Wireless Networking Lab.
Bandwidth Requirements – Video ˇ ˇ Electronic Engineering Times, July 2005 Embedded Systems and Wireless Networking Lab.
Bandwidth Requirements – Audio ˇ ˇ Electronic Engineering Times, July 2005 Embedded Systems and Wireless Networking Lab.
Introduction – Challenges in Flash-Memory Storage Designs • Requirements in Good Performance • Limited Cost per Unit • Strong Demands in Reliability • Increasing in Access Frequencies • Tight Coupling with Other Components • Low Compatibility among Vendors Embedded Systems and Wireless Networking Lab.
Agenda • Introduction • Management Issues • Performance vs Overheads • Other Challenging Issues • Conclusion Embedded Systems and Wireless Networking Lab.
Block Device Layer (FTL emulation) MTD drivers Flash Memory Management Issues – System Architectures AP AP AP AP File-System Layer Embedded Systems and Wireless Networking Lab.
Management Issues – Flash-Memory Characteristics 1 Page = 512B 1 Block = 32 pages(16KB) Write one page Block 0 Block 1 Block 2 Block 3 Erase one block …… …… Embedded Systems and Wireless Networking Lab.
Management Issues – Flash-Memory Characteristics • Write-Once • No writing on the same page unless its residing block is erased! • Pages are classified into valid, invalid, and free pages. • Bulk-Erasing • Pages are erased in a block unit to recycle used but invalid pages. • Wear-Leveling • Each block has a limited lifetime in erasing counts. Embedded Systems and Wireless Networking Lab.
Management Issues – Flash-Memory Characteristics • Example 1: Out-place Update A B C D Live pages Free pages Suppose that we want to update data A and B… Embedded Systems and Wireless Networking Lab.
Management Issues – Flash-Memory Characteristics • Example 1: Out-place Update A B C D A B Dead pages Embedded Systems and Wireless Networking Lab.
Management Issues – Flash-Memory Characteristics • Example 2: Garbage Collection L D D L D D L D This block is to be recycled. (3 live pages and 5 dead pages) L L D L L L F D L F L L L L D F A live page F L L F L L F D A dead page A free page Embedded Systems and Wireless Networking Lab.
Management Issues – Flash-Memory Characteristics • Example 2: Garbage Collection D D D D D D D D Live data are copied to somewhere else. L L D L L L L D L F L L L L D L A live page L L L F L L F D A dead page A free page Embedded Systems and Wireless Networking Lab.
Management Issues – Flash-Memory Characteristics • Example 2: Garbage Collection F F F F F F F F • The block is then erased. • Overheads: • live data copying • block erasing. L L D L L L L D L F L L L L D L A live page L L L F L L F D A dead page A free page Embedded Systems and Wireless Networking Lab.
Management Issues – Flash-Memory Characteristics • Example 3: Wear-Leveling Wear-leveling might interfere with the decisions of the block-recycling policy. 100 L D D L D D L D A 10 L L D L L L F D B L F L L L L D F 20 C A live page A dead page 15 F L L F L L F D D A free page Erase cycle counts Embedded Systems and Wireless Networking Lab.
Management Issues – Challenges • The write throughput drops significantly after garbage collection starts! • The capacity of flash-memory storage systems increases very quickly such that memory space requirements grows quickly. • Reliability becomes more and more critical when the manufacturing capacity increases! • The significant increment of flash-memory access rates seriously exaggerates the Read/Program Disturb Problems! Embedded Systems and Wireless Networking Lab.
Agenda • Introduction • Management Issues • Performance vs Overheads – FTL vs NFTL • Other Challenging Issues • Conclusion Embedded Systems and Wireless Networking Lab.
process process process process Applications fwrite(file,data) File Systems File system (FAT, EXT2, NTFS......) Block write (LBA,size) FTL/NFTL Garbage Address Layer Collection Translation Flash-Memory Flash I/O Requests Storage System Device Driver Control signals Physical Devices (Flash Memory Banks) System Architecture Embedded Systems and Wireless Networking Lab.
48 48 SD, Memory Stick, Compact Flash Management Issues – Flash-Memory Characteristics xD,SmartMedia *FTL: Flash Translation Layer, MTD: Memory Technology Device
Policies –FTL • FTL adopts a page-level address translation mechanism. • The main problem of FTL is on large memory space requirements for storing the address translation information. Embedded Systems and Wireless Networking Lab.
Write data to LBA=1011 Block Offset=3 VBA=126 Policies – NFTL (Type 1) • A logical address under NFTL is divided into a virtual block address and a block offset. • e.g., LBA=1011 => virtual block address (VBA) = 1011 / 8 = 126 and block offset = 1011 % 8 = 3 NFTL Address Translation Table (in main-memory) A Chain Block Address = 9 A Chain Block Address = 23 A Chain Block Address = 50 Free Free Free Free Free Free . . . Free Free Free Used Free Used Free (9) Free Free Free Write to the page with block offset=3 Write to the page with block offset=3 If the page has been used . . . Free Free Free Free Free Free Free Free Free Embedded Systems and Wireless Networking Lab.