0% found this document useful (0 votes)
20 views

File Management

Uploaded by

yashmit mavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

File Management

Uploaded by

yashmit mavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

File Management

File System
• Provide a means to store data organized as files as well as a
collection of functions that can be performed on files
• Maintain a set of attributes associated with the file
• Typical operations include:
• Create
• Delete
• Open
• Close
• Read
• Write
File Structure
Record
• collection of related fields that can be treated as a unit by
some application program
• fixed or variable length
File
• collection of similar records
• treated as a single entity
• may be referenced by name
• access control restrictions
File System Software Architecture
Device Drivers
• Lowest level
• Communicates directly with peripheral devices
• Responsible for starting I/O operations on a device

Basic File System


• Deals with blocks of data that are exchanged with disk or tape
systems
• Concerned with the placement of blocks on the secondary
storage device
• Concerned with buffering blocks in main memory
Basic I/O Supervisor
• Responsible for all file I/O initiation and termination
• Maintains control structures that deal with device I/O,
scheduling, and file status
• Selects the device on which I/O is to be performed
• Concerned with scheduling disk and tape accesses to optimize
performance
• I/O buffers are assigned and secondary memory is allocated at
this level
Logical I/O
• Maintains basic data about files
• Enables users and applications to access file records
Access Method
• Level of the file system closest to the user
• Provides a standard interface between applications and the
file systems and devices that hold the data
• Different access methods reflect different file structures and
different ways of accessing and processing the data
File Management
The Pile
• Least complicated form of file organization
• Data are collected in the order they arrive
• Each record consists of one burst of data
• Purpose is simply to accumulate the mass of data and save it
• Record access is by exhaustive search
Sequential File
• Most common form of file structure
• A fixed format is used for records
• Key field uniquely identifies the record
• Typically used in batch applications
Indexed Sequential File
• Adds an index to the file to support random access
• Adds an overflow file
• Greatly reduces the time required to access a single record
• Multiple levels of indexing can be used to provide greater
efficiency in access
Indexed File
• Records are accessed only through their indexes
• Variable-length records can be employed
• Exhaustive index contains one entry for every record in the
main file
• Partial index contains entries to records where the field of
interest exists
• Used mostly in applications where timeliness of information is
critical
Direct or Hashed file
• Access directly any block of a known address
• Makes use of hashing on the key value
Often used where:
• very rapid access is required
• fixed-length records are used
• records are always accessed one at a time
File Directory
Directory Operations
• To understand the requirements for a file structure, it is
helpful to consider the types of operations that may be
performed on the directory:
• Search
• Create files
• Delete files
• List directory
• Update directory
Tree-Structured Directory
Access Rights
• None -user would not be allowed to read the user directory
that includes the file
• Knowledge -user can determine that the file exists and who its
owner is and can then petition the owner for additional
access rights
• Execution -user can load and execute a program but cannot
copy it
• Reading -user can read the file for any purpose, including
copying and execution
• Appending -user can add data to the file but cannot modify or
delete any of the file’s contents
• Updating -user can modify, delete, and add to the file’s data
• Deletion -user can delete the file from the file system

You might also like