File System in Operating Systems (1)
File System in Operating Systems (1)
SQL HTML CSS Javascript Python Java C C++ PHP Scala C# Tailwind
File Structure
A File Structure should be according to a required format that the operating system can understand.
File Type
File type refers to the ability of the operating system to distinguish different types of file such as text
files source files and binary files etc. Many operating systems support many types of files. Operating
system like MS-DOS and UNIX have the following types of files −
Ordinary files
The user can apply various operations on such files like add, modify, delete or even remove the
entire file.
Directory files
These files contain list of file names and other information related to these files.
Special files
These files represent physical device like disks, terminals, printers, networks, tape drive etc.
Block special files − data is handled in blocks as in the case of disks and tapes.
Sequential access
Direct/Random access
Sequential access
A sequential access is that in which the records are accessed in some sequence, i.e., the information in the
file is processed in order, one record after the other. This access method is the most primitive one.
Example: Compilers usually access files in this fashion.
Direct/Random access
Each record has its own address on the file with by the help of which it can be directly accessed
for reading or writing.
The records need not be in any sequence within the file and they need not be in adjacent
locations on the storage medium.
Index is searched sequentially and its pointer is used to access the file directly.
Space Allocation
Files are allocated disk spaces by operating system. Operating systems deploy following three main ways
to allocate disk space to files.
Contiguous Allocation
Linked Allocation
Indexed Allocation
Contiguous Allocation
Easy to implement.
External fragmentation is a major issue with this type of allocation technique.
Linked Allocation
No external fragmentation
Effectively used in sequential access file.
Indexed Allocation
TOP TUTORIALS
Python Tutorial
Java Tutorial
C++ Tutorial
C Programming Tutorial
C# Tutorial
PHP Tutorial
R Tutorial
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
SQL Tutorial
TRENDING TECHNOLOGIES
Git Tutorial
Kubernetes Tutorial
DSA Tutorial
Unix Tutorial
CERTIFICATIONS