ECE344-Lecture25-FileSystems

ECE344-Lecture25-FileSystems - Lecture 25 File Systems...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture 25: File Systems David Lie ECE344 University of Toronto
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 ECE344: Operating Systems Outline File Systems – Overview of file system – Disk Basics – File system design – Consistency and crash recovery Sharing files Unix file system Disks Disk scheduling algorithms Redundancy in storage systems
Background image of page 2
3 ECE344: Operating Systems Protection Who ( subject ) can access a file ( object )? How can they access it ( action )? A protection system dictations whether a given action performed by a given subject on an object is allowed – Actions include, read, write, execute, append, change protection, delete, etc. Two mechanisms for enforcing protection – Access control lists (ACL) – Capabilities
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 ECE344: Operating Systems Access Control Lists (ACL) For each object, maintain list of subjects and their permitted actions Easier to manage – Easy to grant, revoke Problem when objects are heavily shared – ACLs become large – Use groups
Background image of page 4
5 ECE344: Operating Systems Capabilities For each subject, maintain list of objects and their permitted actions Easier to transfer – Like keys, can handoff, does not depend on subject Revoking capability is challenging – Need to keep track of all subjects that have capability
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 ECE344: Operating Systems ACLs vs. Capabilities /one /two /three Alice rw - rw Bob w - r Charlie w r rw Objects ACL Capability
Background image of page 6
7 ECE344: Operating Systems The UNIX File-System Data Structures In memory On disk, cached in memory
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8 ECE344: Operating Systems Unix File-Related System Calls fd = open (name, mode) – Traverse directory tree, find i-node, check permissions, set up entry in open file table, return fd byte_count = read (fd, buffer, buffer_size) – Figure out block(s) to read, copy data to user buffer, return number of bytes read byte_count = write (fd, buffer, num_bytes) – Figure out block(s) to write, read them from disk, update buffer cache, copy data from user buffer, update i-node, mark buffers as dirty, schedule buffer write to disk, return number of bytes written close (fd) – Reclaim resources
Background image of page 8
9 ECE344: Operating Systems Mounting File Systems Say that a container holds a set of items Definition: The namespace is the set of unique names for items in the container – The file system namespace is the set of names for all files in a file system File system
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 25

ECE344-Lecture25-FileSystems - Lecture 25 File Systems...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online