Escolar Documentos
Profissional Documentos
Cultura Documentos
(CSE598D)
Thursday April 5, 2007
Youngjae Kim
Read / Write
(a) NOR
(b) NAND
F-N tunneling
Give a higher voltage and electrons are trapped through gate into
floating gate transistor.
7
NAND (Data-storage)
Flash Type
Code
Storage
File
Storage
NOR
-Intel/Sharp
-AMD/Fujitsu/Toshiba
NAND
-Samsung/Thoshiba
Performance
Important:
-High Random Access
-Byte Programming
Acceptable:
-Slow Programming
-Slow Erasing
Important:
-High Sped Programming
-High Speed Erasing
-High Speed Serial Read
Acceptable:
-Slow Random Access
Application
Program Storage
-Cellular Phone
-DVD, Set TOP Box for
BIOS
10
http://www.samsung.com/Products/Semiconductor/NANDFlash/index.htm
12
Design and evaluation of the compressed flash translation layer for high-speed and large-scale flash
memory storages Proc. SoC Design Conference, pp. 740-745, September, 2003
13
Outline
Flash Memory Technology
NAND vs. NOR
Garbage Collection
Hybrid Hard Drives
Window Vista
14
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
3. Obsolete original
block
15
High risk of data loss due to the size difference between file system
data block and erase block unit of flash
16
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
17
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.
2.
3.
4.
5.
6.
18
19
20
HOST
File System
Block Device
Driver
IDE,
SCSI
Controller
Flash Memory
ROM
RAM
21
Page-Level Mapping
Logical Sector Number to Physical Sector Number
Limitation
Large SRAM => High Cost
22
Block-Level Mapping
Logical Block Number to Physical Block Number + Offset
2
3
Limitation
Involving extra flash memory operation with write requests
23
Write Trace
Page
1 2 3 4
4 3 4
Block
1 2 3 4
1 2 3 4
1 2 3 4
Replace
Block
1 2 3 4
3 4
Log-Block
1 2 3 4
1 2 3 4
4 3 4
24
Garbage Collection
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.
2.
3.
4.
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.
26
Sector: Free
Sector: Valid
Sector: Valid
Sector: Valid
Sector: Free
3
Spare Unit
Sector: Valid
Sector: Invalid
Sector: Valid
Counter
Counter
Spare Unit
Counter
Sector: Free
Sector: Free
Sector: Free
Sector: Free
Wear-leveling
Moving static blocks to worn-out
sectors
Usually sector with static data is
least-worn out unit
27
Flash
Reclaimed Unit 0
Reclaimed Unit 1
Sector: Free
Sector: Free
Sector: Valid
Sector: Valid
Sector: Valid
Sector: Valid
Sector: Valid
Sector: Valid
Free Unit
Free Unit
Sector: Free
Sector: Free
Sector: Free
Sector: Free
Sector: Free
Sector: Free
Sector: Free
Sector: Free
2
RAM
4
U0
U1
28
29
benefit
cost X weight
30
Flash
Cold Blocks
Hot Blocks
Free Blocks
31
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
http://www.extremetech.com/article2/0,1697,1966806,00.asp (May 24, 2006)
32
33
34
FLASHCACHE
[HCSS94]
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
35
eNVy [ASPLOS94]
36
eNVy [ASPLOS94]
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
NVCache [MASCOTS06]
JFFS2 (Journaling
Flash File System)
Built-in linux kernel after
2.4.X
JFFS1 (1999) JFFS2
(2001) JFFS3 (ongoing)
39
40