Understanding APFS Putting Theory into Practice
|
|
- Myrtle Shields
- 5 years ago
- Views:
Transcription
1 Understanding APFS Putting Theory into Practice Tim Standing Vice President Software Engineering - Mac OWC, Inc.
2 APFS and the T2 Chip APFS: How much does copy on write affect performance on HDDs? How does APFS allocate space for files? How does APFS organize files in a volume? T2 Chip: Flash Memory Controller Contains Secure Enclave Coprocessor Encryption Engine
3 Follow up from MacSysAdmin 2017
4 COPYING FILES WITH HFS+ Original File Extents Table Offset Length Nina s Birthday.mp4 Available space on disk: 90 GB 120 GB
5 COPYING FILES WITH HFS+ Original file with copy Original File Copy Extents Table Offset Length Nina s Birthday.mp4 Available space on disk: 80 GB 120 GB
6 COPYING FILES WITH HFS+ Editing 4 frames Original File Copy Extents Table Offset Length Edited frames Nina s Birthday.mp4 Available space on disk: 80 GB 120 GB
7 COPYING FILES WITH APFS Original File Extents Table Offset Length Nina s Birthday.mp4 Available space on disk: 90 GB 120 GB
8 COPYING FILES WITH APFS Original file with copy Original File Copy Extents Table Offset Length Nina s Birthday.mp4 Available space on disk: 90 GB 120 GB
9 COPYING FILES WITH APFS Original file after editing 4 frames Extents Table Offset Length shared with copy changed frame Old frames (removed from extents table) shared with copy changed frame shared with copy shared with copy changed frame shared with copy Edits saved separately, requiring extra extents changed frame shared with copy Nina s Birthday.mp4 120 GB
10 How to test the effect of copy on write with HDDs? Write to discontinuous parts of file 1) Create 10 GB File 2) Duplicate File 3) Write to File 4) Determine Time to Read Entire File
11 Time to read 10 GB file from HFS+ volume 160 Seconds to Read Entire File HFS Number of Discontiguous Writes
12 Time to read 10 GB file from HFS+ vs. APFS 160 Seconds to Read Entire File HFS+ APFS Number of Discontiguous Writes
13 Time to read 10 GB file from HDDs and SSDs (APFS Volumes) 160 Seconds to Read Entire File HDDs SSDs Number of Discontiguous Writes
14 Time to read 10 GB file from different HDDs (APFS Volumes) 160 Seconds to Read Entire File TB Consumer 12 TB Enterprise Number of Discontiguous Writes
15 Time to read different size files from HDDs (APFS Volumes) 160 Seconds to Read Entire File MB File 100 MB File 1 GB File 10 GB File Number of Discontiguous Writes
16 Automatic defragmention of APFS Volumes Status of automatic defragmentation Automatic defragmentation built into APFS Enabled via diskutil command in Terminal Enabling automatic defragmentation Disabled by default
17 How does APFS solve file system problems How does APFS allocate space How is it different than HFS+? Why is it faster? How does APFS organize files How does this affect the time taken to copy large numbers of files? How does this make snapshots possible?
18 Blocks in a file system Blocks in the volume (normally 4 KB) Blocks are numbered starting with zero. This is called the block address or block number
19 Allocating space for files on HFS+ Allocation bitmap - stored on disk Free Data Free Data Data Free Data Data Blocks in the volume
20 Allocating space for files on HFS+ How large is the bitmap for a 14 TB HFS+ volume? 14 TB = 14,000,000,000,000 Bytes = Blocks (4 KB) = Bytes for the allocation bitmap = 427 MB for the allocation bitmap Finding space for a new block involves a linear search through the bitmap On a full volume, this can take a lot of time Volumes start slowing down dramatically when they are 90% full
21 Allocating space for files on APFS Chunk Info Record Number Blocks Number Free Blocks Pointer to Bitmap 4 KB Bitmap Allocation bitmap - stored on disk Free Data Free Data Data Free Data Data Blocks on disk the volume
22 Allocating space for files on APFS Chunk Info Record Number Blocks Number Free Blocks Pointer to Bitmap 4 KB Bitmap Over 500 times faster at searching over filled blocks than HFS+ Checking one value determines if there is free space in the next 128 MB of the volume Bitmaps not allocated until first block is filled Allocation bitmap - stored on disk Free Data Free Data Data Free Data Data Blocks on disk the volume
23
24
25
26 Kungstorget, Göteborg
27 How are files organized in a file system? File systems are databases for file info and file data Like databases, usually implemented using B-Trees Entire file system tree cannot be kept in memory Must be fast to read sections of tree from disk File system B-Trees structures are usually = size of file system block
28 B-Tree records Each level in the tree contains records with keys and pointers Mark Mark is >= record we are searching for Tycho Tycho is >= record we are searching for Key Pointer
29 A simple B-Trees with 8 names Mark Tycho Justine Mark Patrick Tycho Information About Person Barry Justine Lauren Mark Nina Patrick Renee Tycho Barry Justine Lauren Mark Nina Patrick Renee Tycho
30 Finding Nina in the B-Tree Mark Tycho Tycho >= Nina Justine Mark Patrick Tycho Barry Justine Lauren Mark Nina Patrick Renee Tycho Barry Justine Lauren Mark Nina Patrick Renee Tycho
31 Finding Nina in the B-Tree Mark Tycho Justine Mark Patrick Tycho Patrick >= Nina Barry Justine Lauren Mark Nina Patrick Renee Tycho Barry Justine Lauren Mark Nina Patrick Renee Tycho
32 Finding Nina in the B-Tree Mark Tycho Justine Mark Patrick Tycho Barry Justine Lauren Mark Nina Patrick Renee Tycho Read Nina Info Barry Justine Lauren Mark Nina Patrick Renee Tycho
33 How does HFS+ organize files? Record in B-Tree 1 File system Block (4 KB) = records Directory ID & Filename Block Number To find info about a file or directory: 1. Search for record >= one you are looking for 2. Note the block number 3. Read file system block with that number 4. Repeat until you get the info record
34 Finding a file in the HFS+ B-Tree Find record >= one we are searching for 2. Read block #24
35 Finding a file in the HFS+ B-Tree 24 Block #24 60
36 Finding a file in the HFS+ B-Tree 24 Block #24 60 Block # Find record >= one we are searching for 2. Read block #60
37 Finding a file in the HFS+ B-Tree 24 Block #24 60 Block #60 98 Block #98 Info for file we are searching for 1. Find record >= one we are searching for 2. Read block #98
38 Finding a file in the HFS+ B-Tree 24 Block #24 60 Block #60 98 Block #98 Info for file we are searching for HFS+ B-Trees are usually no more than 6 levels deep Read less than 6 blocks to get info for a file in a directory Read less than 6 blocks for each directory level traversed
39 How does APFS organize files? Record in B-Tree 1 File system Block (4 KB) = records Directory ID & Filename Object ID To find info about a file or directory: 1. Search for record >= one you are looking for 2. Note the Object ID 3. Search through the Object ID B-Tree for the block number 4. Read file system block with that number 5. Repeat until you get the info record
40 Finding a file in the APFS B-Tree Find record >= one we are searching for 2. Search for Object # 18 in Object ID B-Tree
41 Finding a file in the APFS B-Tree 18 Block #24 Read Block #24 42
42 Finding a file in the APFS B-Tree 18 Block # Find record >= one we are searching for 2. Search for Object # 42 in Object ID B-Tree
43 Finding a file in the APFS B-Tree 18 Block #24 42 Block #98 Read Block #98 54
44 Finding a file in the APFS B-Tree 18 Block #24 42 Block # Find record >= one we are searching for 2. Search for Object # 54 in Object ID B-Tree
45 Finding a file in the APFS B-Tree 18 Block #24 42 Block #98 54 Block #121 Read Block #121 Info for file we are searching for
46 Finding a file in the APFS B-Tree 18 Block #24 42 Block #98 54 Traversing one level in the file B-Tree requires traversing Block #121 Read Block #121 Info for file we are searching for all levels of the Object ID B-Tree Read blocks to get info for 1 file in a directory
47 Finder Copy Speed - Duplicating ~130,000 files 800 HFS+ APFS 600 seconds ThunderBlade SSD HDD
48 Transaction IDs are stored in the Object ID B-Tree Looking up file with object ID 21 Obj 20 Tx Obj 21 Tx Obj 22 Tx 412 Obj 23 Tx 482 Obj 24 Tx 601 Block #62 Info for file before snapshot Volume Info: Transaction ID (Tx) 601
49 Taking a Snapshot Looking up file with object ID 21 Obj 20 Tx Obj 21 Tx Obj 22 Tx 412 Obj 23 Tx 482 Obj 24 Tx 601 Block #62 Info for file before snapshot Volume Info: Transaction ID 743 Snapshot Info: Transaction ID 601
50 Writing to a file after a snapshot Looking up file with object ID 21 Obj 19 Tx Obj 21 Tx Obj 21 Tx 654 Obj 22 Obj Tx 412 Tx 601 Block #62 Info for file before snapshot Volume Info: Transaction ID 743 Block #98 Info for file after snapshot Snapshot Info: Transaction ID 601
51 Accessing the latest version of a file Looking up file with object ID 21 Obj 19 Tx Obj 21 Tx Obj 21 Tx 654 Obj 22 Obj Tx 412 Tx 601 Volume Info: Transaction ID 743 Block #98 Info for file after snapshot Snapshot Info: Transaction ID 601
52 Accessing the file from the snapshot Looking up file with object ID 21 Obj 19 Tx Obj 21 Tx Obj 21 Tx 654 Obj 22 Obj Tx 412 Tx 601 Block #62 Info for file before snapshot Volume Info: Transaction ID 743 Snapshot Info: Transaction ID 601
53
54
55 How is the T2 chip used as a storage processor? Flash Memory Controller Contains Secure Enclave Coprocessor Encryption Engine
56 Flash memory controller Read/Write Channel Flash Memory Controller Flash Memory Module Cmd Data Idle Cmd Data Idle Cmd Data Idle Time
57 Faster flash memory controller Read/Write Channel Flash Memory Controller Flash Memory Flash Memory Flash Memory Module Module Module Cmd Data Cmd Data Cmd Data Cmd Data Cmd Data Cmd Data Cmd Data Time
58 T2 flash memory controller Read/WriteChannel Read/WriteChannel Flash Memory Modules
59 Secure Enclave coprocessor in the T2 chip At power on, Secure Enclave coprocessor: Loads Apple Root CA public key and L4 microkernel from ROM Verifies code signature of Bridge OS before loading it on the T2 chip
60 Secure Enclave coprocessor in the T2 chip At OS install time, If Secure Boot is enabled: A digest of the versions of installed system software, the machine ID and the startup volume ID are sent to Apple servers Apple servers sign the digest with the Apple private key and send the digest and signature back to the Mac. The digest and signature are stored in Secure Enclave coprocessor.
61 Secure Enclave coprocessor in the T2 chip At startup, if Secure Boot is enabled, Secure Enclave coprocessor: Checks that signature of digest is correct Checks that machine ID, system software version info and startup volume ID all match those found in the digest If the signature is invalid or the digest doesn t match the existing what is present on Mac, new copies of system software are downloaded, the new software is installed, a new digest is created and a new digest is sent to Apple for signing. The new signature and digest are stored.
62 More reading on Secure Enclave Chip and Secure Boot Documentation on Secure Boot on ios: Apple s Patent on the Secure Enclave Chip:
63 Review of FDE - Full Disk Encryption Early implementation 16BCD043 Encryption Software A FEB C9AB1 Unencrypted Data password1234 Encrypted Data User password is used as the key Mac Main Memory
64 Using MEK - Media Encryption Keys Setting up a password Generate Encrypted Key password1234 User s Password Encryption Software encrypted 256 bit key Key Encrypted encrypted 256 bit key Key Encrypted Key unencrypted 256 bit key Key written to disk Media Encryption Key Mac Main Memory
65 Using MEK - Media Encryption Keys Unlocking a volume Generate Unencrypted Key password1234 User s Password Encryption Software encrypted 256 bit key Key Encrypted encrypted 256 bit key Key Encrypted key unencrypted 256 bit key 256 bit key Key read from disk Media Encryption Key Mac Main Memory
66 Using MEK - Media Encryption Keys Reading encrypted data from disk 16BCD043 Encryption Software A FEB C9AB1 Unencrypted Encrypted Encrypted user data Data unencrypted 256 bit key Data read from disk Media Encryption Key Mac Main Memory
67 Using MEK - Media Encryption Keys Changing a password Encrypt key with new password A Better Password User s Password Encryption Software encrypted 256 bit key Key Encrypted encrypted 256 bit key Key Encrypted Key unencrypted 256 bit key Key written to disk Media Encryption Key Mac Main Memory
68 Using MEK - Media Encryption Keys Secure erasing volume Encryption Software Random number Random Number Random number Written to disk Mac Main Memory
69 Using MEK - Media Encryption Keys Unlocking a volume after secure erase Unencrypt Random Number A Better Password User s Encryption Software Random number Random number Password Random number Invalid key read from disk Mac Main Memory
70 Using MEK - Media Encryption Keys Reading data from disk after secure erase A346CD89 4AD98F32 2CB BFED91 Encryption Software 16BCD043 A FEB C9AB1 Random Data Invalid key Encrypted Data Mac Main Memory
71 Using MEK - Media Encryption Keys Advantages: Can change password simply Can secure erase data Securely erased data is protected by full strength random key Can have different passwords on separate volumes on the same disk Disadvantages: Encryption key is resident in memory whenever volume is unlocked
72 SED - Self Encrypting Drives Initializing disk with no password Encryption Hardware Random Number Generator unencrypted 256 bit key Media Encryption Key written to media Self Encrypting Drive
73 SED - Self Encrypting Drives Powering on a disk no password Encryption Hardware unencrypted 256 bit key Media Encryption Key unencrypted 256 bit key Media Encryption Key read from media Self Encrypting Drive
74 SED - Self Encrypting Drives Reading data without a password 16BCD043 Encryption Hardware A FEB C9AB1 Unencrypted Data unencrypted 256 bit key Media Encryption Key Encrypted user data read from disk Mac Main Memory Self Encrypting Drive
75 SED - Self Encrypting Drives Adding or changing a password password1234 User enters Encryption Hardware encrypted 256 bit key Key encrypted 256 bit key password unencrypted 256 bit key Encrypted Key Key Encrypted Key written to media Media Encryption Key Mac Main Memory Self Encrypting Drive
76 SED - Self Encrypting Drives Entering a password to unlock a drive Unencrypt Key password1234 User enters Encryption Hardware encrypted 256 bit key Key encrypted 256 bit key password unencrypted 256 bit key Encrypted Key Key Encrypted Key read from media Media Encryption Key Mac Main Memory Self Encrypting Drive
77 SED - Self Encrypting Drives Reading data 16BCD043 Encryption Hardware A FEB C9AB1 Unencrypted Data unencrypted 256 bit key Media Encryption Key Encrypted user data read from disk Mac Main Memory Self Encrypting Drive
78 Using SED - Self Encrypting Drives Advantages: Can change password simply Can secure erase data Securely erased data is protected by full strength random key No unencrypted key present in main memory Disadvantages: Only one password per disk
79 How does the T2 chip perform encryption??
80 What we know about encryption with the T2 chip Performs AES 256 bit encryption in hardware You can encrypt a volume with 500 GB of data in less than a second The Media Encryption Keys never leave the T2 chip APFS containers don t require a password Moving the SSD modules from one imac Pro to another makes them unreadable If SSD modules are removed from an imac Pro and replaced, they are no longer readable if the imac Pro has had other SSD modules installed in the interim
81 How T2 chip could implement encryption AFP Volume Info Object Object ID Container #1 401 Object ID 401 T2 Chip - power off Stored Key Unencrypted key Media Encyption Key Invalid Key Volume #1 (encrypted) Encrypted key Invalid Key Encryption Hardware Volume # Unencrypted key Unencrypted key Invalid Key Invalid Key Volume #3 528 Secure Enclave Coprocessor
82 How T2 chip could implement encryption AFP Volume Info Object Object ID Container #1 401 Object ID 401 T2 Chip - power on Stored Key Unencrypted key Media Encyption Key Unencrypted key Volume #1 (encrypted) Encrypted key Invalid Key Encryption Hardware Volume # Unencrypted key Unencrypted key Unencrypted key Unencrypted key Volume #3 528 Secure Enclave Coprocessor
83 How T2 chip could implement encryption Read object 401 data 16BCD043 A T2 Chip FEB C9AB1 Read Command Object ID Stored Key Media Encyption Key Encrypted data Offset: 0x Unencrypted key Unencrypted key read from media Length: 0x Encrypted key Invalid Key Encryption Hardware Buffer: 0xA Unencrypted key Unencrypted key Object ID: Unencrypted key Unencrypted key Secure Enclave Coprocessor Unencrypted data
84 How T2 chip could implement encryption Read object 526 data before password entered 16BCD043 A T2 Chip FEB C9AB1 Read Command Object ID Stored Key Media Encyption Key Encrypted data Offset: 0x Unencrypted key Unencrypted key read from media Length: 0x1000 Buffer: 0xA Encrypted key Unencrypted key Invalid Key Unencrypted key Encryption Hardware 16BCD043 A Object ID: Unencrypted key Unencrypted key FEB79136 Secure Enclave 854C9AB1 Coprocessor Invalid data
85 How T2 chip could implement encryption Enter password for object 526 T2 Chip Object ID Stored Key Media Encyption Key Password Command 401 Unencrypted key Unencrypted key Password: Encrypted key Unencrypted key Encryption Hardware Object ID: Unencrypted key Unencrypted key 528 Unencrypted key Unencrypted key Secure Enclave Coprocessor
86 How T2 chip could implement encryption Read object 526 data after password entered 16BCD043 A T2 Chip FEB C9AB1 Read Command Object ID Stored Key Media Encyption Key Encrypted data Offset: 0x Unencrypted key Unencrypted key read from media Length: 0x Encrypted key Unencrypted key Encryption Hardware Buffer: 0xA Unencrypted key Unencrypted key Object ID: Unencrypted key Unencrypted key Secure Enclave Coprocessor Unencrypted data
87 How T2 chip could implement encryption Encrypt object 528 T2 Chip Object ID Stored Key Media Encyption Key Encrypt Command 401 Unencrypted key Unencrypted key Password: Encrypted key Unencrypted key Encryption Hardware Object ID: Unencrypted key Unencrypted key 528 Encrypted key Unencrypted key Secure Enclave Coprocessor
88 How T2 chip could implement encryption Are all Media Encryption Keys the same? T2 Chip Object ID Stored Key Media Encyption Key 401 Unencrypted key 0x Encrypted key 0x Encryption Hardware 527 Unencrypted key 0x Encrypted key 0x Secure Enclave Coprocessor
89 How T2 chip could implement encryption Read object 526 data before password entered 16BCD043 A T2 Chip FEB C9AB1 Read Command Object ID Stored Key Media Encyption Key Encrypted data Offset: 0x Unencrypted key 0x read from media Length: 0x1000 Buffer: 0xA Encrypted key Unencrypted key Invalid Key 0x Encryption Hardware 16BCD043 A Object ID: Unencrypted key 0x FEB79136 Secure Enclave 854C9AB1 Coprocessor Invalid data
90 How T2 chip could implement encryption Reading password protected data without a password 16BCD043 A T2 Chip FEB C9AB1 Read Command Object ID Stored Key Media Encyption Key Encrypted data Offset: 0x Unencrypted key 0x read from media Length: 0x Encrypted key Invalid Key Encryption Hardware Buffer: 0xA Unencrypted key 0x Object ID: Unencrypted key 0x Secure Enclave Coprocessor Unencrypted data
91 Rick Rockhold VP Software Engineering, Windows OWC, Inc.
92 Mike Cobb Director of Engineering DriveSavers, Inc.
93 Q & A
FILE SYSTEMS. CS124 Operating Systems Winter , Lecture 23
FILE SYSTEMS CS124 Operating Systems Winter 2015-2016, Lecture 23 2 Persistent Storage All programs require some form of persistent storage that lasts beyond the lifetime of an individual process Most
More informationECE 598 Advanced Operating Systems Lecture 14
ECE 598 Advanced Operating Systems Lecture 14 Vince Weaver http://www.eece.maine.edu/~vweaver vincent.weaver@maine.edu 19 March 2015 Announcements Homework #4 posted soon? 1 Filesystems Often a MBR (master
More informationFILE SYSTEMS, PART 2. CS124 Operating Systems Fall , Lecture 24
FILE SYSTEMS, PART 2 CS124 Operating Systems Fall 2017-2018, Lecture 24 2 Last Time: File Systems Introduced the concept of file systems Explored several ways of managing the contents of files Contiguous
More informationEI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)
EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) Dept. of Computer Science & Engineering Chentao Wu wuct@cs.sjtu.edu.cn Download lectures ftp://public.sjtu.edu.cn User:
More informationFilesystem. Disclaimer: some slides are adopted from book authors slides with permission
Filesystem Disclaimer: some slides are adopted from book authors slides with permission 1 Recap Directory A special file contains (inode, filename) mappings Caching Directory cache Accelerate to find inode
More informationFile Systems. CS170 Fall 2018
File Systems CS170 Fall 2018 Table of Content File interface review File-System Structure File-System Implementation Directory Implementation Allocation Methods of Disk Space Free-Space Management Contiguous
More informationDeep Freeze Mac and CoreStorage
1 Technical Paper Last modified: March 2017 Web: www.faronics.com Email: sales@faronics.com Phone: 800-943-6422 or 604-637-3333 Fax: 800-943-6488 or 604-637-8188 Hours: Monday to Friday 7:00am to 5:00pm
More informationCS 550 Operating Systems Spring File System
1 CS 550 Operating Systems Spring 2018 File System 2 OS Abstractions Process: virtualization of CPU Address space: virtualization of memory The above to allow a program to run as if it is in its own private,
More informationCOMP091 Operating Systems 1. File Systems
COMP091 Operating Systems 1 File Systems Media File systems organize the storage space on persistent media such as disk, tape, CD/DVD/BD, USB etc. Disk, USB drives, and virtual drives are referred to as
More informationCS333 Intro to Operating Systems. Jonathan Walpole
CS333 Intro to Operating Systems Jonathan Walpole File Systems Why Do We Need a File System? Must store large amounts of data Data must survive the termination of the process that created it Called persistence
More informationFilesystem. Disclaimer: some slides are adopted from book authors slides with permission 1
Filesystem Disclaimer: some slides are adopted from book authors slides with permission 1 Storage Subsystem in Linux OS Inode cache User Applications System call Interface Virtual File System (VFS) Filesystem
More informationOperating Systems. Lecture File system implementation. Master of Computer Science PUF - Hồ Chí Minh 2016/2017
Operating Systems Lecture 7.2 - File system implementation Adrien Krähenbühl Master of Computer Science PUF - Hồ Chí Minh 2016/2017 Design FAT or indexed allocation? UFS, FFS & Ext2 Journaling with Ext3
More informationMain Points. File layout Directory layout
File Systems Main Points File layout Directory layout File System Design Constraints For small files: Small blocks for storage efficiency Files used together should be stored together For large files:
More informationFile System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
File System Case Studies Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics The Original UNIX File System FFS Ext2 FAT 2 UNIX FS (1)
More informationComputer Systems Laboratory Sungkyunkwan University
File System Internals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics File system implementation File descriptor table, File table
More informationMemory Management. Dr. Yingwu Zhu
Memory Management Dr. Yingwu Zhu Big picture Main memory is a resource A process/thread is being executing, the instructions & data must be in memory Assumption: Main memory is infinite Allocation of memory
More informationIntroduction to OS. File Management. MOS Ch. 4. Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1
Introduction to OS File Management MOS Ch. 4 Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Introduction to OS 1 File Management Objectives Provide I/O support for a variety of storage device
More informationMac Formatting Guide. Covers Disk Utility For: and later. Introduction
Mac Formatting Guide Covers Disk Utility For: 10.13 and later Introduction This guide focuses on the Disk Utility application, specifically the changes made starting with macos 10.13, and the process of
More informationFile System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
File System Case Studies Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics The Original UNIX File System FFS Ext2 FAT 2 UNIX FS (1)
More informationTDDB68 Concurrent Programming and Operating Systems. Lecture: File systems
TDDB68 Concurrent Programming and Operating Systems Lecture: File systems Mikael Asplund, Senior Lecturer Real-time Systems Laboratory Department of Computer and Information Science Copyright Notice: Thanks
More informationECE 598 Advanced Operating Systems Lecture 18
ECE 598 Advanced Operating Systems Lecture 18 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 5 April 2016 Homework #7 was posted Project update Announcements 1 More like a 571
More informationOperating Systems Design Exam 2 Review: Spring 2011
Operating Systems Design Exam 2 Review: Spring 2011 Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 CPU utilization tends to be lower when: a. There are more processes in memory. b. There are fewer processes
More informationFile System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
File System Internals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics File system implementation File descriptor table, File table
More informationCS 416: Opera-ng Systems Design March 23, 2012
Question 1 Operating Systems Design Exam 2 Review: Spring 2011 Paul Krzyzanowski pxk@cs.rutgers.edu CPU utilization tends to be lower when: a. There are more processes in memory. b. There are fewer processes
More informationBTREE FILE SYSTEM (BTRFS)
BTREE FILE SYSTEM (BTRFS) What is a file system? It can be defined in different ways A method of organizing blocks on a storage device into files and directories. A data structure that translates the physical
More informationGlossary. The target of keyboard input in a
Glossary absolute search A search that begins at the root directory of the file system hierarchy and always descends the hierarchy. See also relative search. access modes A set of file permissions that
More informationFile System Internals. Jo, Heeseung
File System Internals Jo, Heeseung Today's Topics File system implementation File descriptor table, File table Virtual file system File system design issues Directory implementation: filename -> metadata
More informationNAND Flash-based Storage. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
NAND Flash-based Storage Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics NAND flash memory Flash Translation Layer (FTL) OS implications
More informationMemory Management. Goals of Memory Management. Mechanism. Policies
Memory Management Design, Spring 2011 Department of Computer Science Rutgers Sakai: 01:198:416 Sp11 (https://sakai.rutgers.edu) Memory Management Goals of Memory Management Convenient abstraction for programming
More informationFile System Management
Lecture 8: Storage Management File System Management Contents Non volatile memory Tape, HDD, SSD Files & File System Interface Directories & their Organization File System Implementation Disk Space Allocation
More informationSegmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS)
Review Segmentation Segmentation Implementation Advantage of Segmentation Protection Sharing Segmentation with Paging Segmentation with Paging Segmentation with Paging Reason for the segmentation with
More informationCS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University
Frequently asked questions from the previous class survey CS 370: OPERATING SYSTEMS [FILE SYSTEMS] Shrideep Pallickara Computer Science Colorado State University If you have a file with scattered blocks,
More informationTCSS 422: OPERATING SYSTEMS
TCSS 422: OPERATING SYSTEMS File Systems and RAID Wes J. Lloyd Institute of Technology University of Washington - Tacoma Chapter 38, 39 Introduction to RAID File systems structure File systems inodes File
More informationFile Systems. CS 4410 Operating Systems. [R. Agarwal, L. Alvisi, A. Bracy, M. George, E. Sirer, R. Van Renesse]
File Systems CS 4410 Operating Systems [R. Agarwal, L. Alvisi, A. Bracy, M. George, E. Sirer, R. Van Renesse] The abstraction stack I/O systems are accessed through a series of layered abstractions Application
More informationCSE 120: Principles of Operating Systems. Lecture 10. File Systems. November 6, Prof. Joe Pasquale
CSE 120: Principles of Operating Systems Lecture 10 File Systems November 6, 2003 Prof. Joe Pasquale Department of Computer Science and Engineering University of California, San Diego 2003 by Joseph Pasquale
More informationNAND Flash-based Storage. Computer Systems Laboratory Sungkyunkwan University
NAND Flash-based Storage Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics NAND flash memory Flash Translation Layer (FTL) OS implications
More information22 File Structure, Disk Scheduling
Operating Systems 102 22 File Structure, Disk Scheduling Readings for this topic: Silberschatz et al., Chapters 11-13; Anderson/Dahlin, Chapter 13. File: a named sequence of bytes stored on disk. From
More informationFile System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
File System Internals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics File system implementation File descriptor table, File table
More informationFile Systems. Kartik Gopalan. Chapter 4 From Tanenbaum s Modern Operating System
File Systems Kartik Gopalan Chapter 4 From Tanenbaum s Modern Operating System 1 What is a File System? File system is the OS component that organizes data on the raw storage device. Data, by itself, is
More informationSection 10: Device Drivers, FAT, Queuing Theory, Memory Mapped Files
Section 10: Device Drivers, FAT, Queuing Theory, Memory Mapped Files CS162 Oct 31st, 2017 Contents 1 Warmup: I/O and Device Drivers 2 2 Vocabulary 2 3 Problems 4 3.1 FAT................................................
More informationFile Organization Sheet
File Organization Sheet 1. What are File Structures? A File Structure is a combination of representations for data in files and of operations for accessing the data. A File Structure allows applications
More informationOperating Systems. 09. Memory Management Part 1. Paul Krzyzanowski. Rutgers University. Spring 2015
Operating Systems 09. Memory Management Part 1 Paul Krzyzanowski Rutgers University Spring 2015 March 9, 2015 2014-2015 Paul Krzyzanowski 1 CPU Access to Memory The CPU reads instructions and reads/write
More informationMemory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts
Memory management Last modified: 26.04.2016 1 Contents Background Logical and physical address spaces; address binding Overlaying, swapping Contiguous Memory Allocation Segmentation Paging Structure of
More informationA Caching-Oriented FTL Design for Multi-Chipped Solid-State Disks. Yuan-Hao Chang, Wei-Lun Lu, Po-Chun Huang, Lue-Jane Lee, and Tei-Wei Kuo
A Caching-Oriented FTL Design for Multi-Chipped Solid-State Disks Yuan-Hao Chang, Wei-Lun Lu, Po-Chun Huang, Lue-Jane Lee, and Tei-Wei Kuo 1 June 4, 2011 2 Outline Introduction System Architecture A Multi-Chipped
More informationPharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah
The kinds of memory:- 1. RAM(Random Access Memory):- The main memory in the computer, it s the location where data and programs are stored (temporally). RAM is volatile means that the data is only there
More informationChapter 6: File Systems
Chapter 6: File Systems File systems Files Directories & naming File system implementation Example file systems Chapter 6 2 Long-term information storage Must store large amounts of data Gigabytes -> terabytes
More information[537] Fast File System. Tyler Harter
[537] Fast File System Tyler Harter File-System Case Studies Local - FFS: Fast File System - LFS: Log-Structured File System Network - NFS: Network File System - AFS: Andrew File System File-System Case
More informationNAND Flash-based Storage. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
NAND Flash-based Storage Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics NAND flash memory Flash Translation Layer (FTL) OS implications
More informationFile Systems. What do we need to know?
File Systems Chapter 4 1 What do we need to know? How are files viewed on different OS s? What is a file system from the programmer s viewpoint? You mostly know this, but we ll review the main points.
More informationYale Software Library
Yale Software Library http://www.yale.edu/its/software/ For assistance contact the ITS Help Desk 203-432-9000, helpdesk@yale.edu Creating Virtual Disks - PGP Desktop (Macintosh) Virtual Disks are encrypted
More informationParagon NTFS for Mac OS X
PARAGON Software GmbH Heinrich-von-Stephan-Str. 5c 79100 Freiburg, Germany Tel. +49 (0) 761 59018201 Fax +49 (0) 761 59018130 Internet www.paragon-software.com E-mail sales@paragon-software.com Paragon
More informationLocality and The Fast File System. Dongkun Shin, SKKU
Locality and The Fast File System 1 First File System old UNIX file system by Ken Thompson simple supported files and the directory hierarchy Kirk McKusick The problem: performance was terrible. Performance
More informationCSCI-GA Database Systems Lecture 8: Physical Schema: Storage
CSCI-GA.2433-001 Database Systems Lecture 8: Physical Schema: Storage Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com View 1 View 2 View 3 Conceptual Schema Physical Schema 1. Create a
More informationFile system internals Tanenbaum, Chapter 4. COMP3231 Operating Systems
File system internals Tanenbaum, Chapter 4 COMP3231 Operating Systems Architecture of the OS storage stack Application File system: Hides physical location of data on the disk Exposes: directory hierarchy,
More informationLecture 2: Memory Systems
Lecture 2: Memory Systems Basic components Memory hierarchy Cache memory Virtual Memory Zebo Peng, IDA, LiTH Many Different Technologies Zebo Peng, IDA, LiTH 2 Internal and External Memories CPU Date transfer
More informationFile System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
File System Case Studies Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics The Original UNIX File System FFS Ext2 FAT 2 UNIX FS (1)
More informationNAND Flash-based Storage. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
NAND Flash-based Storage Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics NAND flash memory Flash Translation Layer (FTL) OS implications
More informationChapter 4. File Systems. Part 1
Chapter 4 File Systems Part 1 1 Reading Chapter 4: File Systems Chapter 10: Case Study 1: Linux (& Unix) 2 Long-Term Storage of Information Must store large amounts of data Information must survive the
More informationFile System Implementation. Sunu Wibirama
File System Implementation Sunu Wibirama File-System Structure Outline File-System Implementation Directory Implementation Allocation Methods Free-Space Management Discussion File System Structure File
More informationOPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory
Q.1 Explain Memory Data Storage in storage device like CD, HDD, DVD, Pen drive etc, is called memory. The device which storage data is called storage device. E.g. hard disk, floppy etc. There are two types
More informationChapter 8: Filesystem Implementation
ADRIAN PERRIG & TORSTEN HOEFLER ( 252-0062-00 ) Networks and Operating Systems Chapter 8: Filesystem Implementation source: xkcd.com Access Control 1 Protection File owner/creator should be able to control:
More informationA file system is a clearly-defined method that the computer's operating system uses to store, catalog, and retrieve files.
File Systems A file system is a clearly-defined method that the computer's operating system uses to store, catalog, and retrieve files. Module 11: File-System Interface File Concept Access :Methods Directory
More informationMicrosoft File Allocation Table
Microsoft File Allocation Table CSC362, Information Security originally appeared in late 1970s for small disks with simple folder structures uses a FAT to index files (naturally) the original FAT- 12 gave
More informationFile Layout and Directories
COS 318: Operating Systems File Layout and Directories Jaswinder Pal Singh Computer Science Department Princeton University (http://www.cs.princeton.edu/courses/cos318/) Topics File system structure Disk
More informationFile System Structure. Kevin Webb Swarthmore College March 29, 2018
File System Structure Kevin Webb Swarthmore College March 29, 2018 Today s Goals Characterizing disks and storage media File system: adding order and structure to storage FS abstractions (files, directories,
More informationChapter 12: File System Implementation
Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Allocation Methods Free-Space Management
More informationvirtual memory. March 23, Levels in Memory Hierarchy. DRAM vs. SRAM as a Cache. Page 1. Motivation #1: DRAM a Cache for Disk
5-23 March 23, 2 Topics Motivations for VM Address translation Accelerating address translation with TLBs Pentium II/III system Motivation #: DRAM a Cache for The full address space is quite large: 32-bit
More informationCS3600 SYSTEMS AND NETWORKS
CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 11: File System Implementation Prof. Alan Mislove (amislove@ccs.neu.edu) File-System Structure File structure Logical storage unit Collection
More informationVirtual Memory 1. Virtual Memory
Virtual Memory 1 Virtual Memory key concepts virtual memory, physical memory, address translation, MMU, TLB, relocation, paging, segmentation, executable file, swapping, page fault, locality, page replacement
More informationChapter 8: Main Memory
Chapter 8: Main Memory Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and 64-bit Architectures Example:
More informationVirtual Memory 1. Virtual Memory
Virtual Memory 1 Virtual Memory key concepts virtual memory, physical memory, address translation, MMU, TLB, relocation, paging, segmentation, executable file, swapping, page fault, locality, page replacement
More informationCSE380 - Operating Systems
CSE380 - Operating Systems Notes for Lecture 17-11/10/05 Matt Blaze, Micah Sherr (some examples by Insup Lee) Implementing File Systems We ve looked at the user view of file systems names, directory structure,
More informationFile Systems. File system interface (logical view) File system implementation (physical view)
File Systems File systems provide long-term information storage Must store large amounts of data Information stored must survive the termination of the process using it Multiple processes must be able
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 20 Main Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Pages Pages and frames Page
More informationThe personal computer system uses the following hardware device types -
EIT, Author Gay Robertson, 2016 The personal computer system uses the following hardware device types - Input devices Input devices Processing devices Storage devices Processing Cycle Processing devices
More informationCS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University
Frequently asked questions from the previous class survey CS 370: SYSTEM ARCHITECTURE & SOFTWARE [FILE SYSTEMS] Interpretation of metdata from different file systems Error Correction on hard disks? Shrideep
More informationCHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.
CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. File-System Structure File structure Logical storage unit Collection of related information File
More informationChapter 5. File and Memory Management
K. K. Wagh Polytechnic, Nashik Department: Information Technology Class: TYIF Sem: 5G System Subject: Operating Name of Staff: Suyog S.Dhoot Chapter 5. File and Memory Management A. Define file and explain
More informationProblem Overhead File containing the path must be read, and then the path must be parsed and followed to find the actual I-node. o Might require many
Sharing files o Introduction Users often need to share files amongst themselves It is convenient for the shared file to appear simultaneously in different directories belonging to different users One of
More informationFILE / HOW TO BACKUP RESTORE FRESH OSX NEW HDD EBOOK
10 July, 2018 FILE / HOW TO BACKUP RESTORE FRESH OSX NEW HDD EBOOK Document Filetype: PDF 434.58 KB 0 FILE / HOW TO BACKUP RESTORE FRESH OSX NEW HDD EBOOK A Time Machine Backup (New Mac / fresh install
More informationCS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 13
CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2017 Lecture 13 COMPUTER MEMORY So far, have viewed computer memory in a very simple way Two memory areas in our computer: The register file Small number
More informationAdvanced Operating Systems
Advanced Operating Systems File Systems: File Allocation Table, Linux File System, NTFS Lecture 10 Case Studies of File Systems File Allocation Table (FAT) Unix File System Berkeley Fast File System Linux
More informationFile Systems. CS 4410 Operating Systems
File Systems CS 4410 Operating Systems Storing Information Applications can store it in the process address space Why is it a bad idea? Size is limited to size of virtual address space May not be sufficient
More informationChapter 8: Memory-Management Strategies
Chapter 8: Memory-Management Strategies Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and
More informationMain Points. File layout Directory layout
File Systems Main Points File layout Directory layout File System Design Constraints For small files: Small blocks for storage efficiency Files used together should be stored together For large files:
More informationMotivations for Virtual Memory Virtual Memory Oct. 29, Why VM Works? Motivation #1: DRAM a Cache for Disk
class8.ppt 5-23 The course that gives CMU its Zip! Virtual Oct. 29, 22 Topics Motivations for VM Address translation Accelerating translation with TLBs Motivations for Virtual Use Physical DRAM as a Cache
More informationChapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition
Chapter 8: Memory- Management Strategies Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation
More informationLecture S3: File system data layout, naming
Lecture S3: File system data layout, naming Review -- 1 min Intro to I/O Performance model: Log Disk physical characteristics/desired abstractions Physical reality Desired abstraction disks are slow fast
More informatione-pg Pathshala Subject: Computer Science Paper: Operating Systems Module 35: File Allocation Methods Module No: CS/OS/35 Quadrant 1 e-text
e-pg Pathshala Subject: Computer Science Paper: Operating Systems Module 35: File Allocation Methods Module No: CS/OS/35 Quadrant 1 e-text 35.1 Introduction File system is the most visible part of the
More informationFrequently asked questions from the previous class survey
CS 370: OPERATING SYSTEMS [FILE SYSTEMS] Shrideep Pallickara Computer Science Colorado State University L28.1 Frequently asked questions from the previous class survey How are files recovered if the drive
More informationCS399 New Beginnings. Jonathan Walpole
CS399 New Beginnings Jonathan Walpole Memory Management Memory Management Memory a linear array of bytes - Holds O.S. and programs (processes) - Each cell (byte) is named by a unique memory address Recall,
More informationApple Exam 9L0-412 OS X Support Essentials 10.8 Exam Version: 6.3 [ Total Questions: 86 ]
s@lm@n Apple Exam 9L0-412 OS X Support Essentials 10.8 Exam Version: 6.3 [ Total Questions: 86 ] Question No : 1 You are logged into a MacBook Pro as a standard user. How can you display the OS X Mountain
More informationMemory Management Topics. CS 537 Lecture 11 Memory. Virtualizing Resources
Memory Management Topics CS 537 Lecture Memory Michael Swift Goals of memory management convenient abstraction for programming isolation between processes allocate scarce memory resources between competing
More informationOperating Systems. Operating Systems Professor Sina Meraji U of T
Operating Systems Operating Systems Professor Sina Meraji U of T How are file systems implemented? File system implementation Files and directories live on secondary storage Anything outside of primary
More informationSolid State Drives (SSDs) Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Solid State Drives (SSDs) Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Memory Types FLASH High-density Low-cost High-speed Low-power High reliability
More informationVirtual Memory Oct. 29, 2002
5-23 The course that gives CMU its Zip! Virtual Memory Oct. 29, 22 Topics Motivations for VM Address translation Accelerating translation with TLBs class9.ppt Motivations for Virtual Memory Use Physical
More informationChapter Two File Systems. CIS 4000 Intro. to Forensic Computing David McDonald, Ph.D.
Chapter Two File Systems CIS 4000 Intro. to Forensic Computing David McDonald, Ph.D. 1 Learning Objectives At the end of this section, you will be able to: Explain the purpose and structure of file systems
More informationGuide to SATA Hard Disks Installation and RAID Configuration
Guide to SATA Hard Disks Installation and RAID Configuration 1. Guide to SATA Hard Disks Installation...2 1.1 Serial ATA (SATA) Hard Disks Installation...2 2. Guide to RAID Configurations...3 2.1 Introduction
More informationDisks and Files. Storage Structures Introduction Chapter 8 (3 rd edition) Why Not Store Everything in Main Memory?
Why Not Store Everything in Main Memory? Storage Structures Introduction Chapter 8 (3 rd edition) Sharma Chakravarthy UT Arlington sharma@cse.uta.edu base Management Systems: Sharma Chakravarthy Costs
More informationMain Memory (Part II)
Main Memory (Part II) Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) Main Memory 1393/8/17 1 / 50 Reminder Amir H. Payberah
More information