0% found this document useful (0 votes)
5 views19 pages

Com212-Group3 Assigment

The 212 associates

Uploaded by

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

Com212-Group3 Assigment

The 212 associates

Uploaded by

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

ND 2 COMPUTER SCIENCE

GROUP 3 COM 212 ASSIGMENT

Write on the design principles behind modern file systems like FAT,
NTFS, and ext4.

Discuss features like file organization, metadata management, and


data storage strategies.

SUBMITED BY
1. WULLAM BALKA FILIBUS [0390]
2. GO’AR MIRACLE RITMUNU [0344]
3. DOMEL RANSE SHAHU [0513]
4. LINUS WILLIAMS TSENYEN [0571]
5. SHINDAI MACHIF GIDEON [3449]
6. EYEFIA JOSEPH DAFE [3462]
7. FARUK KAREEM [4009]
8. SUNDAY JOHOSHAPHAT KUNYI [3668]
9. HENERIATER ISTIFANUS NGYANG [3348]
10. BALLA REJOICE [400]
TABLE OF CONTENT

Cover page 1

Table of content 2

Introduction to file systems 3

Common file system concept 4

3.0 File allocation table (FAT) 5

Key design principle of FAT 6

Features of NTFS 7

ext4 (Fourth Extended File System) 9

Features of ext4 10

Features Of Design Principle Of Modern File system 11

Features Of Design Principle Of Modern File system 12

Metadata Management and storage strategies 14

Storage structures 15

Data strategies 16

Conclusion 17

References 18

1.0 Introduction to File Systems


2
File systems are fundamental components of modern operating systems, providing
a structured way to store, organize, and access data on storage devices. They act as
an intermediary between the operating system and the physical storage medium,
abstracting the complexities of data storage and retrieval.

The design of file systems has evolved significantly over time, driven by advances
in hardware capabilities, changing user requirements, and the need for improved
performance, reliability, and security. Modern file systems like FAT (File
Allocation Table), NTFS (New Technology File System), and ext4 (Fourth
Extended File System) each have their own unique features and design principles,
but they all share some common goals:

 Efficient storage and retrieval of data


 Organizing files and directories in a hierarchical structure
 Managing metadata about files and directories
 Providing mechanisms for data integrity and recovery
 Supporting various security features
 Optimizing performance for different usage scenarios

2.0. Common File System Concepts

Before discussing specific file systems, it's important to understand some common
concepts that underpin most modern file systems:

 Blocks and Clusters


3
File systems divide storage space into fixed-size units called blocks or clusters.
These are the smallest units of storage that can be allocated to a file. The size of
these units can vary depending on the file system and configuration, typically
ranging from 512 bytes to 64 KB or more.

 Inodes and File Allocation

An inode (index node) is a data structure that stores metadata about a file, such as
its size, permissions, ownership, and location on disk. File systems use various
methods to keep track of which blocks belong to which files, including linked lists,
bitmaps, and more advanced techniques like extents.

 Journaling

Journaling is a technique used by many modern file systems to ensure data


integrity and quick recovery in case of system crashes or power failures. It
involves keeping a log of changes before they are committed to the main file
system structures.

 Directory Structure

File systems organize files into a hierarchical directory structure, allowing for
logical grouping and easy navigation of files.

 File Names and Paths

File systems provide mechanisms for naming files and representing their location
within the directory structure using paths.

 Fragmentation
4
As files are created, modified, and deleted, the free space on a storage device can
become fragmented, leading to decreased performance. Modern file systems
implement various strategies to minimize and manage fragmentation.

 Metadata

In addition to the actual file data, file systems store various metadata about files
and directories, such as creation and modification times, access permissions, and
file attributes.

Now, let's examine the design principles behind FAT, NTFS, and ext4 in detail.

3.0. FAT (File Allocation Table)

The FAT file system, developed by Microsoft in the late 1970s, is one of the oldest
and most widely supported file systems. Despite its age, it's still used in many
scenarios, particularly for removable storage devices and embedded systems.

The File Allocation Table (FAT) file system is a simple and widely used design for
organizing and managing files on storage devices. While it's considered legacy
technology today, understanding its principles provides insight into modern file
system design.

FAT's core concept is a table that tracks the status of storage clusters. Each entry in
this table corresponds to a cluster on the disk, indicating whether it's free, in use, or
part of a file chain. This simple approach allows for efficient space allocation and
file retrieval.

5
3.1. Key design principles of FAT include:

 Simplicity: FAT's straightforward structure makes it easy to implement


across various devices and operating systems.

 Portability: Its simplicity enables broad compatibility, allowing FAT-


formatted storage to be read by many different systems.

 Cluster-based allocation: Storage is divided into clusters, reducing the


overhead of tracking individual sectors.

 Linked list structure: Files are stored as chains of clusters, with the FAT
acting as a map to locate file fragments.

 Directory structure: FAT uses a hierarchical directory system to organize


files logically.

While FAT has limitations like fragmentation issues and size constraints, its
principles have influenced modern file systems. For instance, the concept of
tracking free and used space is fundamental in contemporary designs.

Modern file systems like NTFS, ext4, and APFS build upon these basics, adding
features like journaling for improved reliability, better handling of large storage
capacities, and support for advanced metadata.

Despite its age, FAT remains relevant in certain contexts, particularly in embedded
systems and for cross-platform compatibility. Its enduring presence demonstrates
how foundational design principles can have lasting impact in technology.

6
4.0. NTFS (New Technology File System)

NTFS (New Technology File System) is a proprietary file system developed by


Microsoft for use in their Windows operating systems. It was introduced with
Windows NT 3.1 in 1993 and has since become the primary file system for
Windows, replacing the older FAT (File Allocation Table) system.

The New Technology File System (NTFS) is a modern file system developed by
Microsoft, incorporating several advanced design principles to address limitations
of earlier systems like FAT

4.1. Features Of NTFS

 Journaling: NTFS uses a journal to log changes before they're written to the
main file system structure. This improves reliability and enables faster
recovery after system crashes.

 Security: It implements a robust permissions system, allowing fine-grained


control over file and folder access. Each file and directory has a security
descriptor that defines its access control list.

 Metadata support: NTFS uses a Master File Table (MFT) to store metadata
about every file and directory. This includes attributes like creation time,
modification time, and file permissions.

 Large file and volume support: NTFS can handle very large files and
volumes, supporting theoretical file sizes up to 16 Exabytes.

 Compression and encryption: Built-in support for file and folder


compression saves disk space, while encryption (EFS) protects sensitive
data.

7
 Hard links and junction points: These features allow for more flexible file
organization and management.

 Sparse file support: NTFS can efficiently store files with large empty or
zero-filled sections, saving disk space.

 Quota management: Administrators can set limits on disk space usage for
individual users.

 Reparse points: These provide a mechanism for extending the file system
with new features.

 Transactional NTFS: Introduced in later versions, this allows for atomic


operations across multiple files.

 Self-healing: NTFS includes features to detect and repair certain types of


corruption automatically.

 Change tracking: The USN Journal tracks changes to files and directories,
useful for backup and replication services.

These principles aim to create a file system that is robust, secure, and flexible
enough to meet the demands of modern computing environments. NTFS balances
performance with advanced features, making it suitable for a wide range of
applications from personal computers to enterprise servers.

8
5.0. Ext4 (Fourth Extended File System)

Ext4 (Fourth Extended File System) is a journaling file system for Linux,
developed as the successor to ext3. It was initially released in 2008 and has
become the default file system for many Linux distributions.

The ext4 (Fourth Extended File System) is a popular and advanced file system
used in many Linux distributions. It builds upon its predecessors (ext2 and ext3)
with several modern design principles aimed at improving performance,
scalability, and reliability.

5.1. Features Of ext4:

 Journaling: Like ext3, ext4 uses journaling to ensure file system integrity
after crashes or power failures. It offers different journaling modes to
balance between performance and data safety.

 Extents: Instead of using the traditional block mapping scheme, ext4 uses
extents to describe contiguous blocks of storage. This reduces fragmentation
and improves performance for large files.

 Delayed allocation: This feature allows the file system to delay block
allocation until data is written to disk, leading to more efficient disk space
usage and reduced fragmentation.

 Multi-block allocation: ext4 can allocate multiple blocks in a single


operation, improving performance for large file operations.

 Persistent pre-allocation: This allows applications to pre-allocate disk space


for files, ensuring contiguous storage for better performance.

9
 Large file system support: ext4 can support volumes up to 1 Exabyte and file
sizes up to 16 terabytes.

 Directory indexing: For faster file lookup in large directories, ext4 uses
HTree indexing.

 Online defragmentation: ext4 includes tools for defragmenting the file


system while it's mounted and in use.

 Check-summing: Journal checksums improve reliability by detecting


corruption in the journal.

 Flexible block groups: This feature allows for better scaling on large storage
devices.

 Fast FSCK: Improved algorithms for file system checking (FSCK) reduce
downtime during system recovery.

 Metadata check-summing: In newer versions, ext4 can use checksums to


detect corruption in metadata structures.

 Nanosecond timestamps: ext4 provides more precise file timestamps than its
predecessors.

These design principles aim to create a file system that is scalable, and efficient,
suitable for a wide range of applications from personal computers to large servers.
ext4 balances backwards compatibility with ext2/3 while introducing modern
features to meet contemporary storage needs.

10
6.0. Features Of Design Principle Of Modern File system

6.1. File organization

File organization refers to the way data is structured, stored, and managed on a
storage medium within a file system. It's a fundamental aspect of file system
design that impacts performance, efficiency, and ease of use.

File organization is a crucial aspect of file system design that determines how data
is structured and stored on storage devices. Some features of file organization
include:

 Hierarchical Structure:

- Most modern file systems, including ext4, NTFS, and others, use a
hierarchical or tree-like structure.

- Files are organized into directories (also called folders), which can contain
other directories, creating a nested structure.

- This allows for logical grouping and easy navigation of files.

 Metadata Management:

- File systems store metadata about each file, such as name, size, creation date,
modification date, and access permissions.

- This information is typically stored separately from the file data itself, often in
specialized structures like the Master File Table (MFT) in NTFS or inodes in
ext4.

11
 Allocation Methods:

- Contiguous Allocation: Files are stored in consecutive blocks on the disk.


While efficient for reading, it can lead to fragmentation over time.

- Linked Allocation: Each block contains a pointer to the next block of the
file. This is flexible but can be slower for random access.

- Indexed Allocation: Uses an index block that contains pointers to the file's
data blocks. This provides a good balance between flexibility and
performance.

 Directory Implementation:

- Linear List: Simple but inefficient for large directories.

- Hash Table: Provides faster lookups but can be complex to implement.

- B-tree or similar structures: Offer efficient lookups even for very large
directories.

 File Naming:

- File systems define rules for valid file names, including allowed characters
and length limits.

- Some support case sensitivity, while others are case-insensitive.

 Fragmentation Handling:

- As files are created, modified, and deleted, fragmentation can occur.

- Modern file systems use various techniques to minimize fragmentation, such


as delayed allocation and intelligent placement algorithms.

12
 Symbolic Links and Hard Links:

- These features allow files to be referenced from multiple locations without


duplication.

 Volume Management:

- Some file systems incorporate volume management features, allowing


multiple physical disks to be treated as a single logical volume.

 Journaling and Consistency:

- To maintain data integrity, many file systems use journaling to log changes
before they are committed.

 Compression and Encryption:

- Some file systems offer built-in compression to save space and encryption for
security.

 Extensibility:

- Modern file systems often include mechanisms for adding new features or
extending existing ones without breaking compatibility.

The file organization in a file system significantly impacts its performance,


reliability, and usability. Different file systems may emphasize certain aspects of
file organization based on their intended use cases, whether for personal
computers, servers, or specialized applications.

13
6.2. Metadata Management:

Metadata is "data about data" - information that describes and gives context to the
actual file contents.

Types of Metadata:

i. File attributes: Name, size, creation date, modification date, access


permissions.

ii. File system metadata: Information about free/used space, file system
structure.

iii. Extended attributes: Additional custom metadata supported by some file


systems.

Storage Structures:

 Inodes (in Unix-like systems): Store metadata separately from file content.

 Master File Table (in NTFS): Centralized database of file metadata.

 Extended attribute blocks: For additional metadata beyond basic attributes.

Performance Considerations:

14
 Caching: Frequently accessed metadata is often cached in memory for faster
access.
 Indexing: B-trees or similar structures used for efficient lookups.

Consistency:

 Journaling: Used to ensure metadata consistency after system crashes.


 Checksums: To detect and prevent corruption of metadata.

6.3. Data Storage Strategies:

1. Block Allocation:

- Fixed-size blocks: Traditional approach, simple but can waste space.

- Extents: Variable-size allocation units, more efficient for large files.

- Flexible block sizes: Some file systems allow different block sizes for
different types of data.

2. Space Management:

- Free space bitmap: Quick identification of available blocks.

- Delayed allocation: Postponing block allocation to optimize placement.

- Thin provisioning: Overcommitting storage space, useful in virtualized


environments.

3. File Fragmentation Handling:

- Contiguous allocation where possible.

15
- Defragmentation tools to reorganize fragmented files.

- Intelligent placement algorithms to minimize fragmentation.

4. Large File Handling:

- Multi-level indexing: For efficient access to very large files.

- Sparse file support: Efficient storage of files with large empty sections.

5. Small File Optimization:

- Inline data: Storing very small files directly in metadata structures.

- File system compression: To save space, especially effective for small


files.

6. Data Integrity:

- Checksums: To detect data corruption.

- RAID-like features: Some file systems incorporate redundancy features.

7. Performance Optimization:

- Read-ahead: Predicting and pre-loading data likely to be accessed soon.

- Write-back caching: Delaying writes to improve performance.

8. Snapshots and Versioning:

- Copy-on-write strategies to efficiently store multiple versions of data.

16
9. Data Deduplication:

- Identifying and eliminating duplicate data to save storage space.

10. Encryption:

- On-the-fly encryption of data blocks for security.

These strategies aim to balance several, often competing, goals:

- Maximizing storage efficiency

- Ensuring data integrity and reliability

- Optimizing read and write performance

- Providing features like versioning and security

- Maintaining backwards compatibility

The specific approaches used can vary significantly between file systems,
depending on their design goals and target use cases. For instance, a file system
designed for large-scale enterprise storage might prioritize features like thin
provisioning and deduplication, while one for embedded systems might focus on
simplicity and minimal metadata overhead.

Conclusion

The design principles and features of modern file systems are the result of decades
of evolution in storage technology and computing needs. File organization
techniques like B-tree structures and extent-based allocation have dramatically

17
improved the efficiency of file lookups and storage. Advanced metadata
management, including inline data storage and extended attributes, allows for more
flexible and efficient handling of file information.

Data storage strategies have become increasingly sophisticated, with techniques


like delayed allocation and multiple block allocation optimizing how data is
written to disk. Features like journaling, checksums, and self-healing mechanisms
have greatly improved data integrity and system reliability.

REFERENCES

1:https://www.geeksforgeeks.org/file-systems-in-operating-system/

2:https://www.keil.com/pack/doc/mw/FileSystem/html/fat_fs.html#:~:text=FAT
%20is%20an%20acronym%20for,(a%20data%20storage%20area).

3:https://en.wikipedia.org/wiki/NTFS#:~:text=NTFS%20is%20made%20up
%20of,data%20streams%20and%20locking%20mechanisms.

4:https://docs.kernel.org/admin-guide/ext4.html#:~:text=Ext4%20is%20an
%20advanced%20level,%2Dthe%2Dart%20feature%20requirements.

5:https://www.microfocus.com/documentation/server-express/sx20books/
fhorgs.htm#:~:text=The%20term%20%22file%20organization
%22%20refers,which%20it%20can%20be%20accessed.

6:https://tagging.connectpaste.com/blog/the-top-5-features-your-file-organization-
system-must-have

18
7:https://docs.redhat.com/en/documentation/red_hat_ceph_storage/1.2.3/html/
storage_strategies/what-are-storage-strategies#:~:text=A%20storage%20strategy
%20is%20a,drives%20with%20SSD%2Dbased%20journals.

19

You might also like