File Concept l Contiguous logical address space l Types: Data: numeric, character, binary Program: source, object (load image) Documents.

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.
Chapter 10: File-System Interface
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.
1 Operating Systems Chapter 7-File-System File Concept Access Methods Directory Structure Protection File-System Structure Allocation Methods Free-Space.
Chapter 10: File-System Interface
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
Chapter 11: File-System Interface
A. Frank - P. Weisberg Operating Systems File-System Interface.
Os111 Chapter 11 File-System Interface. os112 Outline File Concept Access Methods Directory Structure File System Mounting File Sharing Protection.
03/30/2007CSCI 315 Operating Systems Design1 Virtual Memory cont’d.; File System Interface.
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.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 10 Operating Systems.
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.
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.
11.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
10.1 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure File-System.
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 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-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.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 11: File-System Interface Modified.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 18: File-System Interface (Ch 10)
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.
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Chapter 10: File-System Interface File Concept Contiguous logical address space Types: Data  numeric  character  binary Program.
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.
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.
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
Chapter 13: File-System Interface
Module 10: File-System Interface
Chapter 11: File-System Interface
Chapter 11: File-System Interface
Thrashing If a process does not have “enough” pages, the page-fault rate is very high. This leads to: low CPU utilization operating system thinks that.
Chapter 10: File-System Interface
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
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
Module 10: File-System Interface
Lecture 4: File-System Interface
Presentation transcript:

File Concept l Contiguous logical address space l Types: Data: numeric, character, binary Program: source, object (load image) Documents

File Structure l None - sequence of words, bytes l Simple record structure Lines Fixed length Variable length l Complex Structures Formatted document Relocatable load file

File Structure (cont) l Can simulate last two with first method by inserting appropriate control characters. l Who decides: Operating system Program

File Attributes l Name – only information kept in human-readable form. l Type – needed for systems that support different types. l Location – pointer to file location on device. l Size – current file size.

File Attributes (cont) l Protection – controls who can do reading, writing, executing. l Time, date, and user identification – data for protection, security, and usage monitoring. l Information about files are kept in the directory structure, which is maintained on the disk.

File Operations l create l write l read l reposition within file – file seek l delete l truncate

File Operations (cont) l open(F i ) – search the directory structure on disk for the name F i, and move the contents of the entry to memory. l close (F i ) – move the contents of entry F i in memory to directory structure on disk.

Information on Open File l File pointer – where in the file to read or write. l File open count – number of processes that are using this file. l Disk location of file – where the file is located on disk.

File Types – name.extension

Access Methods l Sequential Access read next write next reset rewrite

Access Methods (cont) l Direct Access read n, write n position to n, read next, write next, rewrite n n = relative block number

Directory Structure l A collection of nodes containing information about all files. Directory F 1 F 2 F 3 F 4 F n Files

Directory Structure (cont) l Both the directory structure and the files reside on disk. l Backups of these two structures are kept on tapes.

Information in a Device Directory l Name l Type l Address l Current length l Maximum length l Date last accessed (for archival)

Information in a Device Directory (cont) l Date last updated (for dump) l Owner ID (who pays) l Protection information (discuss later)

Operations Performed on Directory l Search for a file l Create a file l Delete a file l List a directory l Rename a file l Traverse the file system

Organize the Directory (Logically) to Obtain l Efficiency – locating a file quickly. l Naming – convenient to users. Two users can have same name for different files. The same file can have several different names. l Grouping – logical grouping of files by properties, (e.g., all C programs, all games, …)

Single-Level Directory l A single directory for all users. l Naming problem l Grouping problem

Two-Level Directory l Separate directory for each user.

Two Level Directory (cont) l Path name l Can have the same file name for different users l Efficient searching l No grouping capability

Tree Structured Directories

Tree Structured Directories (cont) l Efficient searching l Grouping Capability l Current directory (working directory) cd /spell/mail/prog type list

Tree Structured Directories (cont) l Absolute or relative path name l Creating a new file is done in current directory. l Delete a file – rm l Creating a new subdirectory is done in current directory. mkdir

Tree Structured Directories (cont) Example: if in current directory /spell/mail – mkdir count l Deleting “mail”  deleting the entire subtree rooted by “mail”. mail progcopyprtexpcount

Acyclic Graph Directories l Have shared subdirectories and files.

Acyclic Graph Directories (cont) l Two different names (aliasing) l If dict deletes count  dangling pointer. Solutions: Backpointers, so we can delete all pointers. Variable size records a problem. Backpointers using a daisy chain organization. Entry-hold-count solution.

General Graph Directory

General Graph Directory (cont) l How do we guarantee no cycles? Allow only links to file not subdirectories. Garbage collection. Every time a new link is added use a cycle detection algorithm to determine whether it is OK.

Protection l File owner/creator should be able to control: What can be done By whom l Types of access: Read Write Execute Append Delete List

Access Lists and Groups l Mode of access: read, write, execute l Three classes of users owner RWX 7  group RWX 6  publicRWX 1  0 0 1

Access Lists and Groups (cont) l Ask manager to create a group (unique name), say G, and add some users to the group. l For a particular file (say game) or subdirectory, define an appropriate access. l Attach a group to a file chgrp G game ownergrouppublic chmod761game