Hanyang University Hyunok Oh Energy Optimal Bit Encoding for Flash Memory.

Slides:



Advertisements
Similar presentations
Lecture 4 (week 2) Source Coding and Compression
Advertisements

Lecture 3: Source Coding Theory TSBK01 Image Coding and Data Compression Jörgen Ahlberg Div. of Sensor Technology Swedish Defence Research Agency (FOI)
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
Source Coding Data Compression A.J. Han Vinck. DATA COMPRESSION NO LOSS of information and exact reproduction (low compression ratio 1:4) general problem.
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.
Data Compression.
Wan Accelerators: Optimizing Network Traffic with Compression Introduction & Motivation Results for Trained Files Another Compression Method Approach &
Optimal Partitions of Strings: A new class of Burrows-Wheeler Compression Algorithms Raffaele Giancarlo Marinella Sciortino
Lecture04 Data Compression.
1 Huffman Codes. 2 Introduction Huffman codes are a very effective technique for compressing data; savings of 20% to 90% are typical, depending on the.
Lecture 6: Huffman Code Thinh Nguyen Oregon State University.
CSCI 3 Chapter 1.8 Data Compression. Chapter 1.8 Data Compression  For the purpose of storing or transferring data, it is often helpful to reduce the.
CS336: Intelligent Information Retrieval
Data Structures – LECTURE 10 Huffman coding
Lecture 4 Source Coding and Compression Dr.-Ing. Khaled Shawky Hassan
Source Coding Hafiz Malik Dept. of Electrical & Computer Engineering The University of Michigan-Dearborn
Data Compression Basics & Huffman Coding
1 Lossless Compression Multimedia Systems (Module 2) r Lesson 1: m Minimum Redundancy Coding based on Information Theory: Shannon-Fano Coding Huffman Coding.
Seok-Won Seong and Prabhat Mishra University of Florida IEEE Transaction on Computer Aided Design of Intigrated Systems April 2008, Vol 27, No. 4 Rahul.
Chapter 2 Source Coding (part 2)
Noiseless Coding. Introduction Noiseless Coding Compression without distortion Basic Concept Symbols with lower probabilities are represented by the binary.
15-853Page :Algorithms in the Real World Data Compression II Arithmetic Coding – Integer implementation Applications of Probability Coding – Run.
Algorithm Design & Analysis – CS632 Group Project Group Members Bijay Nepal James Hansen-Quartey Winter
296.3Page 1 CPS 296.3:Algorithms in the Real World Data Compression: Lecture 2.5.
: Chapter 12: Image Compression 1 Montri Karnjanadecha ac.th/~montri Image Processing.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2011.
Huffman Encoding Veronica Morales.
1 Analysis of Algorithms Chapter - 08 Data Compression.
Lecture Objectives  To learn how to use a Huffman tree to encode characters using fewer bytes than ASCII or Unicode, resulting in smaller files and reduced.
Survey on Improving Dynamic Web Performance Guide:- Dr. G. ShanmungaSundaram (M.Tech, Ph.D), Assistant Professor, Dept of IT, SMVEC. Aswini. S M.Tech CSE.
Multimedia Data Introduction to Lossless Data Compression Dr Sandra I. Woolley Electronic, Electrical.
A Decompression Architecture for Low Power Embedded Systems Lekatsas, H.; Henkel, J.; Wolf, W.; Computer Design, Proceedings International.
Compression.  Compression ratio: how much is the size reduced?  Symmetric/asymmetric: time difference to compress, decompress?  Lossless; lossy: any.
1 Source Coding and Compression Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204, Lecture 5.
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
COMPRESSION. Compression in General: Why Compress? So Many Bits, So Little Time (Space) CD audio rate: 2 * 2 * 8 * = 1,411,200 bps CD audio storage:
Introduction to Algorithms Chapter 16: Greedy Algorithms.
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 8. Greedy Algorithms.
Huffman coding Content 1 Encoding and decoding messages Fixed-length coding Variable-length coding 2 Huffman coding.
Resource Mapping and Scheduling for Heterogeneous Network Processor Systems Liang Yang, Tushar Gohad, Pavel Ghosh, Devesh Sinha, Arunabha Sen and Andrea.
Design of Novel Two-Level Quantizer with Extended Huffman Coding for Laplacian Source Lazar Velimirović, Miomir Stanković, Zoran Perić, Jelena Nikolić,
Huffman Code and Data Decomposition Pranav Shah CS157B.
Abdullah Aldahami ( ) April 6,  Huffman Coding is a simple algorithm that generates a set of variable sized codes with the minimum average.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 6 – Basics of Compression (Part 1) Klara Nahrstedt Spring 2011.
Huffman Codes Juan A. Rodriguez CS 326 5/13/2003.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Bahareh Sarrafzadeh 6111 Fall 2009
Lossless Decomposition and Huffman Codes Sophia Soohoo CS 157B.
Huffman Codes. Overview  Huffman codes: compressing data (savings of 20% to 90%)  Huffman’s greedy algorithm uses a table of the frequencies of occurrence.
Multi-media Data compression
High Performance Embedded Computing © 2007 Elsevier Lecture 7: Memory Systems & Code Compression Embedded Computing Systems Mikko Lipasti, adapted from.
Compression techniques Adaptive and non-adaptive.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2012.
Page 1KUT Graduate Course Data Compression Jun-Ki Min.
Greedy algorithms 2 David Kauchak cs302 Spring 2012.
Lossless Compression-Statistical Model Lossless Compression One important to note about entropy is that, unlike the thermodynamic measure of entropy,
Ch4. Zero-Error Data Compression Yuan Luo. Content  Ch4. Zero-Error Data Compression  4.1 The Entropy Bound  4.2 Prefix Codes  Definition and.
HUFFMAN CODES.
Data Coding Run Length Coding
EE465: Introduction to Digital Image Processing
Proving the Correctness of Huffman’s Algorithm
Huffman Coding, Arithmetic Coding, and JBIG2
Arithmetic coding Let L be a set of items.
Advanced Algorithms Analysis and Design
Huffman Coding CSE 373 Data Structures.
UNIT IV.
Data Structure and Algorithms
A Block Based MAP Segmentation for Image Compression
Huffman Coding Greedy Algorithm
Proving the Correctness of Huffman’s Algorithm
Presentation transcript:

Hanyang University Hyunok Oh Energy Optimal Bit Encoding for Flash Memory

Contents  Motivational Example  Related Work  Cost compression algorithm to minimize energy consumption  Implementation  Experimental Results  Conclusion

Motivational Example Memory typeOperationTime(us)Energy(uJ) Intel MLC NOR 28F256L18 Program Program Program Program Energy consumption = for … = for … Y. Joo, etc. “Energy-Aware Data Compression for Multi-Level Cell (MLC) Flash Memory”, DAC 2007

Energy/Time Minimization Problem  Minimize the total energy/time in the compressed data  Example  Let f(x) be the number of occurrence of symbol x in {00, 01, 10, 11}.  Assume that f(00,01,10,11) = (50, 25,25,0).  The energy consumption is (=2.37* * *25).  The energy consumption is (= 2.37* * *25) if bit patterns (00,01,10,11) change to (11,01,00,11) Bit pattern mapping for optimal energy consumption

Cost Compression Each letter has a cost Minimize the total cost rather than the size

Morse Code  Cost compression problem  Minimize the sending time  Morse code example  Cost( - ) = 3  Cost(. ) = 1  : cost = 4 * * 1 = 14  : cost = 2 * * 1 = 10  Example  Assume f(a,b,c,d) = (5,3,4,5)  Total cost = 61 if codeword for (a,b,c,d) is (…,..-,.-, -)  Total cost = 68 if codeword for (a,b,c,d) is (..,.-,-.,--)

How to find the mapping?

Related Work Given cost (c1, …, cr) and probability (p1,…,pn) Find a tree T* with n leaves with minimum cost over all trees with n leaves (c1,c2,c3) = (1,1,2) (p1,p2,p3,p4,p5) = (9/10, 1/40, 1/40, 1/40, 1/40) – (a) is optimal (p1,p2,p3,p4,p5) = (1/5, 1/5, 1/5, 1/5, 1/5) M. Golin, G. Rote, ”A Dynamic Programming Algorithm for Constructing Optimal Prefix-Free Codes for Unequal Letter Costs”, IEEE Trans. Inform. Th., 44(5), pp , Sept

Relate Work  Modified JPEG compression procedure with the proposed energy-aware entropy coding for the MLC NOR flash

Cost Compression Constructing Optimal Prefix-Free Codes with Unequal Letter Costs – Unknown whether it is NP or not – ILP (Integer Linear Programming) – Dynamic Programming – Heuristics

This presentation proposes an optimal cost compression algorithm.

Proposed Approach  Optimal solution  Compression speed = size compression speed  Utilize the existing size compression algorithms

Proposed Approach for MLC flash … … … Size compressionCost compression … … Size compression

Example Assume that the size compressed data is – Original data size is while the compressed one is 500. Assume that cost(0) = 1 and cost(1)=3 – Let f(0) and f(1) represent the frequencies of “0” and “1” in C Problem formulation – Size constraint |C| <= |O| – Minimize cost 1*f(0)+3*f(1) – Entropy conservation since we cannot compress C smaller than S. H(C) >= 1/2 -(p(0)log(p(0)) + p(1)log(p(1))) >= 0.5 p(0)+p(1) = 1 – p(0) = 0.889, p(1) = xyzw 10… abcd C S O Size compression

Continue... If f(0) = 889 and f(1)=111 then the cost in C is minimal How to ?

Size Decompression Arithmetic coding – If there are 889 of 0’ and 111 of 1’ in data A then arithmetic coding compresses data A to data B. The entropy of data B = 1 – If the arithmetic decoding decompresses data B with p(0)=0.889 and p(1)=0.111 then data A is obtained. – If the arithmetic decoding decompresses data S with p(0)=0.889 and p(1)=0.111 then f(0)=889 and f(1)=111 in data C obtained. Assume that the entropy of data S = 1 10… abcd C S 10… 11.. A B H(A)=1 p(0)=0.889 p(1)=0.111 p(0)=0.889 p(1)= … A

Cost Compression for Minimal Data Equivalent to size decompression – Arithmetic decoding with given p(0) and p(1) generates data in which the probabilities of 0 and 1 are p(0) and p(1) from source data(H=1) regardless of the source data.

Proposed Cost Compression … … … Adaptive Arithmetic Encoding Non-adaptive Arithmetic Decoding Any compression Algorithm is applicable Arithmetic coding and Huffman coding are applicable. Dictionary coding? Size compression Cost compression = Size decompression S O S C

Cost Minimization for Flash Memory  Proposed framework  Write operation is performed by page unit in flash memory  Skip the cost compression if no size reduction is achieved by the size compression  Compression(or entropy) information must be saved in some place Compressed data Page unit Size compression Assign cost optimal probability Cost compression Write with header information No size reduction Page unit

Implementation – Size compression  Adaptive arithmetic coding  Any size compression algorithm is applicable  Compress data almost reach the best compression ratio  Compression process is done in a fully sequential manner, symbol after symbol

Assignment of Cost Optimal Bit-Pattern Probability  There are 4 bit patterns : 00, 01, 10, 11  Incremental and Common-Mode Costs are considered for each bit-pattern  The number of used bit patterns increases as entropy value increases  Linearize the probability into 7 sections in order to construct a table for the entropy and the probability.

Probability Graphs

Cost Compression  Size decompression  Non-adaptive arithmetic coding is adopted  Decompress data with assigned optimal bit-pattern probabilities  Uses 4 bit patterns for 4-level MLC Flash Memory  First 2-Byte is assigned for header which has entropy information

Implementation – File Structure  2 bit header + 2 byte header  2bit header indicates how many bit-patterns are used.  2byte header indicates the size of the size compressed data for the entropy value 2-bit headerindicates 0011 and 00 are used 0111, 00, 01 are used 10All patterns are used 11No compression data Bit-pattern information header (a) (b) Number of compressed data (a) is used for no compression mode (b) is used when 2-bit header is not 11

Experiment – Energy

Experiment –Latency

Experiment –Endurance

Conclusion  Propose a fast and optimal cost compression algorithm  Using size compression algorithms  Energy, latency and endurance are improved by applying the cost compression algorithm  un-compressed file type : energy and latency reductions are 25% ~ 75%  compressed file type : energy and latency reductions are 1~10%  Limitation and future work  Overhead of compression algorithm is not considered for latency and energy consumption  We are currently developing a Huffman coding based algorithm.