Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS8: File System 8.1. Background: File System.

Slides:



Advertisements
Similar presentations
Chapter 10: 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.
Lecture 12: File Management Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File Management provides.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
File System Implementation
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition 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
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.
Os111 Chapter 11 File-System Interface. os112 Outline File Concept Access Methods Directory Structure File System Mounting File Sharing Protection.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
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.
1 A Typical File-system Organization. 2 Directories Record information about groups of files Management of files Single-Level directory: most simple;
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 10 Operating 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.
Silberschatz, Galvin and Gagne  Operating System Concepts File Concept Contiguous logical address space Smallest user allocation Non-volatile.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
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.
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 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)
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 11: File-System Interface Modified.
10.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 10: File-System Interface.
Module 4.0: File Systems File is a contiguous logical address space.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
CS 346 – Chapter 11 File system –Files –Access –Directories –Mounting –Sharing –Protection.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
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.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File-System Interface.
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Chapter 10: File-System Interface Hung Q. Ngo KyungHee University Spring 2009
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10 & 11: File-System Interface and Implementation.
It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Lecture Topics: 11/29 File System Interface –Files and Directories –Access Methods –Protection –Consistency.
Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, Chapter 11: File-System Interface.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
W4118 Operating Systems Instructor: Junfeng Yang.
File System Interface Rahul Ajit Khin Zayar Htay.
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.
Chapter 11: File-System Interface
Unit OSC: Interoperability
File System Implementation
Unit OS8: File System 8.6. Quiz
Unit OS10: Fault Tolerance
Chapter 10: File-System Interface
File-System Interface
Lecture 4: File-System Interface
Presentation transcript:

Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS8: File System 8.1. Background: File System Concepts

2 Copyright Notice © David A. Solomon and Mark Russinovich These materials are part of the Windows Operating System Internals Curriculum Development Kit, developed by David A. Solomon and Mark E. Russinovich with Andreas Polze Microsoft has licensed these materials from David Solomon Expert Seminars, Inc. for distribution to academic organizations solely for use in academic environments (and not for commercial use)

3 Roadmap for Section 8.1 General Concepts - Files and File Attributes File Operations Directories Linking File Names and File Content File Protection Network File Systems

4 Background: UNIX File Systems File: Logical storage unit Unit of abstraction: Physical properties of storage devices are abstracted away Nonvolatile memory UNIX files are unstructured text files Organized in a directory structure Programs, commands: executable files

5 File Attributes Files are named For the convenience of the human user File names are case-sensitive File attributes typically consist of: Name Type (may be used by OS; UNIX does not distinguish file types) Location (pointer to device, location on device) Size (current size, possibly maximum size) Protection (read/write/execute (rwx) rights for users/groups/others) Time, date, user id for creation/modification/last access Owner of a file

6 File Operations A file is an abstract data type Values + set of applicable operations A set of basic file operations has to be supported by the OS Creating a file Allocate space in the file system, generate directory entry Allocate space in the file system, generate directory entry Writing a file Name of the file and information to be written has to be specified System hast to maintain a write pointer for the file Reading a file File name and a pointer to memory to receive data has to be specified System maintains a read pointer for the file

7 File Operations (contd.) Repositioning within a file (file seek) Directory is searched for the appropriate entry Read/write pointers for the file are set to a given value Deleting a file Release all file space; erase directory entry Instead of deleting a file, UNIX allows to unlink() files – file is deleted by the OS if the last link to a file disappears Truncating a file File attributes remain unchanged File length is set to zero (or to some specified value) Read pointer Write pointer UNIX supports the „truncation-on-close“ flag to truncate files Additional ops: Append Rename Set attributes...

8 Obtaining Access to a File Open() system call Takes a file name, searches the directory, checks file protection Copies directory entry into open-file table Returns a pointer to the entry in open-file table for subsequent use Close() system call Flushes cached file data back to the storage device Deletes entry from open-file table Frees system resources Operation in a multiuser environment Per-process and global open-file tables System maintains reference counts for opened files

9 Directories Record information about groups of files Management of files Single-Level directory: most simple; all files in the same directory Two-Level directory: separate directory for each user Tree-Structured (hierarchical) directories: most common Operations on directories: Search for a file Create a file (directory entry) Delete a file (directory entry) List a directory Rename a file Traverse the file system (recursive)

10 UNIX Directories Fully hierarchical, tree-structured Directories are represented as files Problem: Truncation Processes have a current working directory pwd command Each user has a home directory cd; echo $HOME – commands to obtain info about the home dir. The file system has a single root directory cd / - command changes working directory to root directory Special names identify neighbors in the directory tree./ - the current directory../ - the directory one level above the current directory

11 Linking Names and File Content UNIX separates file names and file content file content may have multiple (different) names ln command associates new name with existing file File content identified by: (Device, File system on device, i-node) i-node contains references to all blocks making up a file a free-node list is maintained for each file system Information contained in a UNIX i-node

12 File Protection Access rights can be independently defined for: (u) user – Owner (creator) of a file (g) group – Group (o) other – all other users of the UNIX system Example: luna test ( 48 )-% ls -lisa total drwxr-xr-x 2 apolze 1024 Jan 7 15: drwxr-xr-x 13 apolze 2048 Jan 7 15: rw apolze 0 Jan 7 15:05 Mail.txt rw-rw-rw- 1 apolze 0 Jan 7 15:05 test.c

13 File Protection (contd.) Access rights for a file: (r) Read access right; List right for directorisy (w) Write access right; includes delete/append rights (x) Execute access right; Traverse right for directories Binary representation: (x): Bit 0 (+1) (w): Bit 1 (+2) (r): Bit 2 (+4) Rights can be combined Read+Write access right: 6 Read+Execute access right: 3 Read-only: 2

14 Distribution – Network File Systems Various approaches towards distributed file systems: SUN Network File System (Standard) UNIX United Andrew File System SpriteLocus SUN NFS Client/Server-System (based on remote procedure call (RPC)) File system operations are forwarded from client to server Server executes actual file system operations, returns results Client has access to remote resources Stateless operation (Reliability !)

15 Operation of a Network File System A set of operations is implemented as RPC-callable functions: Searching for a file in a directory Reading a set of directory entries Manipulating links and directories Accessing file attributes Reading and writing files Logical connection between client and server has to be established mount protocol NFS works in heterogeneous environments Machine-independent protocol for data representation (XDR) Stateless protocol Network file system may tolerate client crashes (reboots)

16 Mounting a Remote File System Computer "sun" exports the "/local"-file system to computer "moon" Exported to moon Exported to all computers on the net

17 Windows – UNIX File System Interoperability Windows uses per default the Server Message Block (SMB) protocol to implement distributed file systems SMB/CIFS (remote) resource sharing: Samba – de.samba.org POSIX libraries/tool chains for Windows API: Cygwin – sources.redhat.com/cygwin/ U/WIN – www. research.att.com/sw/tools/uwin/ NuTCracker / MKS Toolkit – Interix, SFU –

18 What's Samba all about? Free SMB and CIFS client/server for UNIX & other OS Functionality: a SMB server, to provide Windows NT and LAN Manager- style file and print services to SMB clients such as Windows, Warp Server, smbfs and others. a NetBIOS (rfc1001/1002) nameserver, which amongst other things gives browsing support. Samba can be the master browser on your LAN if you wish. a ftp-like SMB client so you can access PC resources (disks and printers) from UNIX, Netware and other operating systems

19 Further Reading Mark E. Russinovich and David A. Solomon, Microsoft Windows Internals, 4th Edition, Microsoft Press, File System Formats (from pp. 689) Abraham Silberschatz, Peter B. Galvin, Operating System Concepts, John Wiley & Sons, 6th Ed., 2003; Chapter 11 - File-System Interface Chapter 12 - File-System Implementation Chapter 16 - Distributed File Systems