Assignment No. 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

What is a file system?

A file system defines how files are named, stored, and retrieved from a storage device. Every time
you open a file on your computer or smart device, your operating system uses its file system
internally to load it from the storage device. Every time you open a file on your computer or smart
device, your operating system uses its file system internally to load it from the storage device.
Whenever you download a file or access a web page over the Internet, a file system is involved
too.
Why do we need a file system in the first place?
without a file system, the storage device would contain a big chunk of data stored back-to-back,
and the operating system wouldn't be able to tell them apart. The term file system takes its name
from the old paper-based data management systems, where we kept documents as files and put
them into directories. Imagine a room with piles of papers scattered all over the place. A storage
device without a file system would be in the same situation - and it would be a useless electronic
device.
However, a file system changes everything:
A file system isn't just a bookkeeping feature, though. Space management, metadata, data
encryption, file access control, and data integrity are the responsibilities of the file system too.
Most operating systems allow you to format a partition based on a set of file systems. For instance,
if you are formatting a partition on Windows, you can choose between FAT32, NTFS, and exFAT
file systems.

A file system is a set of data structures, interfaces, abstractions, and APIs that work together to
manage any type of file on any type of storage device, in a consistent manner. Each operating
system uses a particular file system to manage the files. In the early days, Microsoft used FAT
(FAT12, FAT16, and FAT32) in the MS-DOS and Windows 9x family. Starting from Windows
NT 3.1, Microsoft developed New Technology File System (NTFS), which had many advantages
over FAT32, such as supporting bigger files, allowing longer filenames, data encryption, access
management, journaling, and a lot more.

NTFS has been the default file system of the Window NT family (2000, XP, Vista, 7, 10, etc.) ever
since. NTFS isn’t suitable for non-Windows environments, though or you can just use the exFat
file system. Extended File Allocation Table (exFAT) is a lighter version of NTFS created by
Microsoft in 2006. exFAT was designed for high-capacity removable devices, such as external
hard disks, USB drives, and memory cards. exFAT is the default file system used by SDXC cards.

Unlike NTFS, exFAT has read and write support on non-Windows environments as well, including
Mac OS — making it the best cross-platform file system for high-capacity removable storage
devices.

So basically, if you have a removable disk you want to use on Windows, Mac, and Linux, you
need to format it to exFAT.

Apple has also developed and used various file systems over the years, including
Hierarchical File System (HFS), HFS+, and recently Apple File System (APFS).
Just like NTFS, APFS is a journaling file system and has been in use since the launch of OS X
High Sierra in 2017.

But how about file systems in Linux distributions?

The Extended File System (ext) family of file systems was created for the Linux kernel - the core
of the Linux operating system.

The first version of ext was released in 1991, but soon after, it was replaced by the second extended
file system (ext2) in 1993.

In the 2000s, the third extended filesystem (ext3) and fourth extended filesystem (ext4) were
developed for Linux with journaling capability.

ext4 is now the default file system in many distributions of Linux, including Debian and Ubuntu.

Architecture of file systems


A file system installed on an operating system consists of three layers:

1. Physical file system


2. Virtual file system
3. Logical file system

Computers use particular kinds of file systems to store and organize data on media, such as a hard
drive or flash drive, or the CDs, DVDs, and BDs in an optical drive.

A file system can be thought of as an index or database containing the physical location of every
piece of data on the device. The data is usually organized in folders called directories, which can
contain other folders and files.
A file is a collection of related information that is recorded on secondary storage. Or file is a
collection of logically related entities. From user’s perspective a file is the smallest allotment of
logical secondary storage.
The name of the file is divided into two parts as shown below:
name
extension, separated by a period.

File
A file is a named collection of related information that is recorded on secondary storage such as
magnetic disks, magnetic tapes and optical disks. In general, a file is a sequence of bits, bytes,
lines or records whose meaning is defined by the files creator and user.
File Structure

A File Structure should be according to a required format that the operating system can understand.
• A file has a certain defined structure according to its type.
• A text file is a sequence of characters organized into lines.
• A source file is a sequence of procedures and functions.
• An object file is a sequence of bytes organized into blocks that are understandable
by the machine.
• When operating system defines different file structures, it also contains the code to
support these file structure. Unix, MS-DOS support minimum number of file
structure.

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
• These are the files that contain user information.
• These may have text, databases or executable program.
• 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 are also known as device files.
• These files represent physical device like disks, terminals, printers, networks, tape
drive etc.
These files are of two types −
• Character special files − data is handled character by character as in case of
terminals or printers.
• Block special files − data is handled in blocks as in the case of disks and tapes.
Different types of file system in Windows OS
There are so many types of file systems; different file systems have unique features and have
their own ways of organizing data. Some have faster speed, some provide better compatibility,
and other has better security.
For Windows operating systems, FAT16, FAT32, exFAT and NTFS are four types of file
systems most widely adopted by users. Here are some brief introductions about the different
features of these four file systems.
● FAT16, also known as File Allocation Table 16, was created for old systems like MS-DOS,
Windows 95. FAT16 uses a 16-bit binary number to keep clusters, and this is why it called
FAT16. If a file exceeds the capacity of singular sector of a FAT16 partition, it would take more
space than the size of the file itself.
FAT16 is outdated because it has a big weakness: it supports partition with a capacity of no more
than 2GB. In today’s world, it is really difficult to find a disk under 2GB, and a 2GB disk cannot
meet the demand of most users.
● FAT32 file system was firstly introduced by Microsoft in 1996 to be taken as the advanced
edition of FAT16. It uses 32-bit binary number to hold clusters, limiting the partition or volume
size up to 2TB with a sector size of 512 bytes. And it works with most of Windows, even Mac,
and game consoles.
But it also has a size limit. It can only support a maximum of 32GB partition, and a maximum of
4GB single file. If you copy a file like a movie that is usually larger than 4GB to a FAT32 hard
drive, you will be told that the file is too large for the destination disk.
● NTFS stands for New Technology File System. It is a great improvement in many aspects over
FAT32 and FAT16 file system. It uses B-tree structure that allows users to use hard disk larger
than 2TB and provides much fast speed, making itself a popular choice among an increasing
number of Windows users. Besides, NTFS is a journaling file system that resists data loss and
damage. It has additional permission settings that can encrypt files to control access of files and
folders.
However, NTFS file system also has its weakness: it is only compatible with Windows 2000 and
later versions. And NTFS doesn’t support PS4, android smartphone, camera, and other devices.
Mac OS X can only read NTFS partition.
● exFAT is a new file system launched in 2006, which was usually used for flash memory like
USB flash drive, SD card. It can be seen as a lightweight of FAT32 without additional features
of NTFS. exFAT makes up for the disadvantages of FAT32 in file size and the compatibility of
NTFS, which means it can store a file larger than 4GB and can both work in Windows and Mac
OS.
However, exFAT file system is not suitable for HDD on computers, otherwise, the performance
and service life would be seriously affected. And it doesn’t work in the Windows XP system.

What is a File System?


A file system is a process of managing how and where data on a storage disk, which is also
referred to as file management or FS. It is a logical disk component that compresses files
separated into groups, which is known as directories. It is abstract to a human user and related to
a computer; hence, it manages a disk's internal operations. Files and additional directories can be
in the directories. Although there are various file systems with Windows, NTFS is the most
common in modern times. It would be impossible for a file with the same name to exist and also
impossible to remove installed programs and recover specific files without file management, as
well as files would have no organization without a file structure. The file system enables you to
view a file in the current directory as files are often managed in a hierarchy.
Types of file systems
There are various kinds of file systems, which are as follows:
1. Disk file systems
On the disk storage medium, a disk file system has the ability to randomly address data within a
few amounts of time. Also, it includes the anticipation that led to the speed of accessing data.
Without regard to the sequential location of the data, multiple users can access several data on
the disk with the help of a disk file system.
2. Flash file systems
A flash file system is responsible for restrictions, performance, and special abilities of flash
memory. It is superior to utilize a file system that is designed for a flash device; however, a disk
file system is the basic storage media, which can use a flash memory device.
3. Tape file systems
A tape file system is used to hold files on the tape as it is a tape format and file system. As
compared to disks, magnetic tapes are more powerful to access data for a long time, which are
the challenges for a general-purpose file system in terms of creation and efficient management.
4. Database file systems
A database-based file system is another method for file management. Files are recognized by
their characteristics (like a type of file, author, topic, etc.) rather than hierarchical structured
management.
5. Transactional file systems
Some programs require one or more changes to fail for any reason or need several file systems
changes but do not make any changes. For instance, a program may write configuration files or
libraries mand executables at the time of installing or updating the software. The software may
be unusable or broken if the software is stopped while updating or installing. Also, the entire
system may leave in an unusable state if the process of installing or updating the software is
incomplete.
6. Network file systems
A network file system offers access to files on a server. In remote network-connected computers,
with the help of local interfaces, programs are able to transparently create, manage and access
hierarchical files and directories. The file-system-like clients for FTP and WebDAV, and AFS,
SMB protocols, NFS are all examples of the network file systems.
7. Shared disk file systems
A shared-disk file system allows the same external disk subsystem to be accessed by multiple
machines, but when the number of machines accesses the same external disk subsystem, there
may be occurred collisions in this condition; so, to prevent the collision, the file system decides
which subsystem to be accessed.
8. Minimal file system
In the 1970s, for some initial microcomputer users, disk and digital tape devices were much
expensive. A few cheaper basic data storage systems used common audio cassette tape was
designed. On the cassette recorder, the user was informed about pressing "RECORD" when there
was required to write data by system. And, to notify the system, press "RETURN" on the
keyboard. Also, on the cassette recorder, the user was needed to press the "PLAY" button when
the system required to read data.
9. Flat file systems
The subdirectories are not available in the flat system. It contains the only directory, and all files
are held in a single directory. Due to the relatively small amount of data space available, this
type of file system was adequate when floppy disk media was available for the first time.

File System in Operating System (OS)

A file system in an operating system decides the way the contents of its storage medium (secondary
memory, etc) are stored and organized. Examples of filesystems are btrfs, xfs, zfs, ext series, ntfs,
etc. These filesystems differ in aspects of implementation, use cases, etc. A filesystem is essential
in the proper and efficient functioning of an operating system.
A file system in OS dictates how the contents of a storage medium are stored and organized. These
storage media (such as secondary memory, external drives, etc) could be computer secondary
memory, flash memory, etc. The contents are either files or directories. Most of the time, a storage
device has a number of partitions. Each of these partitions is formatted with an empty filesystem
for that device. A filesystem helps in separating the data on the storage into comparatively smaller
and simpler segments. These chunks are files and directories. The filesystem also provides for
storing data related to files, such as their name, extension, permissions, etc.

Properties of a Filesystem
Files are stored on a storage medium such as disk and do not vanish when a user logs out of the
computer system. With each file are associated access permissions, which permit controlled
sharing of that file. Files may form arranged or complex structures according to the relationship
among them. Several files can be grouped together under a directory.

A directory also referred to as a folder also has attributes similar to those of a file, such as a
name, size, location, access permissions, etc.

A file system also provides several features such as a crash recovery mechanism, data
loss/corruption prevention, etc.

Functions of a File

1. They are used for storing data in a computer.


2. They enable the separation of data according to some criteria.
3. They enable efficient, simple, organized access to data.
4. They help in isolating sensitive or important data from the rest of the data.
5. They enable locating particular data items in the storage medium.
Conclusion

• A file system controls the way the contents of a storage medium are stored, organized, and
accessed.
• A file is a logical unit of information created by processes and managed by the OS.
• File attributes are configuration and information associated with files.
• There are three types of files accessing mechanisms in operating systems, namely, indexed,
direct and sequential.
• There are a large number of file types, such as media, programs, files internal to OS,
documents, etc.
• There are three methods of space allocation in a filesystem, namely, contiguous, indexed,
and linked.
• In contiguous space allocation, In this method, every file occupies a set of consecutive
addresses on the storage.
• Indexed space allocation method maintains a set of pointers is in an index table.
• In Linked space allocation each data block in the file contains the address of the next block.
Each entry in a directory contains file-name, block address, and a pointer to the last block.

What is the file system in OS?


File system is the part of the operating system which is responsible for file management. It provides
a mechanism to store the data and access to the file contents including data and programs. Some
Operating systems treats everything as a file for example Ubuntu.
What is file system and its types?
There are a number of types of file systems, all with different logical structures and properties,
such as speed and size. The type of file system can differ by OS and the needs of that OS. The
three most common PC operating systems are Microsoft Windows, Mac OS X and Linux.
What is file system structure?
The file system structure is the most basic level of organization in an operating system. …
Providing a common file system structure ensures users and programs are able to access and write
files. File systems break files down into two logical categories: Shareable vs. unsharable files.
What are the 3 types of files?
Stores data (text, binary, and executable).
What are the four common types of files?
The four common types of files are document, worksheet, database and presentation files.
Connectivity is the capability of microcomputer to share information with other computers.
How many types of file system are there?
The Solaris operating system supports three types of file systems: Disk-based. Network-based.
How does file system work?
In the UNIX sense of the word, a file is an array of bytes. For most filesystems, it’s an array of
disk blocks with some associated metadata. The main job of any filesystem is finding which
blocks belong to a given file and which belong to no files (and so can be used for new files or
appended to an existing file).

6 Different Types of Files and How to Use Them


• JPEG (Joint Photographic Experts Group) …
• PNG (Portable Network Graphics) …
• GIF (Graphics Interchange Format) …
• PDF (Portable Document Format) …
• SVG (Scalable Vector Graphics) …
• MP4 (Moving Picture Experts Group)

Classification of Files:

• Alphabetical Classification.
• Numerical Classification.
• Geographical Classification.
• Subject Classification and.
• Chronological Classification.

You might also like