236601 - Coding and Algorithms for Memories Lecture 6 1.

Slides:



Advertisements
Similar presentations
COEN 180 SRAM. High-speed Low capacity Expensive Large chip area. Continuous power use to maintain storage Technology used for making MM caches.
Advertisements

Lecture 12 Reduce Miss Penalty and Hit Time
+ CS 325: CS Hardware and Software Organization and Architecture Internal Memory.
Quick Review of Apr 10 material B+-Tree File Organization –similar to B+-tree index –leaf nodes store records, not pointers to records stored in an original.
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B+-Tree Index Files B-Tree.
Bounds on Code Length Theorem: Let l ∗ 1, l ∗ 2,..., l ∗ m be optimal codeword lengths for a source distribution p and a D-ary alphabet, and let L ∗ be.
Quick Sort, Shell Sort, Counting Sort, Radix Sort AND Bucket Sort
Sorting Chapter Sorting Consider list x 1, x 2, x 3, … x n We seek to arrange the elements of the list in order –Ascending or descending Some O(n.
Some Results on Codes for Flash Memory Michael Mitzenmacher Includes work with Hilary Finucane, Zhenming Liu, Flavio Chierichetti.
Designing Floating Codes for Expected Performance Hilary Finucane Zhenming Liu Michael Mitzenmacher.
June 3, 2015Windows Scheduling Problems for Broadcast System 1 Amotz Bar-Noy, and Richard E. Ladner Presented by Qiaosheng Shi.
1 Advanced Database Technology February 12, 2004 DATA STORAGE (Lecture based on [GUW ], [Sanders03, ], and [MaheshwariZeh03, ])
A Hybrid Approach of Failed Disk Recovery Using RAID-6 Codes: Algorithms and Performance Evaluation Yinlong Xu University of Science and Technology of.
Overview Memory definitions Random Access Memory (RAM)
1 Eitan Yaakobi, Laura Grupp Steven Swanson, Paul H. Siegel, and Jack K. Wolf Flash Memory Summit, August 2010 University of California San Diego Efficient.
Santa Clara, CA USA August An Information Theory Approach for Flash Memory Eitan Yaakobi, Paul H. Siegel, Jack K. Wolf University of California,
1 Error Correction Coding for Flash Memories Eitan Yaakobi, Jing Ma, Adrian Caulfield, Laura Grupp Steven Swanson, Paul H. Siegel, Jack K. Wolf Flash Memory.
Registers  Flip-flops are available in a variety of configurations. A simple one with two independent D flip-flops with clear and preset signals is illustrated.
Redundant Data Update in Server-less Video-on-Demand Systems Presented by Ho Tsz Kin.
Hash Tables1 Part E Hash Tables  
Coding for Flash Memories
Hashing General idea: Get a large array
EKT 221 Digital Electronics II
Khaled A. Al-Utaibi Memory Devices Khaled A. Al-Utaibi
Coding and Algorithms for Memories Lecture 2 1.
Chapter 10 Storage and File Structure Yonsei University 2 nd Semester, 2013 Sanghyun Park.
Lecture 9 of Advanced Databases Storage and File Structure (Part II) Instructor: Mr.Ahmed Al Astal.
Institute for Experimental Mathematics Ellernstrasse Essen - Germany Data communication line codes and constrained sequences A.J. Han Vinck Revised.
1 Memory Management Memory Management COSC513 – Spring 2004 Student Name: Nan Qiao Student ID#: Professor: Dr. Morteza Anvari.
Arrays. Arrays: Introduction So far, we handled only one object in each line of code. When we wanted multiple objects to do something, we wrote multiple.
EKT 221 : Digital 2 Memory Basics
National Institute of Science & Technology Technical Seminar Presentation-2004 Presented By: Arjun Sabat [EE ] Flash Memory By Arjun Sabat Roll.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. NON.
Coding and Algorithms for Memories Lecture 8 1.
1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting.
Memory and Storage Dr. Rebhi S. Baraka
CPEN Digital System Design
Digital Logic Design Instructor: Kasım Sinan YILDIRIM
Chapter 7: Sorting Algorithms Insertion Sort. Sorting Algorithms  Insertion Sort  Shell Sort  Heap Sort  Merge Sort  Quick Sort 2.
CSC 211 Data Structures Lecture 13
Coding and Algorithms for Memories Lecture 5 1.
Error Correction and Partial Information Rewriting for Flash Memories Yue Li joint work with Anxiao (Andrew) Jiang and Jehoshua Bruck.
Flash Memory. Points of Discussion  Flash Memory Generalities  Construction & Properties  History of Flash Memory  NOR & NAND Architectures  Optimizations.
Coding and Algorithms for Memories Lecture 4 1.
CPSC 404, Laks V.S. Lakshmanan1 External Sorting Chapter 13: Ramakrishnan & Gherke and Chapter 2.3: Garcia-Molina et al.
Communication and Computation on Arrays with Reconfigurable Optical Buses Yi Pan, Ph.D. IEEE Computer Society Distinguished Visitors Program Speaker Department.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: February 20, 2002 Routing 1.
Chapter 15 A External Methods. © 2004 Pearson Addison-Wesley. All rights reserved 15 A-2 A Look At External Storage External storage –Exists beyond the.
Unique! coding for three different motivation flash codes network coding Slepian-Wolf coding test, take-home test.
Coding and Algorithms for Memories Lecture 2 + 4
Storage and File structure COP 4720 Lecture 20 Lecture Notes.
Coding and Algorithms for Memories Lecture 7 1.
Lecture 20 Last lecture: Today’s lecture: Types of memory
Rate Distortion Theory. Introduction The description of an arbitrary real number requires an infinite number of bits, so a finite representation of a.
Coding and Algorithms for Memories Lecture 7 1.
Compression for Fixed-Width Memories Ori Rottenstriech, Amit Berman, Yuval Cassuto and Isaac Keslassy Technion, Israel.
Eitan Yaakobi, Laura Grupp Steven Swanson, Paul H. Siegel, and Jack K. Wolf Flash Memory Summit, August 2011 University of California San Diego Error-Correcting.
Advanced Science and Technology Letters Vol.35(Software 2013), pp Bi-Modal Flash Code using Index-less.
Norhayati Soin 06 KEEE 4426 WEEK 15/1 6/04/2006 CHAPTER 6 Semiconductor Memories.
Coding and Algorithms for Memories Lecture 2
Chapter 11 Sorting Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and Mount.
On the analysis of indexing schemes
Andreas Klappenecker [partially based on the slides of Prof. Welch]
Coding and Algorithms for Memories Lecture 5
Presented By: Rob Douglas, Alex Alexandrov
Coding and Algorithms for Memories Lecture 4
Coding and Algorithms for Memories Lecture 5
ECE 434 Advanced Digital System L03
Asymptotic Notations Algorithms Lecture 9.
ECE434a Advanced Digital Systems L02
Presentation transcript:

Coding and Algorithms for Memories Lecture 6 1

Class Overview What have we studied so far? – Background on memories – Flash memories: properties, structure and constraints – Rewriting codes – WOM codes What’s next? – Other rewriting codes – Lecture 6 (today) – Rank modulation codes – Lecture 7 & 8 – ECC and constrained codes – Lecture 9 – Wear leveling & memory management – Lecture 10 – Storage – Lectures HW 1 – Due today HW 2 – Will be released tomorrow, due May 1 st 2

Array of cells, made of floating gate transistors ─ Each cell can store q different levels ─ Today, q typically ranges between 2 and 16 ─ The levels are represented by the number of electrons ─ The cell’s level is increased by pulsing electrons ─ To reduce a cell level, all cells in its containing block must first be reset to level 0 A VERY EXPENSIVE OPERATION Rewriting Codes 3

Problem: Cannot rewrite the memory without an erasure However… It is still possible to rewrite if only cells in low level are programmed 4

Rewriting Codes Store 3 bits once Store 1 bit 8 times Store 4 bits once Store 1 bit 16 times Rewrite codes significantly reduce the number of block erasures 5

One of the most efficient schemes to decrease the number of block erasures Floating Codes Buffer Codes Trajectory Codes Rank Modulation Codes WOM Codes Rewriting Codes 6

Write-Once Memories (WOM) Introduced by Rivest and Shamir, “How to reuse a write-once memory”, 1982 The memory elements represent bits (2 levels) and are irreversibly programmed from ‘0’ to ‘1’ Q: How many cells are required to write 100 bits twice? P1: Is it possible to do better…? P2: How many cells to write k bits twice? P3: How many cells to write k bits t times? P3’: What is the total number of bits that is possible to write in n cells in t writes? 1 st Write 2 nd Write 7

Buffer Codes An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Enables to write any t bits before resetting – After every write, the last r bits are recoverable What is the problem? Maximize the value of t: – Find upper bound on the number of writes t – Find constructions getting close to this bound 8

Construction of Buffer Codes An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 9

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 10

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 11

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 12

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 13

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) 1(1,0,0,1)(1,1,0,0,1,1,0,0,1,0,0) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 14

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) 1(1,0,0,1)(1,1,0,0,1,1,0,0,1,0,0) 0(0,0,1,0)(1,1,1,0,1,1,0,0,1,0,0) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 15

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) 1(1,0,0,1)(1,1,0,0,1,1,0,0,1,0,0) 0(0,0,1,0)(1,1,1,0,1,1,0,0,1,0,0) 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 16

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) 1(1,0,0,1)(1,1,0,0,1,1,0,0,1,0,0) 0(0,0,1,0)(1,1,1,0,1,1,0,0,1,0,0) 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) 1(1,0,0,1)(1,1,1,1,1,1,1,1,1,1,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? Before writing the next bit, the memory is reset to (1,1,1,1,1,1,1,1,1,1,1) and the buffer (1,0,0,1) is written bit by bit to the memory 17

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) 1(1,0,0,1)(1,1,0,0,1,1,0,0,1,0,0) 0(0,0,1,0)(1,1,1,0,1,1,0,0,1,0,0) 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) 1(1,0,0,1)(1,1,1,1,1,1,1,1,1,1,1) (1,1,1,1,2,1,1,1,1,1,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? Before writing the next bit, the memory is reset to (1,1,1,1,1,1,1,1,1,1,1) and the buffer (1,0,0,1) is written bit by bit to the memory 18

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) 1(1,0,0,1)(1,1,0,0,1,1,0,0,1,0,0) 0(0,0,1,0)(1,1,1,0,1,1,0,0,1,0,0) 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) 1(1,0,0,1)(1,1,1,1,1,1,1,1,1,1,1) (1,1,1,1,2,1,1,1,1,1,1) (2,1,1,1,2,1,1,1,1,1,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? Before writing the next bit, the memory is reset to (1,1,1,1,1,1,1,1,1,1,1) and the buffer (1,0,0,1) is written bit by bit to the memory 19

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) 1(1,0,0,1)(1,1,0,0,1,1,0,0,1,0,0) 0(0,0,1,0)(1,1,1,0,1,1,0,0,1,0,0) 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) 1(1,0,0,1)(1,1,1,1,1,1,1,1,1,1,1) (1,1,1,1,2,1,1,1,1,1,1) (2,1,1,1,2,1,1,1,1,1,1) (2,2,1,1,2,1,1,1,1,1,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? Before writing the next bit, the memory is reset to (1,1,1,1,1,1,1,1,1,1,1) and the buffer (1,0,0,1) is written bit by bit to the memory 20

Construction of Buffer Codes Next BitBuffer StateMemory State (0,0,0,0)(0,0,0,0,0,0,0,0,0,0,0) 1(0,0,0,1)(0,0,0,0,1,0,0,0,0,0,0) 1(0,0,1,1)(0,0,0,0,1,1,0,0,0,0,0) 0(0,1,1,0)(1,0,0,0,1,1,0,0,0,0,0) 0(1,1,0,0)(1,1,0,0,1,1,0,0,0,0,0) 1(1,0,0,1)(1,1,0,0,1,1,0,0,1,0,0) 0(0,0,1,0)(1,1,1,0,1,1,0,0,1,0,0) 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) 1(1,0,0,1)(1,1,1,1,1,1,1,1,1,1,1) (1,1,1,1,2,1,1,1,1,1,1) (2,1,1,1,2,1,1,1,1,1,1) (2,2,1,1,2,1,1,1,1,1,1) (2,2,1,1,2,1,1,2,1,1,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? Before writing the next bit, the memory is reset to (1,1,1,1,1,1,1,1,1,1,1) and the buffer (1,0,0,1) is written bit by bit to the memory 21

Construction of Buffer Codes Next BitBuffer StateMemory State (1,0,0,1)(2,2,1,1,2,1,1,2,1,1,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 22

Construction of Buffer Codes Next BitBuffer StateMemory State (1,0,0,1)(2,2,1,1,2,1,1,2,1,1,1) 1(0,0,1,1)(2,2,1,1,2,1,1,2,2,1,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 23

Construction of Buffer Codes Next BitBuffer StateMemory State (1,0,0,1)(2,2,1,1,2,1,1,2,1,1,1) 1(0,0,1,1)(2,2,1,1,2,1,1,2,2,1,1) 1(0,1,1,1)(2,2,1,1,2,1,1,2,2,2,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? 24

Construction of Buffer Codes Next BitBuffer StateMemory State (1,0,0,1)(2,2,1,1,2,1,1,2,1,1,1) 1(0,0,1,1)(2,2,1,1,2,1,1,2,2,1,1) 1(0,1,1,1)(2,2,1,1,2,1,1,2,2,2,1) 0(1,1,1,0)(2,2,2,1,2,1,1,2,2,2,1) An (n,q,r,t) Buffer Code: – Contains n q-ary cells – Guarantees t bits writes – The last r bits are recoverable Example: n=11, q=3, r=4, t=? t=7+4=11 25

Construction of Buffer Codes What is the number of writes? – On the first layer: n-r writes – On every consecutive write: n-2r+1 – Together: n-r+(q-2)(n-2r+1) = (q-1)(n-2r+1)+r-1 Trivial Upper bound: t ≤ (q-1)n 26

How to Improve? Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) 27

How to Improve? Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) (1,1,1,1,1,1,1,0,1,0,0) Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Before writing the next bit, all cells besides the last 4 are raised to level 1 28

How to Improve? Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) (1,1,1,1,1,1,1,0,1,0,0) 1(1,0,0,1)(1,1,1,1,2,1,1,1,1,0,0) Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Before writing the next bit, all cells besides the last 4 are raised to level 1 29

How to Improve? Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) (1,1,1,1,1,1,1,0,1,0,0) 1(1,0,0,1)(1,1,1,1,2,1,1,1,1,0,0) 1(0,0,1,1)(1,1,1,1,2,2,1,1,1,0,0) Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Before writing the next bit, all cells besides the last 4 are raised to level 1 30

How to Improve? Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) (1,1,1,1,1,1,1,0,1,0,0) 1(1,0,0,1)(1,1,1,1,2,1,1,1,1,0,0) 1(0,0,1,1)(1,1,1,1,2,2,1,1,1,0,0) 1(0,1,1,1)(1,1,1,1,2,2,2,1,1,1,0) Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Before writing the next bit, all cells besides the last 4 are raised to level 1 31

How to Improve? Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) (1,1,1,1,1,1,1,0,1,0,0) 1(1,0,0,1)(1,1,1,1,2,1,1,1,1,0,0) 1(0,0,1,1)(1,1,1,1,2,2,1,1,1,0,0) 1(0,1,1,1)(1,1,1,1,2,2,2,1,1,1,0) 0(1,1,1,0)(2,1,1,1,2,2,2,1,1,1,1) Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Before writing the next bit, all cells besides the last 4 are raised to level 1 32

How to Improve? Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) (1,1,1,1,1,1,1,0,1,0,0) 1(1,0,0,1)(1,1,1,1,2,1,1,1,1,0,0) 1(0,0,1,1)(1,1,1,1,2,2,1,1,1,0,0) 1(0,1,1,1)(1,1,1,1,2,2,2,1,1,1,0) 0(1,1,1,0)(2,1,1,1,2,2,2,1,1,1,1) 1(1,1,0,1)(2,1,1,1,2,2,2,1,2,1,1) Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Before writing the next bit, all cells besides the last 4 are raised to level 1 33

How to Improve? Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) (1,1,1,1,1,1,1,0,1,0,0) 1(1,0,0,1)(1,1,1,1,2,1,1,1,1,0,0) 1(0,0,1,1)(1,1,1,1,2,2,1,1,1,0,0) 1(0,1,1,1)(1,1,1,1,2,2,2,1,1,1,0) 0(1,1,1,0)(2,1,1,1,2,2,2,1,1,1,1) 1(1,1,0,1)(2,1,1,1,2,2,2,1,2,1,1) 1(1,0,1,1)(2,1,1,1,2,2,2,1,2,2,1) Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Before writing the next bit, all cells besides the last 4 are raised to level 1 34

How to Improve? Next BitBuffer StateMemory State 0(0,1,0,0)(1,1,1,1,1,1,0,0,1,0,0) (1,1,1,1,1,1,1,0,1,0,0) 1(1,0,0,1)(1,1,1,1,2,1,1,1,1,0,0) 1(0,0,1,1)(1,1,1,1,2,2,1,1,1,0,0) 1(0,1,1,1)(1,1,1,1,2,2,2,1,1,1,0) 0(1,1,1,0)(2,1,1,1,2,2,2,1,1,1,1) 1(1,1,0,1)(2,1,1,1,2,2,2,1,2,1,1) 1(1,0,1,1)(2,1,1,1,2,2,2,1,2,2,1) 0(0,1,1,0)(2,2,1,1,2,2,2,1,2,2,1) Example: n=11, q=3, r=4, t=? Perform the first 7 writes as before Before writing the next bit, all cells besides the last 4 are raised to level 1 t=7+7=14 35

How to Improve? The number of writes now is t = (q-1)(n-r) (instead of (q-1)(n-2r+1)+r-1) The upper bound is (q-1)n 36

Flash/Floating Codes k bits are stored using n cells A write is a change 0 → 1 or 1 → 0 of one of the k bits Definition – Flash Codes: An (n,k,t) q Flash/Floating Code is a coding scheme that accommodates any sequence of up to t writes of k bits, using n q-level cells, in such a way that a block erasure is never required Goal: Given k, n, q maximize the number of writes t 37

,0 0,1 0,20,30,40,50,60,7 1,01,11,21,31,41,51,61,7 2,0 2,12,22,32,42,52,62,7 3,0 3,13,23,33,43,53,63,7 4,0 4,14,24,34,44,54,64,7 5,0 5,15,25,35,45,55,65,7 6,0 6,16,26,36,46,56,66,7 7,0 7,17,27,37,47,57,67,7 Flash Codes Example: Storing three bits using two 8-level cells Bits Diagram Cells Diagram 38

Write Deficiency A trivial upper bound on the number of writes: t ≤ n(q – 1) Write Deficiency: The difference between the trivial upper bound, n(q – 1), and the guaranteed number of writes t δ = n(q – 1) – t The write deficiency shows how close a given flash code is to the trivial upper bound Theorem: For any (n,k,t) q flash code where n≥k t ≤ n(q – 1) – [½(q – 1)(k – 1)] For n ≥ k, δ ≥ [½(q – 1)(k – 1)] For n large enough, the lower bound on the write deficiency does not depend on n! 39

Example – Two Bits Construction t = Every cell is filled to the top before moving to the next one When the cells coincide, the last cell represents two bits. The cell’s residue modulo 4 sets the bits value: 0 – (0,0) 1 – (0,1) 2 – (1,0) 3 – (1,1) The maximum number of writes (worst case) is n(q-1) – [(q-1)/2] (optimal) before erasing is required. 40

Indexed Flash Codes v3v3 v2v2 v4v4 v1v1 c1c1 c2c2 c3c3 c4c4 Bits Cells Index Cells vkvk v5v5 cncn Partition the k bits into groups of k’ ≤ 6 bits Partition the cells into blocks of n’< n cells Each group of bits is represented by one of the blocks When a block gets full, start using the next empty block Indexing is needed to indicate for each block which bit-group it represents Leads to overhead due to index cells 41

Index-Less Indexed Flash Codes Use the same idea but without the index cells How? – Each block consists of k cells and stores one bit – The blocks are used differently in such a way that it is possible to decode which bit each block stores – The bit value is the parity of its block Example: Storing 4 bits – The memory consists of 4-cell blocks – Assume each cell has 5 levels: 0,1,2,3,4 First BitSecond BitThird BitFourth Bit

Index-Less Indexed Flash Codes Example: Writing 4 bits using 24 cells of 3 levels Bit Value Modified Bit When writing stops, at most (k – 1)(k(q – 1) – 1) levels are not used The write deficiency order is δ = O(k 2 q) 43

Nearly Optimal Construction How to continue when writing stops? – Every block is divided into two sub-blocks of k/2 cells – Every sub-block stores one bit – It is not possible to write the bits as before – Now… use the index cells! Index Cells k cells k/2 44

Nearly Optimal Construction How to continue when writing stops? – Every block is divided into two sub-blocks of k/2 cells – Every sub-block stores one bit – It is not possible to write the bits as before – Now… use the index cells! – For each sub-block, its bit index is stored in the index cells – Repeat the process recursively log 2 k steps – At each step, at most 2k – 2 sub-blocks need to be indexed Theorem: The write deficiency order is δ = O(qklog 2 k/ logq) Index Cells X 3 X 22 k/2 k/4 45

Hot+Cold Rewrite WOM hot/cold WOM k bits t writes k bits The cold bits can be written only once The hot bits can be written multiple times 46

1 Hot + 1 Cold, n=1 Hot-bit write: go UP Cold-bit write: switch RIGHT 1 cold write, q /2-1 hot writes (optimal) x1.5 than 2 hot, +1 than floating codes ,00,00,10, ,01,01,11,1cold,hot = 47

1 Hot + 1 Cold, n=2 Hot-bit write: alternate RIGHT-UP Cold-bit write: +2 UP 2q-3 total writes, up to 1 cold write (optimal) x2 than 2 hot, x1.33 than floating codes c1c : 1,1 2: 1,0 1: 0,1 0: 0,0 cold=0 cold= c2c cold=0 cold=1 48