Operating Systems: I/O & File Management
Operating Systems: I/O & File Management
▪ Fields ▪ File
– Basic element of data – Have file names
– Contains a single value – Is a collection of similar records
– Characterized by its length and – Treated as a single entity
data type – May implement access control
mechanisms
▪ Records
– Collection of related fields ▪ Database
– Treated as a unit – Collection of related data
– Relationships exist among
elements
– Consists of one or more files
File Management Systems
1. Each user should be able to create, delete, read, write and modify
files
2. Each user may have controlled access to other users’ files
3. Each user may control what type of accesses are allowed to the
users’ files
4. Each user should be able to restructure the user’s files in a form
appropriate to the problem
Requirements cont.
▪ Lowest level
▪ Communicates directly with
peripheral devices
▪ Responsible for starting I/O
operations on a device
▪ Processes the completion of an
I/O request
▪ Device drivers are usually
considered to be part of the OS
Basic File System
Indexed
Sequentia Direct or
Pile Sequentia Indexed
l Hashed
l
The Pile
▪ When a new record is added to the main file, all of the index files
must be updated.
Hashed or Direct File
▪ An allocation method refers to how disk blocks are allocated for files:
– Contiguous allocation
– Linked allocation
– Indexed allocation
Allocation Methods
Contiguous Allocation
▪ Random access
A Typical Inode
Allocation Methods
Indexed Allocation: Inode Example
Question Solution