Lecture 11: Flash Memory and File System Abstraction

Slides:



Advertisements
Similar presentations
Chapter 12: File System Implementation
Advertisements

More on File Management
Chapter 4 : File Systems What is a file system?
File Systems.
Allocation Methods - Contiguous
Chapter 10: File-System Interface
File System Interface CSCI 444/544 Operating Systems Fall 2008.
Dr. Kalpakis CMSC 421, Operating Systems. Fall File-System Interface.
File Management Systems
Operating Systems File Systems (in a Day) Ch
File Systems Implementation
CS 333 Introduction to Operating Systems Class 18 - File System Performance Jonathan Walpole Computer Science Portland State University.
Ceng Operating Systems
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Lecture 17 FS APIs and vsfs. File and File Name What is a File? Array of bytes. Ranges of bytes can be read/written. File system consists of many files,
1 Course Outline Processes & Threads CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Networks, Protection and Security.
CS 333 Introduction to Operating Systems Class 19 - File System Performance Jonathan Walpole Computer Science Portland State University.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Storage Systems. Main Points File systems – Useful abstractions on top of physical devices Storage hardware characteristics – Disks and flash memory File.
Solid State Drive Feb 15. NAND Flash Memory Main storage component of Solid State Drive (SSD) USB Drive, cell phone, touch pad…
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
The Programming Interface. Main Points Creating and managing processes – fork, exec, wait Performing I/O – open, read, write, close Communicating between.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
CS 6560 Operating System Design Lecture 13 Finish File Systems Block I/O Layer.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 10-1: File Systems Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
File System Interface. File Concept Access Methods Directory Structure File-System Mounting File Sharing (skip)‏ File Protection.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: File System Implementation.
Lecture 3 Page 1 CS 111 Online Disk Drives An especially important and complex form of I/O device Still the primary method of providing stable storage.
CE Operating Systems Lecture 17 File systems – interface and implementation.
Operating Systems CMPSC 473 I/O Management (3) December 07, Lecture 24 Instructor: Bhuvan Urgaonkar.
CS333 Intro to Operating Systems Jonathan Walpole.
Lecture 22 SSD. LFS review Good for …? Bad for …? How to write in LFS? How to read in LFS?
File Systems - Part I CS Introduction to Operating Systems.
Instructor: Umar KalimNUST Institute of Information Technology Operating Systems File System Interface.
W4118 Operating Systems Instructor: Junfeng Yang.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.
CPSC 426: Building Decentralized Systems Persistence
Chapter 3 The Programming Interface Chien-Chung Shen CIS/UD
Lecture 13 Page 1 CS 111 Online Basics of File System Design Where do file systems fit in the OS? File control data structures.
Lecture : chapter 9 and 10 file system 1. File Concept A file is a collection of related information defined by its creator. Contiguous logical address.
File System Design David E. Culler CS162 – Operating Systems and Systems Programming Lecture 23 October 22, 2014 Reading: A&D a HW 4 out Proj 2 out.
Storage Devices CS 161: Lecture 11 3/21/17.
Jonathan Walpole Computer Science Portland State University
Chapter 11: File System Implementation
Chapter 12: File System Implementation
FileSystems.
Introduction to Operating Systems
Filesystems.
Introduction to Operating Systems
Subject Name: Operating Systems Subject Code:10CS53
EECE.4810/EECE.5730 Operating Systems
File Systems Kanwar Gill July 7, 2015.
File Structure 2018, Spring Pusan National University Joon-Seok Kim
EECE.4810/EECE.5730 Operating Systems
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
EECE.4810/EECE.5730 Operating Systems
Storage Systems Sudhanva Gurumurthi.
Chapter 10: File-System Interface
File-System Structure
Files Management – The interfacing
File System Implementation
Lecture 10: Magnetic Disks
Department of Computer Science
SE350: Operating Systems Lecture 12: File Systems.
Chapter 14: File System Implementation
Page Cache and Page Writeback
Lecture 29: File Systems (cont'd)
Introduction to Operating Systems
Introduction to Operating Systems
Presentation transcript:

Lecture 11: Flash Memory and File System Abstraction SE350: Operating Systems Lecture 11: Flash Memory and File System Abstraction

Main Points Flash Storage hardware characteristics File systems abstraction File system usage patterns

Flash Memory Storage that rarely becomes corrupted Capacity at intermediate cost More expensive than magnetic disks Block level random access Good performance for reads High overhead for random writes

www.androidcentral.com and flashdba.com Flash Memory Cells www.androidcentral.com and flashdba.com

Read/Write in Flash Memory Writes must be to “clean” cells Large block erasure required before write Erasure block: 128 – 512 KB Erasure time: Several milliseconds Write/read page (2-4KB) 50-100 usec

Flash Drive (Intel 710 SSD 2011)

Flash Translation Layer Flash device firmware Maps logical page # to a physical location Garbage collects erasure blocks by copying live pages to new location, then erase More efficient if blocks stored at same time are deleted at same time (e.g., keep blocks of a file together) Wear-levels by only writing each physical page a limited number of times Remaps pages that no longer work (sector sparing)

TRIM Command How does Flash device know which blocks are live? Live blocks must be remapped to a new location during erasure File system tells device when blocks are no longer in use

Main Points Flash Storage hardware characteristics File systems abstraction File system usage patterns

File System as Illusionist: Hide Limitations of Physical Storage Persistence of data stored in file system: Keep data persistent even if crash happens during an update, or disk block becomes corrupted, or flash memory wears out Naming: Allow named data instead of disk block numbers Allow directories instead of flat storage Allow byte addressable data even if devices are block-oriented Performance: Improve storage devices’ performance overhead by caching data and efficient data placement and data structure organization Controlled access to shared data: Restrict users’ access to data by adding access-control metadata

File System Abstraction Persistent, named data Hierarchical organization (directories, subdirectories) Access control on data File: named collection of data Linear sequence of bytes (or a set of sequences) Read/write or memory mapped Crash and storage error tolerance OS crashes (and disk errors) leave file system in a valid state Performance Achieve close to the hardware limit in the average case

File System Abstraction (cont.) Directory Group of named files or subdirectories Mapping from file name to file metadata location Path String that uniquely identifies file or directory E.g., /se/www/education/courses/se350/w19 Links Hard link: link from name to metadata location Soft link: link from name to alternate name

File System Abstraction (cont.) Volume Logical storage disk which is a collection of one or more physical storage devices Single physical device could be partitioned into multiple logical volumes Each instance of file system manages files and directories for a single volume

File System Abstraction (cont.) Mount: Mapping from name in one file system to root of another

UNIX File System API create, link, unlink, createdir, rmdir Create file, link to file, remove link Create directory, remove directory open, close, read, write, seek Open/close a file for reading/writing Seek resets current position fsync File modifications can be cached fsync forces modifications to disk (like a memory barrier)

File System Interface UNIX file open is a Swiss Army knife: Open the file, return file descriptor Options: if file doesn’t exist, return an error If file doesn’t exist, create file and open it If file does exist, return an error If file does exist, open file If file exists but isn’t empty, nix it then open If file exists but isn’t empty, return an error …

Interface Design Question Why not separate syscalls for open/create/exists? Would be more modular! if (!exists(name)) create(name); // can create fail? fd = open(name); // does the file exist?

Acknowledgment This lecture is a slightly modified version of the one prepared by Tom Anderson