Lecture Topics: 11/29 File System Interface –Files and Directories –Access Methods –Protection –Consistency.

Slides:



Advertisements
Similar presentations
File-System Interface
Advertisements

1 Chapter 11: File-System Interface  File Concept  Access Methods  Directory Structure  File System Mounting  File Sharing  Protection  Chapter.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
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.
1 File Management (a). 2 File-System Interface  File Concept  Access Methods  Directory Structure  File System Mounting  File Sharing  Protection.
04/02/2004CSCI 315 Operating Systems Design1 File System Interface.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File-System Interface.
04/05/2010CSCI 315 Operating Systems Design1 Virtual Memory Wrap-up; File System Interface.
File Systems. 2 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.
Chapter 10: File-System Interface
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
10.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 10: File-System Objectives To discuss file-system design tradeoffs, including.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 10: File-System Interface File Concept.
File Concept l Contiguous logical address space l Types: Data: numeric, character, binary Program: source, object (load image) Documents.
Os111 Chapter 11 File-System Interface. os112 Outline File Concept Access Methods Directory Structure File System Mounting File Sharing Protection.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
File Concept §Contiguous logical address space §Types: l Data: Numeric Character Binary l Program.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10: File-System Interface.
Chapter 10 File System Interface
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 10: File-System Interface.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts File Concept Contiguous logical address space Smallest user allocation Non-volatile.
File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.
OSes: 10. FileSys Intf. 1 Operating Systems v Objectives –describe the user interface to the file system (files, directories, access) Certificate Program.
Chap 10 File-System Interface. Objectives To explain the function of file systems To describe the interfaces to file systems To discuss file-system design.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
Chapter 10: File-System Interface 10.1 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts – 8 th Edition 2014.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
File System Interface. File Concept Access Methods Directory Structure File-System Mounting File Sharing (skip)‏ File Protection.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
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)
File-System. Overview File system is the visible aspect of an OS. It provides mechanism for on-line storage of and access to both data and programs of.
10.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 10: File-System Interface.
1 File Management Chapter File Management n File management system consists of system utility programs that run as privileged applications n Concerned.
Module 4.0: File Systems File is a contiguous logical address space.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 11: File-System Interface File Concept Access Methods Directory Structure.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
Disk & File System Management Disk Allocation Free Space Management Directory Structure Naming Disk Scheduling Protection CSE 331 Operating Systems Design.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 10: File-System Interface File Concept.
Silberschatz and Galvin  Operating System Concepts Module 10: File-System Interface File Concept Access :Methods Directory Structure Protection.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10 & 11: File-System Interface and Implementation.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Operating Systems 1 K. Salah Module 4.0: File Systems  File is a contiguous logical address space (of related records)  Access Methods  Directory Structure.
Access Methods File store information When it is used it is accessed & read into memory Some systems provide only one access method IBM support many access.
Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, Chapter 11: File-System Interface.
Operating Systems Files, Directory and File Systems Operating Systems Files, Directory and File Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
Instructor: Umar KalimNUST Institute of Information Technology Operating Systems File System Interface.
W4118 Operating Systems Instructor: Junfeng Yang.
SVBIT SUBJECT:- Operating System TOPICS:- File Management
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
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.
File System Interface CSSE 332 Operating Systems
Module 10: File-System Interface
Chapter 11: File-System Interface
Chapter 11: File-System Interface
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
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.
Chapter 10: File-System Interface
Module 10: File-System Interface
Lecture 4: File-System Interface
Lecture Topics: 11/20 HW 7 What happens on a memory reference Traps
Presentation transcript:

Lecture Topics: 11/29 File System Interface –Files and Directories –Access Methods –Protection –Consistency

Files A user-level abstraction for “a collection of bytes in (non-volatile) storage” Files have: –A name –Possibly a type –A location - which device, where on that device –Size (and possibly maximum size) –Protection - who may read and write this? –Time, date, and user identification

File Operations File creation –make room for the file –enter the new file into the directory Writing a file –specify the file and the data to write to the file –OS keeps track of your location in the file –successive writes are placed one after the other in the file

More File Operations Reading a file –specify the file and the buffer into which the data should be read –OS keeps track of your location in the file –Location pointer is often shared between read and write operations Repositioning within a file –Changes the location pointer –Often called “seeking” –No actual I/O

Yet More File Operations Deleting a file –Find the directory entry and delete it –Mark the space used by the file as free –Don’t actually “erase” the file Truncating a file –Throw away all the data in the file –Keep the attribute information

Opening and Closing Files The above six operations are enough But for convenience, we have the notion of the open file The open system call tells the OS that the specified file will be used by several operations –user need not specify name each time –OS need not search directories each time –Location pointers, etc. need only be maintained for open files

Directories The directory lists all of the files in the volume –A volume is a logical disk - there may be more than one volume per physical disk We put the directory at the beginning so we always know where to start Directory Files Volume

Single-Level Directories In a single-level directory structure, the directory lists all files and their offsets Like a table of contents notes410 5 Spring99 12 todo 55 ideas 59 notes 410 Spring99 todo ideas

Two-Level Directories Single-level directories suffer from name collision –If you and I both name a file “prog1.c” then one file will overwrite the other Split up the space into top-level directories for each user Keep a directory for each user’s files, and a directory of the user directories

Tree-Structured Directories Let directories contain subdirectories Arrange files in a tree To name a file, specify a list of directories from the top down, plus the name of the file itself –This is called a path name A path beginning at the root is an absolute path; if part of the path is implied, it’s a relative path

The Current Directory Set the current directory with setcwd() system call All future open() calls interpret path names relative to the current directory –Saves on directory lookups Initial current directory is often set at login time, to the user’s home directory

Acyclic Graph Directories Like tree structures, but some nodes have more than one parent Facilitates sharing But how should deletion work? hard links vs. soft or symbolic links

General Graph Directories Acyclic graphs are usually right, but it’s expensive to check for cycles Instead, many systems allow any kind of graph –A is a subdirectory of B, and B is a subdirectory of A Now, applications that traverse the tree have to be careful Also, reference counting for deletion may not work

File Protection Protection allows the owner of a file or directory to define who may do what to that file or directory –The who is restricted by user or group –The what is restricted by type of access: read, write, execute (Unix) read, lookup, insert, delete, write, lock, administrative (AFS)

Access Control Lists Access Control Lists (ACLs) are properties of a file or a directory They list what operations particular users are allowed to execute An AFS-ish example: > fs listacl research system:anyuser none gretta all levy read

Drawbacks of ACLs Directory entries are now variable sized Listing all users who may read a file can be tedious –Workarounds: specify polices for groups –Apply ACLs to directories rather than files –Allow negative ACLs

Unix File System Protection A simplified ACL scheme Only three classifications of users: –Owner, Group, and Universe Only three operations: –Read, Write, Execute Now all protection information can be specified with nine bits –see these on a Unix system with “ls -l”

Consistency Semantics Suppose two users have the same file open at the same time If one of them writes to the file, –when should the other user see the changes? immediately? not until reopening? Should the location pointer be shared or separate?

Consistency Policies Unix (for local files): writes are immediately visible, location pointer may be shared AFS: writes by another user are not visible until the file is closed and reopened Immutable-Shared-Files: files may be either shared or writable but not both (locking)