CHAPTER 17: File Management



Similar documents
CHAPTER 15: Operating Systems: An Overview

Operating Systems CSE 410, Spring File Management. Stephen Wagner Michigan State University

Chapter 12 File Management. Roadmap

Chapter 12 File Management

File System Management

File-System Implementation

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface

Chapter 12 File Management

Chapter 11: File System Implementation. Operating System Concepts with Java 8 th Edition

Windows OS File Systems

File Management. Chapter 12

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems

Chapter Contents. Operating System Activities. Operating System Basics. Operating System Activities. Operating System Activities 25/03/2014

1 File Management. 1.1 Naming. COMP 242 Class Notes Section 6: File Management

Outline: Operating Systems

Chapter 11: File System Implementation. Operating System Concepts 8 th Edition

COS 318: Operating Systems. File Layout and Directories. Topics. File System Components. Steps to Open A File

FAT32 vs. NTFS Jason Capriotti CS384, Section 1 Winter Dr. Barnicki January 28, 2000

TELE 301 Lecture 7: Linux/Unix file

File Management Chapters 10, 11, 12

New Technologies File System (NTFS) Priscilla Oppenheimer. Copyright 2008 Priscilla Oppenheimer

Physical Data Organization

File Management. COMP3231 Operating Systems. Kevin Elphinstone. Tanenbaum, Chapter 4

& Data Processing 2. Exercise 2: File Systems. Dipl.-Ing. Bogdan Marin. Universität Duisburg-Essen

Distributed File Systems

CHAPTER 7: The CPU and Memory

File Management. Chapter 12

File Systems Management and Examples

Filing Systems. Filing Systems

Learning Objectives. Chapter 1: Networking with Microsoft Windows 2000 Server. Basic Network Concepts. Learning Objectives (continued)

Chapter 12 File Management

File System Forensics FAT and NTFS. Copyright Priscilla Oppenheimer 1

OPERATING SYSTEMS FILE SYSTEMS

Prof. Dr. Ing. Axel Hunger Dipl.-Ing. Bogdan Marin. Operation Systems and Computer Networks Betriebssysteme und Computer Netzwerke

Windows NT File System. Outline. Hardware Basics. Ausgewählte Betriebssysteme Institut Betriebssysteme Fakultät Informatik

Outline. Windows NT File System. Hardware Basics. Win2K File System Formats. NTFS Cluster Sizes NTFS

Network Attached Storage. Jinfeng Yang Oct/19/2015

Chapter 6, The Operating System Machine Level

Outline. File Management Tanenbaum, Chapter 4. Files. File Management. Objectives for a File Management System

Flexible Storage Allocation

File Systems for Flash Memories. Marcela Zuluaga Sebastian Isaza Dante Rodriguez

1. Introduction to the UNIX File System: logical vision

Lecture 18: Reliable Storage

Part III Storage Management. Chapter 11: File System Implementation

Distributed File Systems Part I. Issues in Centralized File Systems

E-Business Technologies

OPERATING SYSTEM - MEMORY MANAGEMENT

Storage and File Systems. Chester Rebeiro IIT Madras

Chapter 4. Operating Systems and File Management

Module 2: File Systems and Management

WHITE PAPER Optimizing Virtual Platform Disk Performance

NSS Volume Data Recovery

Record Storage and Primary File Organization

1.0 About this Guide Check to see if IIS and FTP Services are Installed Installing IIS Configuring the FTP Service...

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

Disk Space Management Methods

The Einstein Depot server

Main Points. File layout Directory layout

Chapter 10 Case Study 1: LINUX

IT6203 Systems & Network Administration. (Optional)

HP-UX System and Network Administration for Experienced UNIX System Administrators Course Summary

XFS File System and File Recovery Tools

XenData Archive Series Software Technical Overview

Chapter 13. Disk Storage, Basic File Structures, and Hashing

Operating System Structures

COS 318: Operating Systems

FILE MANAGEMENT CHAPTER

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 13-1

RECOVER ( 8 ) Maintenance Procedures RECOVER ( 8 )

STUDY GUIDE CHAPTER 4

Linux Kernel Architecture

technology brief RAID Levels March 1997 Introduction Characteristics of RAID Levels

USB 2.0 Flash Drive User Manual

IT Essentials v4.1 LI Upgrade and configure storage devices and hard drives. IT Essentials v4.1 LI Windows OS directory structures

Storage in Database Systems. CMPSCI 445 Fall 2010

Chapter 13 Disk Storage, Basic File Structures, and Hashing.

6. Storage and File Structures

Distributed File Systems. Chapter 10

Installing a Second Operating System

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging

File Services. File Services at a Glance

Operating system Dr. Shroouq J.

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

Example of Standard API

Sawmill Log Analyzer Best Practices!! Page 1 of 6. Sawmill Log Analyzer Best Practices

NovaBACKUP. User Manual. NovaStor / November 2011

Digital Forensics Lecture 3. Hard Disk Drive (HDD) Media Forensics

Using Symantec NetBackup with Symantec Security Information Manager 4.5

Adaptive Server Enterprise

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective

IFSM 310 Software and Hardware Concepts. A+ OS Domain 2.0. A+ Demo. Installing Windows XP. Installation, Configuration, and Upgrading.

The Linux Virtual Filesystem

Chapter 11 I/O Management and Disk Scheduling

Quantum StorNext. Product Brief: Distributed LAN Client


Transcription:

CHAPTER 17: File Management The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides authored by Wilson Wong, Bentley University PowerPoint slides for the 3 rd edition were co-authored with Lynne Senne, Bentley College

Introduction to Files Collection of (usually related) data Block Typically 256, 512, or 1024 bytes Files usually require a 1-block minimum Cluster Groups of one or more blocks Blocks or clusters correspond to one or more sectors on a disk s single track or cylinder File extension Name of file includes identification of what type of file it is File Association The file specifies which program with which it is to be used Chapter 17 File Management 17-2

Terminology Logical view Contents and attributes of files viewed by the user Physical view The actual way a file is stored within the computer system Sequential access Data files whose records always have to be retrieved from the beginning Random or relative access Data files whose records can be retrieved from anywhere in the file in random sequence Contiguous The blocks that hold a particular file are stored together Noncontiguous The blocks that hold a particular file are scattered all over the device Chapter 17 File Management 17-3

Database File Table Image Chapter 17 File Management 17-4

Database File Form Image Chapter 17 File Management 17-5

Database File Stream Image Closer to physical representation of file Example: YouTube video Chapter 17 File Management 17-6

Logical View vs. Physical View Chapter 17 File Management 17-7

File Management System Provides a logical view for the user and hides the physical implementation Consistent set of commands that are translated to a form appropriate for the device Consistent view of files regardless of file type, file characteristics, or device Supports manipulation of data within the file Manages directory structures which are presented in a logical view Command shell takes user file commands and program file requests and translates them for the file manager Requests data transfers from I/O device drivers File security and protection of file integrity Chapter 17 File Management 17-8

File Manager Request Handling Chapter 17 File Management 17-9

File Operations (1) File as a whole Copy, Move List, Print Load and execute a program Load file into memory Store file from memory Append data from memory to file Compile, assemble a file Chapter 17 File Management 17-10

File Operations (2) Within a file Open a file Read a number of bytes from file Write a number of bytes to a file Move the file pointer forward or backward Move file pointer to beginning of a file Close a file Chapter 17 File Management 17-11

File Operations (3) Record Storage Retrieve a record (read) Store a record (write) Add a record to a file Delete a record Modify contents of a record Chapter 17 File Management 17-12

File Directory Operations File Directory Create a new (empty) file Move a file from one directory to another Rename a file Append one file to another Delete a file Chapter 17 File Management 17-13

File Management and I/O Functions Separation between the two allows 1. I/O devices can change while keeping the file system the same 2. Redirecting of data is simple Chapter 17 File Management 17-14

File Access Methods Sequential Access File is read in sequence from beginning to end Majority of all files Program source and binary files Random Access Assumes file is made up of fixed length logical records Hashing is a common method used to calculate the location of an internal logical record Indexed Access Additional means for accessing and viewing records in a file Key indexes ISAM indexed sequential access method Chapter 17 File Management 17-15

Physical File Storage Contiguous Non-contiguous Linked Indexed Examples DOS/Windows FAT UNIX i-nodes Windows NTFS Free space management Chapter 17 File Management 17-16

Contiguous Storage Allocation Assign blocks (all in a row) to hold the file Access is simple for both sequential and random methods Disadvantages Space must be large enough Have to take into account file growth May need to be moved if it outgrows its space Fragmentation of disk Allocation strategies to minimize fragmentation First-fit, best-fit Eventually disk becomes fragmented Chapter 17 File Management 17-17

Linked Allocation Non-contiguous Each block contains a link to the next physical block Variant links in both directions Advantages no fragmentation Adding to a file is easy Disadvantages Not usable for random access Additional disk head searching Overhead in storing the pointers Recovery of a defective block is difficult Chapter 17 File Management 17-18

File Allocation Contiguous Storage Allocation Linked Allocation Chapter 17 File Management 17-19

Windows FAT File Allocation Table (FAT) Linked allocation with links stored in a table Table contains the first block of each file on the disk or disk partition Successive blocks contain a link to the next block Disadvantages Requires a tremendous amount of space File integrity can be easily compromised Chapter 17 File Management 17-20

File Allocation Table Linked Allocation and File Allocation Table Chapter 17 File Management 17-21

Indexed Allocation Non-contiguous All link pointers for a file are stored together in a single block called the index block One index block per file Advantages No fragmentation Can be used for random access Disadvantage Slower due to additional access of the index block Additional disk head searching Recovery of a defective block is difficult Chapter 17 File Management 17-22

Indexed Allocation Index blocks for indexed allocation of linked files shown in File Allocation Table diagram, Figure 17.7 Chapter 17 File Management 17-23

Unix i-nodes Indexed file allocation Index block contains File attributes 10 direct blocks 1 single indirect 1 double indirect 1 triple indirect Advantages Fast for small blocks Can accommodate very large files 100 s of gigabytes Chapter 17 File Management 17-24

Unix i-nodes Chapter 17 File Management 17-25

Windows NTFS Dynamically sized volumes Volumes may be a fraction of a disk or span many disks Master File Table (MFT) of 1kb records First 16 records are metadata files which describe the volume First record stores the MFT attributes Each file has an MFT entry File records made up of attributes, including file information and data Chapter 17 File Management 17-26

NTFS Volume Layout Chapter 17 File Management 17-27

Free Space Management Bit map method one bit for each block to indicate if it is used or free Linked list method Pointer to first free block Each free block has a pointer to the next Blocks are allocated from the beginning Deleted files are placed at the end Chapter 17 File Management 17-28

Other Secondary Storage Allocation Tape Allocation Not practical to reallocate space in the middle of the tape Files that grow must be re-written Files are stored contiguously whenever possible Optical drives and flash drive file allocation Similar to that of hard disks UDF (Universal Data Format) supports up to 2 terabytes of data Hierarchical directory format Support for both HD-DVD and Blu-Ray DVD formats Chapter 17 File Management 17-29

Partitions, File Systems, Volumes, and Pools Chapter 17 File Management 17-30

Directory Structure Provides a means of organization so that files can be located easily and efficiently Hide the physical devices from the logical view of the files Partitions Independent subsections of a device Volume Directory structure for a particular partition Needs to be mounted to be incorporated into the overall file system structure Contain file attributes Chapter 17 File Management 17-31

Tree-Structure Directory Hierarchical with a top-level root directory from which all other directories stem All directories and files have names Separator Used to indicate subdirectories and files located in a directory / UNIX \ DOS, Windows Pathname Absolute full pathname starting from the root directory Relative pathname is created starting from the current directory Search Paths Directory locations that the operating system uses to locate files Chapter 17 File Management 17-32

Tree-Structure Directory For our examples, root is on disk device C: Pathname Examples: Absolute: C:\FINANCE\QUICKEN\Q.EXE Relative from the FINANCE directory: Search Path: QUICKEN\Q.EXE PATH=C:\DOS;C:\FINANCE\QUICKEN Now the programs in the two directories can be run by specifying the name of the program without the absolute or relative pathnames Chapter 17 File Management 17-33

Acyclic Directory Structures Tree-structure that permits links between separate branches of the tree Advantage Easy user access Disadvantages Cycles and dangling links Examples Windows shortcuts Unix hard and symbolic links MacIntosh aliases Chapter 17 File Management 17-34

An Acyclic-Graph Directory Chapter 17 File Management 17-35

Graph with a Cycle Chapter 17 File Management 17-36

Hard Links vs. Symbolic Links Chapter 17 File Management 17-37

Network File Access FTP File Transfer Protocol Part of the TCP/IP protocol family Network file systems Windows Drive letters aliased to remote file systems UNIX Network File System (NFS) Remote Procedure Call (RPC) Chapter 17 File Management 17-38

Typical NFS Configuration Chapter 17 File Management 17-39

File Protection Logins and passwords Read, write, and execute protections ACL access control list, permissions UNIX/Linux owner, group, everyone Chapter 17 File Management 17-40

Data Storage Approaches Standard client server configuration Storage area network configuration Chapter 17 File Management 17-41

File Protection Most systems provide three forms of protection on files Read protection Write protection Execution protection Access control list (ACL) List of users who may access the file for each of the forms of protection Tremendous overhead if there are a lot of users Owner/Group/Everyone protection method UNIX, Linux Chapter 17 File Management 17-42

File Directory Showing Protection ls lf list files in directory using a long format and indicate file type 10-char code for file protection 1 st char d for directory, - for file, s for symbolic link 2 nd to 4 th char permissions for the owner 5 th to 7 th char permissions for the group 8 th to 10 th char permissions for everyone r - read permission, w - write permission, x - execute permission Chapter 17 File Management 17-43

Journaling File Systems Log file records every system transaction that requires a write access to the file system Two levels of capability 1. Protect the integrity of the file system structure only Example: Windows NTFS file system 2. Also guarantees the integrity of data that has not yet been written to the disk Examples: Linux ext3 and ext4, IBM JFS Chapter 17 File Management 17-44

Copyright 2010 John Wiley & Sons All rights reserved. Reproduction or translation of this work beyond that permitted in section 117 of the 1976 United States Copyright Act without express permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for distribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages caused by the use of these programs or from the use of the information contained herein. Chapter 17 File Management 17-45