Top Banner
236601 - Coding and Algorithms for Memories Lecture 10 1
37

236601 - Coding and Algorithms for Memories Lecture 10

Feb 25, 2016

Download

Documents

Kyoko

236601 - Coding and Algorithms for Memories Lecture 10. Memory Management Algorithms. SLC, MLC and TLC Flash. High Voltage. High Voltage. High Voltage. SLC Flash. MLC Flash. TLC Flash. 1 Bit Per Cell 2 States. 2 Bits Per Cell 4 States. 3 Bits Per Cell 8 States. Low Voltage. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 236601 - Coding and Algorithms  for  Memories Lecture 10

1

236601 - Coding and Algorithms for

MemoriesLecture 10

Page 2: 236601 - Coding and Algorithms  for  Memories Lecture 10

2

Memory Management Algorithms

Page 3: 236601 - Coding and Algorithms  for  Memories Lecture 10

3

SLC, MLC and TLC FlashHigh Voltage

Low Voltage

1 Bit Per Cell2 States

SLC Flash

011010000001101100110111

01

00

10

11

0

1

High Voltage

Low Voltage

2 Bits Per Cell

4 States

MLC Flash

High Voltage

Low Voltage

3 Bits Per Cell

8 States

TLC Flash

Page 4: 236601 - Coding and Algorithms  for  Memories Lecture 10

4

Flash Memory Structure• A group of cells constitute a page• A group of pages constitute a block

– In SLC flash, a typical block layout is as follows

page 0 page 1page 2 page 3page 4 page 5

.

.

.

.

.

.page 62 page 63

Page 5: 236601 - Coding and Algorithms  for  Memories Lecture 10

5

• In MLC flash the two bits within a cell DO NOT belong to the same page – MSB page and LSB page

• Given a group of cells, all the MSB’s constitute one page and all the LSB’s constitute another page

Row index

MSB of first 214

cells

LSB of first 214

cells

MSB of last 214

cells

LSB of last 214

cells0 page 0 page 4 page 1 page 51 page 2 page 8 page 3 page 92 page 6 page 12 page 7 page 133 page 10 page 16 page 11 page 17

⋮ ⋮ ⋮ ⋮ ⋮30 page 118 page 124 page 119 page 12531 page 122 page 126 page 123 page 127

01

10

00

11

MSB/LSBFlash Memory Structure

Page 6: 236601 - Coding and Algorithms  for  Memories Lecture 10

6

Row inde

x

MSB of first 216

cells

CSB of first 216

cells

LSB of first 216

cells

MSB of last 216

cells

CSB of last 216

cells

LSB of last 216

cells0 page 0 page 11 page 2 page 6 page 12 page 3 page 7 page 132 page 4 page 10 page 18 page 5 page 11 page 193 page 8 page 16 page 24 page 9 page 17 page 254 page 14 page 22 page 30 page 15 page 23 page 31

⋮ ⋮ ⋮ ⋮ ⋮62 page

362page 370

page 378

page 363

page 371

page 379

63 page 368

page 376

page 369

page 377

64 page 374

page 382

page 375

page 383

65 page 380

page 381

MSB Page CSB Page LSB Page MSB Page CSB Page LSB Page

Flash Memory Structure

Page 7: 236601 - Coding and Algorithms  for  Memories Lecture 10

7

Flash Memory Structure• Why to split cell bits to different pages?

– Fast writing– Fast reading– Reduces the BER– Reduces the inter-cell interference (ICI)

• Side effects– Different BER to different pages– Different writing and reading times for different

pages– Pages can affect other ones even if they don’t

share related information

Page 8: 236601 - Coding and Algorithms  for  Memories Lecture 10

8

Page 9: 236601 - Coding and Algorithms  for  Memories Lecture 10

9

Page 10: 236601 - Coding and Algorithms  for  Memories Lecture 10

10

Page 11: 236601 - Coding and Algorithms  for  Memories Lecture 10

11

Page 12: 236601 - Coding and Algorithms  for  Memories Lecture 10

12

Raw BER Results

Page 13: 236601 - Coding and Algorithms  for  Memories Lecture 10

13

Raw BER Results

011010000001101100110111

High Voltage

Low Voltage

Page 14: 236601 - Coding and Algorithms  for  Memories Lecture 10

14

Partial Cell State Usage

• Store either one or two bits in every cell– For one bit, only the MSB pages– For two bits, only the MSB and CSB pages

• Two cases:– The partial storage is introduced at the beginning– The partial storage is introduced after 2000 normal

program/erase cycles

011010000001101100110111

High Voltage

Low Voltage

Page 15: 236601 - Coding and Algorithms  for  Memories Lecture 10

15

Partial Cell State Usage - BER

Page 16: 236601 - Coding and Algorithms  for  Memories Lecture 10

16

Cell-based ECC• Experiments have shown that certain

specific cell-error types are dominant in MLC and TLC flash memories.

• The dominant cell errors in MLC involved a change in cell voltage by only one level: 10 to 00 or 00 to 01.

• Opposite effect for data retention

01

10

00

11

Page 17: 236601 - Coding and Algorithms  for  Memories Lecture 10

17

ECC Scheme for TLC Flash• If a TLC cell is in error, then with high

probability only one of the three bits in the cell is in error

• The different error transitions are due to programming errors

011010000001101100110111

Page 18: 236601 - Coding and Algorithms  for  Memories Lecture 10

18

Organization of flash memory• Flash is a re-writable

semiconductor memory• Organization of flash memory

– Contains thousands of blocks– A block contains typically 64 pages– A page is typically 4 KB, smallest

unit• Operations on flash memory

– Page-level read/write operations– Block-level erase operations

PagePagePagePage

Block

...

Page 19: 236601 - Coding and Algorithms  for  Memories Lecture 10

19

–Limitation 1: block erase–Limitation 2: non-support of overwrite–To change one page, must copy-erase-write–“Write amplification” Changing one page

requires 64 page writes!–Undesirable:

–reduces system performance–reduces flash memory device longevity

Flash memory: Two limitations

0x3A0x890x200x3B

copy erase

0x3A0xA00x200x3B

write0x3A

0x89

0x20

0x3B

temporary storage

Page 20: 236601 - Coding and Algorithms  for  Memories Lecture 10

20

–Limitation 1: block erase–Limitation 2: non-support of overwrite–To change one page,

– Mark the old page as invalid– Write the new data into a free page

– Invalid pages must be reclaimed

Flash memory: Out-of-place write

0x3A0x890x20

0x3AInvalid0x20

mark

0x3AInvalid0x200x3B

write

Page 21: 236601 - Coding and Algorithms  for  Memories Lecture 10

21

–Reclaim the invalid pages into free pages–Steps:

– Choose a block for garbage collection– Copy all valid pages out– Erase the block– Copy the valid pages back

–Causes undesired physical writes (write amplification)

Flash memory: Garbage collection

0x3AI nvalidInvalid0x3B

copy erase

0x3A0x3B

write0x3A

0x3Btemporary storage

Page 22: 236601 - Coding and Algorithms  for  Memories Lecture 10

22

Flash Transition Table (FTL)• A table mapping the physical page of each logical

page• Table Size = TS = # logical pages*log(#physical

pages)Z= # pages in a block

• Example: – Flash storage of 32GB with 64 pages of 2KB per block– #logical pages = 32GB/2KB = 224 – If #logical pages = #physical pages, then

TS = 224*log(224)b = 224*3B = 48MB• The table needs to be saved in the flash when

power is down and rebuilt again when power is on

Page 23: 236601 - Coding and Algorithms  for  Memories Lecture 10

23

Page 24: 236601 - Coding and Algorithms  for  Memories Lecture 10

24

Logical Space:(12 pages)

Physical Space:(16 pages in 4 blocks)

Initial condition: Start with an empty memoryUser writes uniformly and randomly distributed on user spacestationary condition: Logical memory is always full (worst case)

System Example of Writing Flash Memory

(mapping table)

7

Page 25: 236601 - Coding and Algorithms  for  Memories Lecture 10

25

Page 26: 236601 - Coding and Algorithms  for  Memories Lecture 10

26

Page 27: 236601 - Coding and Algorithms  for  Memories Lecture 10

27

Page 28: 236601 - Coding and Algorithms  for  Memories Lecture 10

28

Page 29: 236601 - Coding and Algorithms  for  Memories Lecture 10

29

Page 30: 236601 - Coding and Algorithms  for  Memories Lecture 10

30

Page 31: 236601 - Coding and Algorithms  for  Memories Lecture 10

31

Page 32: 236601 - Coding and Algorithms  for  Memories Lecture 10

32

Greedy Garbage Collection• Write amplification = #physical writes/# logical

writes• Overprovisioning = (T-U)/U ;

T = #physical blocks, U = #logical blocks• Theorem: The greedy garbage collection is optimal

in order to reduce the write amplification

Page 33: 236601 - Coding and Algorithms  for  Memories Lecture 10

33

Analysis• Write amplification = #physical writes/# logical writes• Overprovisioning = (T-U)/U ;

T = #physical blocks, U = #logical blocks• Problem 1: How are the overprovisioning factor and

write amplification related, under uniform writing? – N logical page writes ; M physical writes– #block erasures = E = M/Z , Z = #pages in a block

• On the average there are Y=α’Z pages in an erased block– M = N + EY– E = M/Z = (N+EY)/Z; (Z-Y)E = N; E=N/(Z-Y); E=N/Z(1-α’)

• Problem 2: What is the connection between α = U/T and α’ = Z/Y?

• Answer: α = (α’-1)/ln(α’)

Page 34: 236601 - Coding and Algorithms  for  Memories Lecture 10

34

Other Variations of GC• Wear Leveling algorithms to balance the

number of times each block is erased• Mapping in the block level: mapping

between logical and physical blocks– Reduce the FTL size

• Other variations that take into account hot and cold data

• Usually performance is analyzed for random distribution but practical purposes take the Zipf distribution and benchmarks

Page 35: 236601 - Coding and Algorithms  for  Memories Lecture 10

35

Page 36: 236601 - Coding and Algorithms  for  Memories Lecture 10

36

Page 37: 236601 - Coding and Algorithms  for  Memories Lecture 10

37