File Management - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

File Management

Description:

Meet the data management needs of the user ... Functions. Identify and locate a selected file ... Designed to support a wide variety of file management systems ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 16
Provided by: patt214
Category:

less

Transcript and Presenter's Notes

Title: File Management


1
File Management
  • Chapter 12

2
File System
  • Permits users to create data collections (files)
    which has the following properties
  • Long-term existence stored on disk/LT-storage
  • Sharable between processes access permissions
  • Structure an internal structure convenient for
    particular applications
  • Functions that can be performed on files
  • Create / Delete Open / Close Read / Write
  • File Structure
  • Field the basic element of data
  • Record a collection of related fields that can
    be treated as a unit (e.g. an employee record
    with name, SSN, address, etc.)
  • Database a collection of related data and
    operations defined upon them (usually database
    management system is independent of the OS)
  • Note that on UNIX systems, the basic file
    structure is just a stream of bytes (e.g. a C
    program file does not have fields, records, and
    so on)

3
File Management System
  • Set of system software that provides services to
    users and applications in the use of files
  • Objectives
  • Meet the data management needs of the user (e.g.
    file storage and operations R/W, create/delete,
    access rights)
  • Optimize performance (e.g. maximize
    throughput/response time)
  • Provide I/O support for a variety of storage
    device types
  • Minimize or eliminate the potential for lost or
    destroyed data
  • Provide a standardized set of I/O interface
    routines
  • Provide I/O support for concurrent access to
    files
  • Functions
  • Identify and locate a selected file
  • Use a directory to describe the location of all
    files plus their attributes
  • I/O is done on a block basis conversions
    between blocks and records
  • Allocate files to free blocks
  • Manage organize the free storage

4
(No Transcript)
5
File Organization and Access
  • File Organization logical structuring of the
    records as determined by the way in which they
    are accessed
  • Physical Organization depends on the blocking
    and file allocation strategy
  • Criteria for choosing a file organization
  • Short access time
  • Ease of update
  • Economy of storage
  • Simple maintenance
  • Reliability
  • Different Organizations
  • The pile
  • The sequential file
  • The indexed sequential
  • The indexed
  • The direct, or hashed, file

6
  • Different file Organizations
  • The pile
  • The sequential file
  • The indexed sequential
  • The indexed

7
(No Transcript)
8
File Directories
  • Contains information about files
  • Attributes
  • Location
  • Ownership
  • Directory itself is a file owned by the OS
  • Provides mapping between file names and the files
    themselves

9
  • Hierarchical, or
  • Tree-Structured Directory
  • Master directory with user directories underneath
    it
  • Files can be located by following a path from the
    root
  • Current directory working directory
  • Files are referenced relative to the working
    directory

10
UNIX File Management
  • Types of files
  • Regular / ordinary
  • Directory
  • Special
  • Named pipes
  • Links
  • Symbolic links
  • Inodes
  • Index node
  • Control structure that contains key information
    for a particular file

11
(No Transcript)
12
File Allocation Methods for Secondary Storage
Management
  • Contiguous allocation
  • single entry in the File Allocation Table (FAT) -
    Starting block and the length
  • External fragmentation may occur
  • ? compaction needed

13
File Allocation (cont.)
  • Chained allocation
  • Each block contains a pointer to the next block
    in the chain
  • single entry in the FAT - Starting block and the
    length
  • No external fragmentation
  • Best for sequential files quick access to the
    record
  • No accommodation of the principle of locality

After consolidation ? ?
14
File Allocation (cont.)
  • Indexed allocation
  • File allocation table contains a one-level index
    for each file
  • The index has one entry for each portion
    allocated to the file
  • The file allocation table contains block number
    for the index

Indexed Allocation with variable-length portions
Indexed Allocation with block portions
15
Linux Virtual File System
  • Designed to support a wide variety of file
    management systems
  • VFS provides a uniform file system interface to
    user processes
  • Represents any conceivable file systems general
    feature and behavior
  • Assumes files are objects that share basic
    properties regardless of the target system

Files on secondary Storage maintained By file
system X
Write a Comment
User Comments (0)
About PowerShow.com