CSE 451: Operating Systems Winter 2003 Lecture 13 File Systems

Slides:



Advertisements
Similar presentations
More on File Management
Advertisements

Chapter 10: File-System Interface
Chapter 10: File-System Interface
File System Interface CSCI 444/544 Operating Systems Fall 2008.
10.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 10: File-System Objectives To discuss file-system design tradeoffs, including.
1 Course Outline Processes & Threads CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Networks, Protection and Security.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
CSE 451: Operating Systems Winter 2010 Module 14 File Systems Mark Zbikowski Gary Kimura.
Operating Systems ECE344 Ding Yuan File System Lecture 11: File System.
CS 153 Design of Operating Systems Spring 2015 Lecture 20: File Systems.
Computer Studies (AL) File Management File system interface.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 10-1: File Systems Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Disks. Secondary Storage Secondary Storage Typically – Storage systems outside of “primary memory” – Cannot access data using load/store instructions.
File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.
Page 110/19/2015 CSE 30341: Operating Systems Principles Chapter 10: File-System Interface  Objectives:  To explain the function of file systems  To.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
CE Operating Systems Lecture 21 Operating Systems Protection with examples from Linux & Windows.
Module 4.0: File Systems File is a contiguous logical address space.
CS 153 Design of Operating Systems Spring 2015 Lecture 21: File Systems.
Disk & File System Management Disk Allocation Free Space Management Directory Structure Naming Disk Scheduling Protection CSE 331 Operating Systems Design.
IT 344: Operating Systems Module 14 File Systems Chia-Chi Teng CTB 265.
Lecture Topics: 11/29 File System Interface –Files and Directories –Access Methods –Protection –Consistency.
File Systems - Part I CS Introduction to Operating Systems.
CSE 451: Operating Systems Winter 2015 Module 15 File Systems Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska, Levy, Zahorjan.
W4118 Operating Systems Instructor: Junfeng Yang.
CSE Operating System Principles File Systems.
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.
CSE 153 Design of Operating Systems Spring 2016 Lecture 13: File Systems.
File System Interface CSSE 332 Operating Systems
Operating Systems ECE344 Lecture 11: File System Ding Yuan.
CHP - 9 File Structures.
Chapter 11: File System Implementation
COMP 3500 Introduction to Operating Systems File Management
CSE 120 Principles of Operating
Filesystems.
File Management.
CSE 451: Operating Systems Autumn 2001 Module 16 File Systems
Chapter 11: File System Implementation
CSE 451: Operating Systems Spring 2012 Module 15 File Systems
CSE 451: Operating Systems Spring 2013 Module 15 File Systems
CSE 153 Design of Operating Systems Winter 2018
CE Operating Systems Lecture 21
EECE.4810/EECE.5730 Operating Systems
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Chapter 10: File-System Interface
CSE 451: Operating Systems Autumn 2004 File Systems
CSE 451: Operating Systems Winter 2007 Module 14 File Systems
Directory Structure A collection of nodes containing information about all files Directory Files F 1 F 2 F 3 F 4 F n Both the directory structure and the.
CSE 451: Operating Systems Autumn 2003 Lecture 13 File Systems
CSE 451: Operating Systems Spring 2006 Module 12
IT 344: Operating Systems Winter 2008 Module 14 File Systems
Secondary Storage Management Brian Bershad
Chapter 10: File-System Interface
Files Management – The interfacing
CSE 542: Operating Systems
CSE 451: Operating Systems Winter 2009 Module 14 File Systems
CSE 451: Operating Systems Winter 2004 Module 14 File Systems
CSE 153 Design of Operating Systems Winter 2019
Operating System File-System Interface
CSE 451: Operating Systems Spring 2008 Module 14 File Systems
Secondary Storage Management Hank Levy
CS703 - Advanced Operating Systems
Services for Non-Volatile Storage
CSE 451: Operating Systems Autumn 2009 Module 14 File Systems
CSE 451: Operating Systems Autumn 2010 Module 14 File Systems
Lecture 4: File-System Interface
CSE 451: Operating Systems Autumn 2001 Lecture 13 File Systems
Chapter 5 File Systems -Compiled for MCA, PU
Introduction to Operating Systems
Presentation transcript:

CSE 451: Operating Systems Winter 2003 Lecture 13 File Systems Hank Levy levy@cs.washington.edu 412 Sieg Hall 1

File Systems The concept of a file system is simple the implementation of the abstraction for secondary storage abstraction = files logical organization of files into directories the directory hierarchy sharing of data between processes, people and machines access control, consistency, … 4/7/2019 © 2003 Hank Levy

Files A file is a collection of data with some properties contents, size, owner, last read/write time, protection … Files may also have types understood by file system device, directory, symbolic link understood by other parts of OS or by runtime libraries executable, dll, source code, object code, text file, … Type can be encoded in the file’s name or contents windows encodes type in name .com, .exe, .bat, .dll, .jpg, .mov, .mp3, … unix has a smattering of both in content via magic numbers or initial characters (e.g., #!) 4/7/2019 © 2003 Hank Levy

Basic operations NT Unix CreateFile(name, CREATE) create(name) CreateFile(name, OPEN) ReadFile(handle, …) WriteFile(handle, …) FlushFileBuffers(handle, …) SetFilePointer(handle, …) CloseHandle(handle, …) DeleteFile(name) CopyFile(name) MoveFile(name) Unix create(name) open(name, mode) read(fd, buf, len) write(fd, buf, len) sync(fd) seek(fd, pos) close(fd) unlink(name) rename(old, new) 4/7/2019 © 2003 Hank Levy

File Access Methods Some file systems provide different access methods that specify ways the application will access data sequential access read bytes one at a time, in order direct access random access given a block/byte # record access file is array of fixed- or variable-sized records indexed access FS contains an index to a particular field of each record in a file apps can find a file based on value in that record (similar to DB) Why do we care about distinguishing sequential from direct access? what might the FS do differently in these cases? 4/7/2019 © 2003 Hank Levy

Directories Directories provide: a way for users to organize their files a convenient file name space for both users and FS’s Most file systems support multi-level directories naming hierarchies (/, /usr, /usr/local, /usr/local/bin, …) Most file systems support the notion of current directory absolute names: fully-qualified starting from root of FS bash$ cd /usr/local relative names: specified with respect to current directory bash$ cd /usr/local (absolute) bash$ cd bin (relative, equivalent to cd /usr/local/bin) 4/7/2019 © 2003 Hank Levy

Directory Internals A directory is typically just a file that happens to contain special metadata directory = list of (name of file, file attributes) attributes include such things as: size, protection, location on disk, creation time, access time, … the directory list is usually unordered (effectively random) when you type “ls”, the “ls” command sorts the results for you 4/7/2019 © 2003 Hank Levy

Path Name Translation Let’s say you want to open “/one/two/three” fd = open(“/one/two/three”, O_RDWR); What goes on inside the file system? open directory “/” (well known, can always find) search the directory for “one”, get location of “one” open directory “one”, search for “two”, get location of “two” open directory “two”, search for “three”, get loc. of “three” open file “three” (of course, permissions are checked at each step) FS spends lots of time walking down directory paths this is why open is separate from read/write (session state) OS will cache prefix lookups to enhance performance /a/b, /a/bb, /a/bbb all share the “/a” prefix 4/7/2019 © 2003 Hank Levy

Protection Systems FS must implement some kind of protection system to control who can access a file (user) to control how they can access it (e.g., read, write, or exec) More generally: generalize files to objects (the “what”) generalize users to principles (the “who”, user or program) generalize read/write to actions (the “how”, or operations) A protection system dictates whether a given action performed by a given subject on a given object should be allowed e.g., you can read or write your files, but others cannot e.g., your can read /etc/motd but you cannot write to it 4/7/2019 © 2003 Hank Levy

Model for Representing Protection Two different ways of thinking about it: access control lists (ACLs) for each object, keep list of subjects and subj’s allowed actions capabilities for each subject, keep list of objects and subj’s allowed actions Both can be represented with the following matrix: objects /etc/passwd /home/gribble /home/guest root rw gribble r guest subjects capability ACL 4/7/2019 © 2003 Hank Levy

ACLs vs. Capabilities Capabilities are easy to transfer they are like keys: can hand them off they make sharing easy ACLs are easier to manage object-centric, easy to grant and revoke to revoke capability, need to keep track of subjects that have it hard to do, given that subjects can hand off capabilities ACLs grow large when object is heavily shared can simplify by using “groups” put users in groups, put groups in ACLs you are all in the “VMware powerusers” group on Win2K additional benefit change group membership, affects ALL objects that have this group in its ACL 4/7/2019 © 2003 Hank Levy