32
1 Implementation and Challenging Issues of Flash-Memory Storage Systems Department of Computer Science & Information Engineering National Taiwan University Tei-Wei Kuo 3/29/2007 Embedded Systems and Wireless Networking Lab. 2 Agenda Introduction Management Issues Performance vs Overheads Other Challenging Issues Conclusion

Implementation and Challenging Issues of Flash-Memory Storage

Embed Size (px)

Citation preview

Page 1: Implementation and Challenging Issues of Flash-Memory Storage

1

Implementation and Challenging Issues of Flash-Memory Storage

Systems

Department of Computer Science & Information Engineering

National Taiwan University

Tei-Wei Kuo

3/29/2007 Embedded Systems and Wireless Networking Lab. 2

Agenda

IntroductionManagement IssuesPerformance vs OverheadsOther Challenging IssuesConclusion

Page 2: Implementation and Challenging Issues of Flash-Memory Storage

2

3/29/2007 Embedded Systems and Wireless Networking Lab. 3

Introduction – Why Flash MemoryDiversified Application Domains

Portable Storage DevicesConsumer ElectronicsIndustrial Applications

SoC and Hybrid DevicesCritical System Components

3/29/2007 Embedded Systems and Wireless Networking Lab. 4

Trends in VLSI Technology

Source: www.icknowledge.com

* This slide was from the ASP-DAC’06 talk delivered by Prof. Sang L. Min from the Seoul National University.

Page 3: Implementation and Challenging Issues of Flash-Memory Storage

3

3/29/2007 Embedded Systems and Wireless Networking Lab. 5

Introduction – Trends in Storage Technology

Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005

Samsung 2GB USB 2.0 Flash DrivePrice: $49.99Less Rebate: - $25.00 Final Price: $24.99*

T-One 2GB Microdrive/3600RPM$144.99

September 2006

3/29/2007 Embedded Systems and Wireless Networking Lab. 6

Introduction – Trends in Storage Technology

Source: Using multilevel cell NAND flash technology in consumer applications, Electronic Engineering Times, July ,2005. Amazon.com

Transcend 8GBCompactFlash CardPrice: $84.85

Microdrive 4GBCompact Flash Type II

Price: $116

ScanDisk 4GBCompactFlash CardPrice: $55.99

March 2007

Page 4: Implementation and Challenging Issues of Flash-Memory Storage

4

3/29/2007 Embedded Systems and Wireless Networking Lab. 7

The Ultimate Limit on Mechanical Devices

FlyBy

NightBoeing 747

2,000,000 Miles Per Hour

1/100” Flying Height

Source: Richard Lary, The New Storage Landscape: Forces shaping the storage economy, 2003.

Source: http://www.hitachigst.com/

* This slide was from the ASP-DAC’06 talk delivered by Prof. Sang L. Min from the Seoul National University.

uA Microdrive Example

3/29/2007 Embedded Systems and Wireless Networking Lab. 8

Introduction – The Characteristics of Storage Media

[Reference] DRAM:2-2-2 PC100 SDRAM. NOR FLASH: Intel 28F128J3A-150. NAND FLASH: Samsung K9F5608U0M. Disk: Segate Barracuda ATA II.1

1. J. Kim, J. M. Kim, S. H. Noh, S. L. Min, and Y. Cho. A space-efficient flash translation layer for compact-flash systems. IEEE Transactions on Consumer Electronics, 48(2):366–375, May 2002.

-12.4 ms(512B)(average)

12.4ms (512B)(average)

DISK

2ms (16KB)201us (1B)226us (512B)

10.2us (1B)35.9us (512B)

NAND FLASH

1.2s (16KB)211us (1B)3.52ms (512B)

150ns (1B)14.4us (512B)

NOR FLASH

-60ns (2B)2.56us (512B)

60ns (2B)2.56us (512B)

DRAM

EraseWriteRead

Access timeMedia

15X100X

400X50X

Page 5: Implementation and Challenging Issues of Flash-Memory Storage

5

3/29/2007 Embedded Systems and Wireless Networking Lab. 9

Introduction – Single-Level Cell (SLC)

Selected cellIDS

Control GateDrain

Source

Each Word Line is connected to control gates.Each Bit Line is connected to the drain.

Cell

3/29/2007 Embedded Systems and Wireless Networking Lab. 10

Introduction – Multi-Level Cell (MLC) vs SLC

Page 6: Implementation and Challenging Issues of Flash-Memory Storage

6

3/29/2007 Embedded Systems and Wireless Networking Lab. 11

1-bit/Cell SLC NAND Flash100,000 Program/Erase cycles (with ECC)[1]10 years Data Retention[1]

2-bits/Cell MLC NAND Flash10,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

Comparison of SLC and MLC

3/29/2007 Embedded Systems and Wireless Networking Lab. 12

Introduction – Consumer Applications

Electronic Engineering Times, July 2005

Page 7: Implementation and Challenging Issues of Flash-Memory Storage

7

3/29/2007 Embedded Systems and Wireless Networking Lab. 13

Bandwidth Requirements – Video

ˇ

ˇ

Electronic Engineering Times, July 2005

3/29/2007 Embedded Systems and Wireless Networking Lab. 14

Bandwidth Requirements – Audio

ˇ

ˇ

Electronic Engineering Times, July 2005

Page 8: Implementation and Challenging Issues of Flash-Memory Storage

8

3/29/2007 Embedded Systems and Wireless Networking Lab. 15

Introduction – Challenges in Flash-Memory Storage Designs

Requirements in Good PerformanceLimited Cost per Unit Strong Demands in ReliabilityIncreasing in Access FrequenciesTight Coupling with Other ComponentsLow Compatibility among Vendors

3/29/2007 Embedded Systems and Wireless Networking Lab. 16

Agenda

IntroductionManagement IssuesPerformance vs OverheadsOther Challenging IssuesConclusion

Page 9: Implementation and Challenging Issues of Flash-Memory Storage

9

3/29/2007 Embedded Systems and Wireless Networking Lab. 17

Management Issues – System Architectures

AP

File-System Layer

AP AP

Block Device Layer (FTL emulation)

Flash Memory

MTD drivers

AP

3/29/2007 Embedded Systems and Wireless Networking Lab. 18

Management Issues – Flash-Memory Characteristics

……

Block 0Block 1

Block 2Block 3

Erase one block

1 Page = 512B1 Block = 32 pages(16KB)

……

Write one page

Page 10: Implementation and Challenging Issues of Flash-Memory Storage

10

3/29/2007 Embedded Systems and Wireless Networking Lab. 19

Management Issues – Flash-Memory Characteristics

Write-OnceNo 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-LevelingEach block has a limited lifetime in erasing counts.

3/29/2007 Embedded Systems and Wireless Networking Lab. 20

Management Issues – Flash-Memory Characteristics

Example 1: Out-place Update

Live pages Free pages

A B C D

Suppose that we want to update data A and B…

Page 11: Implementation and Challenging Issues of Flash-Memory Storage

11

3/29/2007 Embedded Systems and Wireless Networking Lab. 21

Dead pages

A B C D A B

Management Issues – Flash-Memory Characteristics

Example 1: Out-place Update

3/29/2007 Embedded Systems and Wireless Networking Lab. 22

A live pageA dead pageA free page

This block is to be recycled. (3 live pages and 5 dead pages)

L D D L D D L D

L L D L L L F D

L F L L L L D F

F L L F L L F D

Management Issues – Flash-Memory Characteristics

Example 2: Garbage Collection

Page 12: Implementation and Challenging Issues of Flash-Memory Storage

12

3/29/2007 Embedded Systems and Wireless Networking Lab. 23

L L D L L L D

L F L L L L D

L L F L L F D

L

L

D D D D

A live pageA dead pageA free page

Live data are copied to somewhere else.

L

D DDD

Management Issues – Flash-Memory Characteristics

Example 2: Garbage Collection

3/29/2007 Embedded Systems and Wireless Networking Lab. 24

A live pageA dead pageA free page

The block is then erased.

Overheads: •live data copying •block erasing.

L L D L L L D

L F L L L L D

L L F L L F D

L

L

F F F F F F F F

L

Management Issues – Flash-Memory Characteristics

Example 2: Garbage Collection

Page 13: Implementation and Challenging Issues of Flash-Memory Storage

13

3/29/2007 Embedded Systems and Wireless Networking Lab. 25

Management Issues – Flash-Memory Characteristics

Example 3: Wear-Leveling

L D D L D D L D

L L D L L L F D

L F L L L L D F

F L L F L L F D

100

10

20

15

Erase cycle counts

Wear-leveling might interfere with the decisions of the block-recycling policy.

A live pageA dead pageA free page

A

B

C

D

3/29/2007 Embedded Systems and Wireless Networking Lab. 26

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!

Page 14: Implementation and Challenging Issues of Flash-Memory Storage

14

3/29/2007 Embedded Systems and Wireless Networking Lab. 27

Agenda

IntroductionManagement IssuesPerformance vs Overheads – FTL vsNFTLOther Challenging IssuesConclusion

3/29/2007 Embedded Systems and Wireless Networking Lab. 28

System Architecture

GarbageCollection

AddressTranslation

FTL/NFTLLayer

File system (FAT, EXT2, NTFS......)

Device Driver

fwrite(file,data)

Block write(LBA,size)

Flash I/O Requests

Controlsignals

File Systems

process processprocess Applications

Flash-MemoryStorage System

Physical Devices(Flash Memory Banks)

process

Page 15: Implementation and Challenging Issues of Flash-Memory Storage

15

3/29/2007 Embedded Systems and Wireless Networking Lab. 29

Management Issues – Flash-Memory Characteristics

*FTL: Flash Translation Layer, MTD: Memory Technology Device

3/29/2007 Embedded Systems and Wireless Networking Lab. 30

Policies – FTLFTL adopts a page-level address translation mechanism.

The main problem of FTL is on large memory space requirements for storing the address translation information.

Page 16: Implementation and Challenging Issues of Flash-Memory Storage

16

3/29/2007 Embedded Systems and Wireless Networking Lab. 31

Policies – NFTL (Type 1)

.

.

.

(9)

Write data to LBA=1011

.

.

.

NFTLAddress Translation Table

(in main-memory)

FreeFreeFreeUsedFreeFreeFreeFree

FreeFreeFreeFreeFreeFreeFreeFree

A Chain Block

Address = 9

A Chain Block

Address = 23

VBA=126

Block Offset=3

If the page has been used

Write to the page with block

offset=3

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

FreeFreeFreeFreeFreeFreeFreeFree

A Chain Block

Address = 50

Used

Write to the page with block

offset=3

3/29/2007 Embedded Systems and Wireless Networking Lab. 32

Policies – NFTL (Type 2)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

.

.

.

(9,23)

Write data to LBA=1011

.

.

.

NFTLAddress Translation Table

(in main-memory)FreeFreeFreeUsedFreeFreeFreeFree

UsedUsedUsedFreeFreeFreeFreeFree

A Primary Block

Address = 9

A Replacement Block

Address = 23

VBA=126

Block Offset=3

If the page has been usedWrite to the

first free page

Page 17: Implementation and Challenging Issues of Flash-Memory Storage

17

3/29/2007 Embedded Systems and Wireless Networking Lab. 33

Policies – NFTLNFTL is proposed for the large-scale NAND flash storage systems because NFTL adopts a block-level address translation.

However, the address translation performance of read and write requests might deteriorate, due to linear searches of address translation information in primary and replacement blocks.

3/29/2007 Embedded Systems and Wireless Networking Lab. 34

Policies – FTL or NFTL

SmallLargeMemory Space RequirementsLongShortAddress Translation TimeMoreLessGarbage Collection OverheadLowHighSpace Utilization

NFTLFTL

The Memory Space Requirements for one 1GB NAND (512B/Page, 4B/Table Entry, 32 Pages/Block)

FTL: 8,192KB (= 4*(1024*1024*1024)/512)NFTL: 256KB (= 4*(1024*1024*1024)/(512*32))

Remark: Each page of small-block(/large-block) SLC NAND can store 512B(/2KB) data, and there are 32(/64) pages per block. Each page of MLCx2 NAND can store 2KB, and there are 128 pages per block.

Page 18: Implementation and Challenging Issues of Flash-Memory Storage

18

3/29/2007 Embedded Systems and Wireless Networking Lab. 35

Address Translation Time - NFTLThe address translation performance of read and write requests can be deteriorated, due to linear searches of physical addresses.

1. Assume that each block contains 8 pages.

2. Let LBA A, B, C, D, and E be written for 5, 5, 1, 1, and 1 times, respectively. Their data distribution could be like to what in the left figure.

3. For example, it might need to scan 9 spare areas for LBA B.

3/29/2007 Embedded Systems and Wireless Networking Lab. 36

Garbage Collection Overhead - NFTL

3. Overhead is 2 block erases and 5 page writes.

1. Copy the most-recent content to the new primary block.2. Erase the old primary block and the replacement block.

Page 19: Implementation and Challenging Issues of Flash-Memory Storage

19

3/29/2007 Embedded Systems and Wireless Networking Lab. 37

Space Utilization - NFTL

3 free pages are wasted.

3/29/2007 Embedded Systems and Wireless Networking Lab. 38

Agenda

IntroductionManagement IssuesPerformance vs Overheads – An Adaptive Two-Level Mapping MechanismOther Challenging IssuesConclusion

Page 20: Implementation and Challenging Issues of Flash-Memory Storage

20

3/29/2007 Embedded Systems and Wireless Networking Lab. 39

MotivationAn adaptive two-level management design of a flash translation layer, called AFTL.

Exploit the advantages of the fine-grained address mechanism and the coarse-grained address mechanism.

Low

More

Long

SmallNFTL

Much Better than NFTL

HighSpace Utilization

Much Better than NFTL

LessGarbage Collection Overhead

Much Better than NFTL

ShortAddress Translation Time

A little larger than NFTL

LargeMemory Space Requirements

AFTLFTL

3/29/2007 Embedded Systems and Wireless Networking Lab. 40

AFTL – Coarse-to-Fine Switching

PPBA RPBA

),,( RPBAPPBAVBA

1. AFTL doesn’t erase the two blocks immediately.

2. AFTL moves the mapping information of the replacement block to the fine-grained hash table by adding fine-grained slots.

5+RPBA

7+RPBA

)1,,( −PPBAVBA

3. The RPBA field of the corresponding mapping information is nullified.

Chin-Hsien Wu and Tei-Wei Kuo, 2006, “An Adaptive Two-Level Management for the Flash Translation Layer in Embedded Systems,”IEEE/ACM 2006 International Conference on Computer-Aided Design (ICCAD), November 5-9, 2006.

Page 21: Implementation and Challenging Issues of Flash-Memory Storage

21

3/29/2007 Embedded Systems and Wireless Networking Lab. 41

AFTL – Fine-to-Coarse SwitchingThe number of the fine-grained slots is limited.

Some least recently used mapping information of fine-grained slots should be moved to the coarse-grained hash table.

PPBA RPBA

),,( RPBAPPBAVBA

5+RPBA

7+RPBA

1. Assume that this fine-grained slot is to be replaced.

2. Data stored in the page with the given (physical) address are copied to the primary or replacement block of the corresponding coarse-grained slot, as defined by NFTL.

3. If there dose not exist any corresponding coarse-grained slot, a new one is created.

(F, PBAE)

3/29/2007 Embedded Systems and Wireless Networking Lab. 42

AFTL – Fine-to-Coarse Switching

Coarse-to-fine switches would introduce fine-to-coarse switches and overhead in valid page copying.

It is because the number of the fine-grained slots is limited.Stop any coarse-to-fine switch when some frequency bound in coarse-to-fine switches is reached.

We set a parameter in the experiments to control the frequency of switches to explore the behavior of the proposed mechanism.

Page 22: Implementation and Challenging Issues of Flash-Memory Storage

22

3/29/2007 Embedded Systems and Wireless Networking Lab. 43

The Advantages of AFTLImprove the address translation performance.

It is because the moving of their mapping information to the fine-grained hash table.

Improve the garbage collection overhead.

The delayed recycling of any replacement blockreduces the potential number of valid data copyings and blocks erased.

Improve the space utilization.The delayed recycling of any primary block lets free pages of a primary block be likely used in the future.

PPBAcg.δ RPBAcg.δ

),,.(

RPBAPPBAVBA

cg

cgcg

δ

δδ

5. +RPBAcgδ

7. +RPBAcgδ

Chin-Hsien Wu and Tei-Wei Kuo, 2006, “An Adaptive Two-Level Management for the Flash Translation Layer in Embedded Systems,”IEEE/ACM 2006 International Conference on Computer-Aided Design (ICCAD), November 5-9, 2006.

3/29/2007 Embedded Systems and Wireless Networking Lab. 44

Agenda

IntroductionManagement IssuesPerformance vs Overheads – Performance EvaluationOther Challenging IssuesConclusion

Page 23: Implementation and Challenging Issues of Flash-Memory Storage

23

3/29/2007 Embedded Systems and Wireless Networking Lab. 45

Performance EvaluationPerformance Setup

The characteristics of the experiment trace was over a 20GB disk.

1,669,228Different LBA’s13,198,805 / 2,797,996 sectorsTotal Write / Read RequestsOne weekDurations

Web Applications, E-mail Clients, MP3 Player, MSN Messenger, Word, Excel, PowerPoint, Media, Player, Programming, and Virtual Memory Activities

ApplicationsNTFSFile SystemsWindows XPOS320 MBRAMIntel Celeron 750MHzCPU

3/29/2007 Embedded Systems and Wireless Networking Lab. 46

Performance Evaluation

Performance SetupThe maximum number of fine-grained slots is controlled by a parameter MFS. A parameter ST controls the frequency of switches between the two address translation mechanisms – n/ST.

ST=0 => No constraint on the number of switches.Smaller ST => More switches.Larger ST => Less switches.

Page 24: Implementation and Challenging Issues of Flash-Memory Storage

24

3/29/2007 Embedded Systems and Wireless Networking Lab. 47

Memory Space Requirements

1. MFS ranged from 2,500, 5,000, 7,500, 10,000, 12,500, to 15,000.

2. AFTL uses a little more memory space than NFTL.

0200400600800

10001200

MFS=2,500

MFS=5,000

MFS=7,500

MFS=10,000

MFS=12,500

MFS=15,000

NFTL

Mem

ory

Spac

e(K

)

AFTL NFTL

3/29/2007 Embedded Systems and Wireless Networking Lab. 48

Address Translation Performance

600000650000

700000750000800000850000900000950000

1000000

MFS=2,5

00

MFS

=5,000

MFS

=7,500

MFS=10

,000

MFS

=12,50

0

MFS

=15,00

0NFT

L

Add

ress

Tra

nsla

tion

Tim

e (m

s)

ST=64 ST=32 ST=16 ST=0 NFTL

1. Larger MFS => smaller address translation time - More address translations going through the fine-grained address translation mechanism.

2. Smaller ST => longer address translation time - More coarse-to-fine switches

Page 25: Implementation and Challenging Issues of Flash-Memory Storage

25

3/29/2007 Embedded Systems and Wireless Networking Lab. 49

Garbage Collection Overhead

456789

10

MFS=2,500

MFS=5 ,000

MFS=7,500

MFS=10 ,000

MFS=12 ,500

MFS=15,000 NFTL

Aver

age

Num

ber o

f V

alid

Pag

esC

opie

d

ST=64 ST=32 ST=16 ST=0 NFTL

350000370000390000410000430000450000470000490000510000530000550000

M FS=2 ,500

MF S=5 ,000

M F S=7 ,500

M F S=1 0,0 00

M F S=12,5 00

M F S=1 5,0 00NFTL

Num

ber o

f Blo

cks E

rase

d

ST=64 ST=32 ST=16 ST=0 NFTL

AFTL outperforms NFTL.

- Coarse-to-fine switches can avoid immediate recycling of their primary and replacement blocks and related valid data copyings.

3/29/2007 Embedded Systems and Wireless Networking Lab. 50

Space Utilization

00.5

11.5

22.5

3

MFS=2,500

MFS=5,000

MFS=7,500

MFS=10,000

MFS=12,500

MFS=15,000

NFTL

Ave

rage

Num

ber o

f Fre

e Pa

ges L

eft

ST=64 ST=32 ST=16 ST=0 NFTL

The Space utilization might be better under AFTL.

- Coarse-to-fine switches can delay the recycling of replacement blocks.

- Free pages of primary blocks might be used in the future..

Page 26: Implementation and Challenging Issues of Flash-Memory Storage

26

3/29/2007 Embedded Systems and Wireless Networking Lab. 51

SummaryAFTL is proposed to

exploit the advantages of fine-grained/coarse-grained address translation mechanisms, and toswitch dynamically and adaptively the mapping information between the two address translation mechanisms.

AFTL does provide good performance in address mapping and space utilization and have garbage collection overhead and memory space requirements under proper management.

PPBAcg.δ RPBAcg.δ

),,.(

RPBAPPBAVBA

cg

cgcg

δ

δδ

5. +RPBAcgδ

7. +RPBAcgδ

Chin-Hsien Wu and Tei-Wei Kuo, 2006, “An Adaptive Two-Level Management for the Flash Translation Layer in Embedded Systems,”IEEE/ACM 2006 International Conference on Computer-Aided Design (ICCAD), November 5-9, 2006.

3/29/2007 Embedded Systems and Wireless Networking Lab. 52

Agenda

IntroductionManagement IssuesPerformance vs OverheadsOther Challenging IssuesConclusion

Page 27: Implementation and Challenging Issues of Flash-Memory Storage

27

3/29/2007 Embedded Systems and Wireless Networking Lab. 53

Challenging Issues – Reliability

Selected cellIDS

Control GateDrain

Source

Each Word Line is connected to control gates.Each Bit Line is connected to the drain.

Cell

3/29/2007 Embedded Systems and Wireless Networking Lab. 54

Challenging Issues – ReliabilityRead Operation

When the floating gate is not charged with electrons, there is current ID (100uA)if a reading voltage is applied. (“1” state)

5V

1V

Program OperationElectrons are moved into the floating gate, and the threshold voltage is thus raised.

Page 28: Implementation and Challenging Issues of Flash-Memory Storage

28

3/29/2007 Embedded Systems and Wireless Networking Lab. 55

Challenging Issues – ReliabilityOver-Erasing Problems

Fast Erasing Bits à All of the cells connected to the same bit line of a depleted cell would be read as “1”, regardless of their values.

Read/Program Disturb ProblemsDC erasing of a programmed cell, DC programming of a non-programmed cell, drain disturb, etc.Flash memory that has thin gate oxide makes disturb problems more serious!

Data Retention ProblemsElectrons stored in a floating gate might be lost such that the lost of electrons will sooner or later affects the charging status of the gate!

3/29/2007 Embedded Systems and Wireless Networking Lab. 56

Challenging Issues – ObservationsThe 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!Wear-leveling technology is even more critical when flash memory is adopted in many system components or might survive in products for a long life time!

Page 29: Implementation and Challenging Issues of Flash-Memory Storage

29

3/29/2007 Embedded Systems and Wireless Networking Lab. 57

Wear Leveling versus Product LifetimeSettings

File system: FAT16 file system with 8KB cluster sizeFlash memory: 256MB small-block flash memory with 100K erase cycles

Updating of a 16MB file repeatedly with the throughput: 0.1MBs

The file requires 2K clusters = 16MB ÷ 8KB(cluster size)The FAT size of this file is 4KB (2K(clusters) x 2 bytes)The 20% of blocks in flash memory joins the dynamic wear leveling Data of a 16MB file is stored in 1K blocks (16MB ÷ 16KB(block size))Suppose flash memory is managed in the block level

File systems update the FAT in each cluster writing so that FAT is updated 2Ktimes for a 16MB fileWriting of a 16MB incurs 1K block erases because of the reclaiming of invalid space.

3/29/2007 Embedded Systems and Wireless Networking Lab. 58

Wear Leveling versus Product Lifetime

Ways in Data UpdatesIn-Place-Updates: Rewriting on the Same PageDynamic Wear Leveling: Rewriting over Another Free Page with Erasing over Blocks with Dead PagesStatic Wear Leveling: Rewriting over Another Free Page with Erasing over Any Blocks

Expected Lifetime of

)days(5.987606024)12(

1000%01(blocks)16ond)0.1(MB/sec

16(MB) Leveling Wear Static

)days(5.197606024)12(

10020%(blocks)16ond)0.1(MB/sec

16(MB) Leveling Wear Dynamic

)days(09.06060242

100ond)0.1(MB/sec

16(MB) update) place-(in Leveling Wear NO

≈×××+

×××=

≈×××+

×××=

≈×××

×=

KKKK

KKKK

KK

Page 30: Implementation and Challenging Issues of Flash-Memory Storage

30

3/29/2007 Embedded Systems and Wireless Networking Lab. 59

Use a counter for each blockThe garbage collector always finds the block with the least erase count.

Some heuristic approach erases a block to maintain 2 free blocks when the garbage collector finds the erase count of the block is over a given threshold.

Problems:High extra block erases and live-page copyingsHigh main-memory consumptionHigh computation cost

Wear Leveling versus Product Lifetime Static Wear Leveling – Block-Level Mapping

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15FlashMemory

Counter

: free block : dead block

: block contains (some) valid data

: index in the selection of a victim block

: index to the selected free block 5 5 4 55 4 45 45 5 44 55 4

Update data in block 3Write new data to block 4GC startsà find a victim block

5

Update block 15GC starts

5 5 5 5

3/29/2007 Embedded Systems and Wireless Networking Lab. 60

Conclusion

SummaryThe Characteristics of Flash Memory and Management IssuesPopular Implementations: FTL vs NFTLAdaptive Two-Level Address TranslationPerformance, Cost, and Reliability Challenges

Page 31: Implementation and Challenging Issues of Flash-Memory Storage

31

3/29/2007 Embedded Systems and Wireless Networking Lab. 61

ConclusionWhat Is Happening?

Solid-State Storage DevicesNew Designs in the Memory HierarchyMore Applications in System Components and Products

Challenging Issues: Performance, Cost, and Reliability

Scalability TechnologyReliability TechnologyCustomization Technology

3/29/2007 Embedded Systems and Wireless Networking Lab. 62

Contact Information

• Professor Tei-Wei Kuol [email protected] URL: http://csie.ntu.edu.tw/~ktwl Flash Research:

http://newslab.csie.ntu.edu.tw/~flash/l Office: +886-2-23625336-257l Fax: +886-2-23628167l Address:

Dept. of Computer Science & Information Engr.National Taiwan University, Taipei, Taiwan 106

Page 32: Implementation and Challenging Issues of Flash-Memory Storage

32

Q & A