You are on page 1of 26

OPERATIN

G SYSTEM
PROJECT

ANALYSIS REPORT ON
COMPARISON OF FILE
SYSTEMS OF WINDOWS, MAC
AND LINUX

SUBMITTED TO:
SIR MUBASHIR AYUB
SUBMITTED BY:
Amina Zafar (17-SE-23)
Mahnoor shafique (17-SE-19)
Fasiha fatma (17-SE-25)
1

Table of Contents
File System:................................................................................................................................3
Architecture:...........................................................................................................................3
WINDOWS FILE SYSTEM......................................................................................................4
CDFS:.....................................................................................................................................4
UDF:.......................................................................................................................................5
 Boot Sector:.................................................................................................................6
 FAT table:....................................................................................................................6
 Root Directories:.........................................................................................................6
 Data Area (other dir. and all files):..............................................................................6
FAT 12....................................................................................................................................6
FAT 16:..................................................................................................................................6
Ex FAT (FAT 64):..................................................................................................................7
COMPARISON OF FAT’S DIFFERENT VERSIONS.........................................................7
PROBLEMS IN FAT.............................................................................................................7
NTFS:.....................................................................................................................................8
 Partitioning Boot Sector:.............................................................................................8
Master File Table:...............................................................................................................8
System Files:.......................................................................................................................9
ReFS:....................................................................................................................................10
 Integrity-streams........................................................................................................11
 Storage Spaces integration........................................................................................11
 Salvaging data...........................................................................................................11
 Proactive error correction..........................................................................................11
LINUX FILE SYSTEM...........................................................................................................12
NATIVE LINUX FILESYSTEMS:.....................................................................................12
Journaling Filesystems:........................................................................................................13
 Ext2, Ext3, Ext4........................................................................................................14
 ReiserFS....................................................................................................................14
 XFS............................................................................................................................14
 JFS.............................................................................................................................14
Ext2.......................................................................................................................................14
Ext3.......................................................................................................................................14
2

Ext4.......................................................................................................................................15
ReiserFS...............................................................................................................................15
XFS:......................................................................................................................................16
JFS:.......................................................................................................................................17
HOW THE FILE SYSTEM OF WINDOWS DIFFER FROM LINUX?............................18
MACINTOSH FILE SYSTEM................................................................................................18
NTFS:...................................................................................................................................19
FAT32...................................................................................................................................19
ExFAT..................................................................................................................................20
Ext2:.....................................................................................................................................20
HFS:......................................................................................................................................20
HSF PLUS:...........................................................................................................................20
Introduction:......................................................................................................................20
History:.............................................................................................................................21
Design:..............................................................................................................................22
HFS+ File Limits in Mac OS X:.......................................................................................24
Benefits of HFS versus HFS+:.............................................................................................25
Criticism:..........................................................................................................................25
COMPARISON OF FILE SYSTEMS:.............................................................................26
3

ANALYSIS REPORT

COMPARISON OF FILE SYSTEM OF WINDOWS, MAC AND LINUX

File System:

A filesystem is the methods and data structures that an operating system uses to keep track
of files on a disk or partition; that is, the way the files are organized on the disk. Without a
file system, information placed in a storage medium would be one large body of data with no
way to tell where one piece of information stops and the next begins. By separating the data
into pieces and giving each piece a name, the information is easily isolated and identified.
Taking its name from the way paper-based information systems are named, each group of
data is called a "file". The structure and logic rules used to manage the groups of information
and their names is called a "file system".

For example Windows, OS/2 and Unix-based operating systems all have file systems in


which files are placed somewhere in a hierarchical (tree) structure. A file is placed in
a directory (folder in Windows) or subdirectory at the desired place in the tree structure.

There are different kinds of file systems. Each one has different structure and logic,
properties of speed, flexibility, security, size and more. Some file systems have been
designed to be used for specific applications. For example, the ISO 9660 file system is
designed specifically for optical discs.

File systems can be used on numerous different types of storage devices that use different
kinds of media. Some file systems are used on local data storage devices while others provide
file access via a network protocol (for example, NFS, SMB, or 9P clients). Some file systems
are "virtual", meaning that the supplied "files" (called virtual files) are computed on request
or are merely a mapping into a different file system used as a backing store. The file system
manages access to both the content of files and the metadata about those files. It is
responsible for arranging storage space; reliability, efficiency, and tuning with regard to the
physical storage medium are important design considerations.
4

Architecture:
A file system consists of two or three layers. Sometimes the layers are explicitly separated,
and sometimes the functions are combined.

The logical file system is responsible for interaction with the user application. It provides

the application program interface (API) for file operations like OPEN ,  CLOSE ,  READ etc.
and passes the requested operation to the layer below it for processing. This layer provides
file access, directory operations, and security and protection.

The second optional layer is the virtual file system. This interface allows support for multiple
concurrent instances of physical file systems, each of which is called a file system
implementation.

The third layer is the physical file system. This layer is concerned with the physical operation
of the storage device (e.g. Disk). It processes physical blocks being read or written. It
handles buffering and memory management and is responsible for the physical placement of
blocks in specific locations on the storage medium. The physical file system interacts with
the device drivers or with the channel to drive the storage device.

To comply with diverse requirements, such as storage performance, stability and reliability,
plenty of file systems are developed to serve certain user purposes.

WINDOWS FILE SYSTEM

Microsoft Windows OS uses two major file systems.

1. FAT (File allocation table) inherited from old DOS with its later extension FAT12,
FAT16 and most latest extension FAT32.
2. And widely-used NTFS (New Technology File System) file system.

Recently released ReFS (Resilient File System) file system was developed by Microsoft as a


new generation file system for Windows 8 and Windows 10 Servers. It is developed to
overcome the limitations of NTFS when managing large amount of data.

Further formats that are used by Windows are CD-ROM File System (CDFS) and Universal
Disk Format (UDF).
5

CDFS:

CDFS is a relatively simple format that was defined in 1988 as the read-only formatting
standard for CD-ROM media. Windows 2000 implements ISO 9660-compliant CDFS in
\Winnt\System32\Drivers\Cdfs.sys, with long filename support defined by Level 2 of the ISO
9660 standard Because of its simplicity, the CDFS format has a number of restrictions:

 Directory and file names must be fewer than 32 characters long


 Directory trees can be no more than eight levels deep

CDFS is considered a legacy format because the industry has adopted the Universal Disk
Format (UDF) as the standard for read only media.

UDF:

OSTA (Optical Storage Technology Association) defined UDF (Universal disk format) in
1995 as a format to replace CDFS for magnet optical storage media, mainly DVD-ROM.
The Windows 2000 UDF file system implementation is ISO 13346-compliant and supports
UDF versions 1.02 and 1.5 UDF file systems have the following traits:

 Filenames can be 255 characters long


 The maximum path length is 1023 characters

Although the UDF format was designed with rewritable media in mind, the Windows 2000
UDF driver (\Winnt\System32\Drivers\Udfs.sys) provides read-only support.

FAT:
In the early days of computing, Microsoft developed a file system, in collaboration with IBM
which was named as FAT file system. FAT file system was developed to meet the
requirements of storage devices at that time, which used to be very limited in size. FAT (File
Allocation Table) is one of the simplest types of file systems.

It consists of a file system descriptor sector (boot sector or superblock), a file system block


allocation table (referred as File Allocation Table) and plain storage space to store files and
folders. Files on FAT are stored in directories. Each directory is an array of 32-byte records,
each defining file or file extended attributes (e.g. a long file name).
6

Windows supports FAT file systems to enable upgrades from other versions of Windows, due
to compatibility with other operating systems in multiboot systems. Windows FAT file
system driver is implemented in \Winnt\System32\Drivers\Fastfat.sys Each FAT format
includes a number that indicates the number of bits the format uses to identify clusters on a
disk.

File Allocation File Allocation Other directories


Boot sector Root Directory
Table 1 Table 2 and all files

FAT format organization (table layout)

 Boot Sector: It contains the information like how many clusters are there in track,
how many sectors are there on each cluster and what is the size of each sector.
 FAT table: It contains pointers to every cluster on the disk. It indicates number of
next clusters on the disk. It indicates the end of clusters and tells whether particular
cluster is empty or not.
 Root Directories: It is the primary directory of the disk.
 Data Area (other dir. and all files): It is actual place where data is stored on the
disk. It spans across the remaining sectors of the disc.

The numbers in FAT12, FAT16, and FAT32 stand for the number of bits used to enumerate a
file system block.

FAT 12

FAT12's 12-bit cluster (Addressable blocks that many file system formats use) identifier
limits a partition to storing a maximum of 2 12 (4096) clusters. Windows uses cluster sizes
from 512 bytes to 8 KB in size, which limits a FAT12 volume size to 32 MB. Windows uses
FAT12 as the format for all 5-inch floppy disks and 3.5-inch floppy disks, which store up to
1.44 MB of data.

FAT 16:

FAT16 with a 16-bit cluster identifier, can address 2 16 (65,536) clusters. On Windows,
FAT16 cluster sizes range from 512 bytes (the sector size) to 64 KB, which limits FAT16
volume sizes to 4 GB. The cluster size Windows uses depends on the size of a volume.
7

FAT 32:

FAT32 is the most recently defined FAT-based file system format. It’s included with
Windows 95 OSR2, Windows 98, and Windows Millennium Edition FAT32 uses 32-bit
cluster identifiers but reserves the high 4 bits, so in effect it has 28-bit cluster identifiers
because FAT32 cluster sizes can be as large as 32 KB, FAT32 has a theoretical ability to
address 8 TB volumes. Although Windows works with existing FAT32 volumes of larger
sizes (created in other operating systems), it limits new FAT32 volumes to a maximum of 32
GB.

Ex FAT (FAT 64):

It is designed for flash drives. Its file size limit is 2 64, or 16 exa-bytes and Max cluster size is
2255 sectors, but in practice is 32 MB. Bitmap tracks free clusters which improves
performance. Moreover, allows 1000+ files in a single directory that enhance the scalability.

COMPARISON OF FAT’S DIFFERENT VERSIONS

FAT12 was used for old floppy disks. FAT16 (or simply FAT) and FAT32 are widely used
for flash memory cards and USB flash sticks. The system is supported by mobile phones,
digital cameras and other portable devices. FAT32’s higher potential cluster numbers let it
more efficiently manage disks than FAT16. It can handle up to 128-GB volumes with 512-
byte clusters Unlike FAT12 and FAT16, root directory is not fixed size or location largest file
size on Windows is 4GB (same as FAT16). FAT or FAT32 is a file system that is used on
Windows-compatible external storages or disk partitions with the size under 2GB (for FAT)
or 32GB (for FAT32). Windows cannot create FAT32 file system over 32GB (however Linux
supports FAT32 up to 2TB).

PROBLEMS IN FAT

FAT file system was designed for disk of small size (up to few GBs), but later on the as the
high capacity disks came into use, FAT file system could not support them. FAT file system
could not support the application required Recoverability, fault tolerance and file security.
8

Especially in corporate world, where recoverability and reliability was of great importance,
Fat file system loose its way to NTFS.

Updating the FAT table is very important as well as time consuming. If the FAT table is not
regularly updated, it can lead to data loss. It is time consuming because the disk read heads
must be repositioned to the drive's logical track zero each time the FAT table is updated.
There is no organization to the FAT directory structure, and files are given the first open
location on the drive. In addition, FAT supports only read-only, hidden, system, and archive
file attributes.

NTFS:
NTFS (New Technology File System) was introduced in Windows NT and currently it is a
major file system for Windows. NTFS uses 64-bit cluster indexes. It has Theoretical ability to
address volumes of up to 16 Exabyte (16 billion GB). Windows limits the size of an NTFS
volume to that addressable with 32-bit clusters, which is 256 TB (using 64-KB clusters) and
Supports 232-1 files per volume. NTFS Maximum file size is 16TB.

This is the default file system for disk partitions and the only file system that supports disk
partitions over 32GB. The file system is quite extensible and supports many file properties,
including access control, encryption etc. Each file on NTFS is stored as a file descriptor in a
Master File Table and file content. A Master file table contains all information about the file
like size, allocation, name etc. The first and the last sectors of the file system contain file
system settings (boot record or superblock). This file system uses 48 and 64 bit values to
reference files, thus, supporting disk storages with high capacity.

Partitioning Master File


System Files File Area
Boot Sector Table

NTFS table layout

 Partitioning Boot Sector: It contains information about volume, size of each cluster, number
of sectors in each cluster and size of each cluster, contains details about Boot startup.

 Master File Table: It’s like an index that stores information about every file and table which
is stored in the volume on the disk. There is at least one record for every file and directory. It
9

stores the details like type, size, date/time of the creation of the file, date/time about the
recent modification and author identity.

Standard Security Extended


File Name Data
Information Descriptor Attributes

Master File Table

 Standard Information: Includes access attributes such as read only, read/write etc.
 File Name: A file or directory must have a name.
 Security descriptor: Specifies who owns the file and who else can access it.
 Data: The actual content of the file.
 Extended attributes: Any additional attributes that the author wants to define.

System Files:

- Log files tell about transaction steps used for NTFS recoverability.
- Cluster bit map shows which cluster are free or in use.
- Attribute Definition tells about the attribute types supported on a volume.

The goals of NTFS are to provide:

 Reliability, which is especially desirable for high end systems and file servers. To
ensure reliability of NTFS, three major areas were addressed: recoverability, removal
of fatal single sector failures, and hot fixing.

1. NTFS is a recoverable file system because it keeps track of transactions against


the file system.
2. Under FAT, if a sector that is the location of one of the file system's special
objects fails, then a single sector failure will occur. NTFS avoids this in two
ways: first, by not using special objects on the disk and tracking and protecting
all objects that are on the disk. Secondly, under NTFS, multiple copies (the
number depends on the volume size) of the Master File Table are kept.
3. NTFS supports hot fixing.

 A platform for added functionality.


One of the major design goals of Windows NT at every level is to provide a platform
10

that can be added to and built upon, and NTFS is no exception. NTFS provides a rich
and flexible platform for other file systems to be able to use. In addition, NTFS fully
supports the Windows NT security model and supports multiple data streams. No
longer is a data file a single stream of data. Finally, under NTFS, a user can add his or
her own user-defined attributes to a file.

 Support POSIX requirements


NTFS is the most POSIX. Compliant of the supported file systems because it supports
the following POSIX.1 requirements:
Case Sensitive Naming:
Under POSIX, README.TXT, Readme.txt, and readme.txt are all different files.
Additional Time Stamp:
The additional time stamp supplies the time at which the file was last accessed.
Hard Links:
A hard link is when two different filenames, which can be located in different
directories, point to the same data.

 Removal of the limitations of the FAT file systems.

ReFS:
ReFS (Resilient File System) is the latest development of Microsoft currently available for
Windows 8 Servers. The file system architecture absolutely differs from other Windows file
systems and is mainly organized in a form of a B+-tree. ReFS has high tolerance to failures
due to new features included into the system.

And namely, Copy-on-Write (CoW): no metadata is modified without being copied, data is


not written over the existing data, but into new disk space.

With any file modifications, a new copy of metadata is stored into free storage space, and
then the system creates a link from older metadata to the newer one. Thus, the system stores
significant quantity of older backups in different places providing easy file recovery unless
this storage space is overwritten.

ReFS (Resilient File System) improves on NTFS significantly, as it has features like data
scrubbing (an error correction technique that prevents data degradation), built-in handling
11

of hard disk drive failure and redundancy, integration of the RAID functionality, and


improved structural reliability (through B+ trees for on-disk structures).
ReFS lives up to its name, especially for larger Microsoft servers, and it’s generally
considered to be a major improvement in terms of reliability. ReFS is designed to run
on Storage Spaces, virtual drives in Windows Server, and while it’s stable for this purpose,
it’s not nearly ready to replace NTFS as a standard file system for everyday computing.

ReFS was initially added to Windows Server 2012 only, with the aim of gradual migration to
consumer systems in future versions; this was achieved as of Windows 8.1. The initial
versions removed some NTFS features, such as disk quotas, alternate data streams,
and extended attributes. Some of these were re-implemented in later versions of ReFS.
The cluster size of a ReFS volume is either 4 KB or 64 KB.

ReFS introduces new features that can precisely detect corruptions and also fix those
corruptions while remaining online, helping provide increased integrity and availability for
your data:

 Integrity-streams - ReFS uses checksums for metadata and optionally for file data,
giving ReFS the ability to reliably detect corruptions.
 Storage Spaces integration - When used in conjunction with a mirror or parity space,
ReFS can automatically repair detected corruptions using the alternate copy of the
data provided by Storage Spaces. Repair processes are both localized to the area of
corruption and performed online, requiring no volume downtime.
 Salvaging data - If a volume becomes corrupted and an alternate copy of the
corrupted data doesn't exist, ReFS removes the corrupt data from the namespace.
ReFS keeps the volume online while it handles most non-correctable corruptions, but
there are rare cases that require ReFS to take the volume offline.
 Proactive error correction - In addition to validating data before reads and writes,
ReFS introduces a data integrity scanner, known as a scrubber. This scrubber
periodically scans the volume, identifying latent corruptions and proactively
triggering a repair of corrupt data.

The following features are available on ReFS and NTFS:


12

Functionality ReFS NTFS

BitLocker encryption Yes Yes

Cluster Shared Volume (CSV) support Yes Yes

Soft links Yes Yes

Failover cluster support Yes Yes

Access-control lists Yes Yes

Changes notifications Yes Yes

Junction points Yes Yes

Mount points Yes Yes

Reparse points Yes Yes

Volume snapshots Yes Yes

File IDs Yes Yes

Sparse files Yes Yes

Named streams Yes Yes

The following features are only available on ReFS:

Functionality ReFS NTFS

Block clone Yes No

Sparse VDL Yes No

Real-time tier optimization Yes (on Storage Spaces Direct) No


13

LINUX FILE SYSTEM

NATIVE LINUX FILESYSTEMS:

Every native Linux filesystem implements a basic set of common concepts that were derived
from those originally developed for UNIX. (Native means that the filesystems were either
developed originally for Linux or were first developed for other operating systems and then
rewritten so that they would have functions and performance on Linux comparable or
superior to those of filesystems originally developed for Linux.)

Several Linux native filesystems are currently in widespread use, including ext2, ext3,
ReiserFS, JFS and XFS. Additional native filesystems are in various stages of development.
Linux's first filesystem was minix, which was borrowed from the Minix OS. However, minix
was not well suited for use on Linux hard disks for several reasons, including its maximum
partition size of only 64MB, its short filenames and its single timestamp. 

The Extended File System, ext, was introduced in April, 1992. With a maximum partition
size of 2GB and a maximum file name size of 255 characters, it removed the two biggest
minix limitations. However, there still was no support for the separate access, inode
modification and data modification timestamps. Also, its use of linked lists to keep track of
free blocks and inodes caused the lists to become unsorted and the filesystem to become
fragmented. Ext2 is the most portable of the native Linux filesystems because drivers and
other tools exist that allow accessing ext2 data from a number of other operating systems.

Journaling Filesystems:

Journaling filesystems offer several important advantages over static filesystems, such as
ext2. In particular, if the system is halted without a proper shutdown, they guarantee
consistency of the data and eliminate the need for a long and complex filesystem check
during rebooting. The term journaling derives its name from the fact that a special file called
a journal is used to keep track of the data that has been written to the hard disk. Ext3 has
been integrated into the Linux kernel. It is basically an extension of ext2 to which a
journaling capability has been added, and it provides the same high degree of reliability
because of the exhaustively field-proven nature of its underlying ext2.
ReiserFS, was actually the first journaling filesystem added to the Linux kernel. As was the
14

case with ext2, it was designed from the ground up for use in Linux. However, unlike ext3, it
was also designed from the ground up as a journaling filesystem rather than as an add-on to
an existing filesystem, and thus it is widely considered to be the most advanced of the native
Linux journaling filesystems. 

Open-source Linux OS aims at implementing, testing and using different concepts of file
systems. The most popular Linux file systems include:

 Ext2, Ext3, Ext4 - a “native” Linux file system. This file system falls under active
developments and improvements. Ext3 file system is just an extension of Ext2 that
uses transactional file writing operations with a journal. Ext4 is a further
development of Ext3, extended with the support of optimized file allocation
information (extents) and extended file attributes. This file system is frequently used
as a "root" file system for most Linux installations.
 ReiserFS - an alternative Linux file system for storing a huge number of small files. It
has good capability of files search and enables compact files allocation by storing file
tails or small files along with metadata in order not to use large file system blocks for
the same purpose.
 XFS - a file system derived from SGI Company and was initially used for company’s
IRIX servers. Now XFS specifications are implemented in Linux. XFS file system has
great performance and is widely used to store files.
 JFS - a file system developed by IBM for the company’s powerful computing
systems. JFS1 usually stands for JFS, JFS2 is the second release. Currently, this file
system is open-source and implemented in most modern Linux versions.

The concept of “hard links” used in this kind of operating systems makes most Linux file
systems similar in that the file name is not regarded as a file attribute and rather defined as an
alias for a file in a certain directory. A file object can be linked from many locations, even
multiply from the same directory under different names. This can lead to serious and even
insurmountable difficulties in recovery of file names after file deletion or file system damage.

Ext2
 Ext2 stands for second extended file system. It was introduced in 1993 and developed
by Remy Card. This was developed to overcome the limitation of the original ext file
system. Ext2 does not have journaling feature.
15

 On flash drives, usb drives, ext2 is recommended, as it doesn’t need to do the


overhead of journaling.
 Maximum individual file size can be from 16 GB to 2 TB.
 Overall ext2 file system size can be from 2 TB to 32 TB

Ext3
 Ext3 stands for third extended file system. It was introduced in 2001. Developed by
Stephen Tweedie. Starting from Linux Kernel 2.4.15 ext3 was available.
 The main benefit of ext3 is that it allows journaling.
 Journaling has a dedicated area in the file system, where all the changes are tracked.
When the system crashes, the possibility of file system corruption is less because of
journaling.
 Maximum individual file size can be from 16 GB to 2 TB
 Overall ext3 file system size can be from 2 TB to 32 TB
 There are three types of journaling available in ext3 file system.
 Journal – Metadata and content are saved in the journal.
 Ordered – Only metadata is saved in the journal. Metadata are journaled only
after writing the content to disk. This is the default.
 Writeback – Only metadata is saved in the journal. Metadata might be
journaled either before or after the content is written to the disk.
 You can convert a ext2 file system to ext3 file system directly (without
backup/restore).

Ext4
 Ext4 stands for fourth extended file system. It was introduced in 2008. Starting from
Linux Kernel 2.6.19 ext4 was available. It supports huge individual file size and overall
file system size.
 Maximum individual file size can be from 16 GB to 16 TB
 Overall maximum ext4 file system size is 1 EB (Exabyte). 1 EB = 1024 PB
(petabyte). 1 PB = 1024 TB (terabyte).
 Directory can contain a maximum of 64,000 subdirectories (as opposed to 32,000 in
ext3)
 You can also mount an existing ext3 fs as ext4 fs (without having to upgrade it).
 Several other new features are introduced in ext4: multiblock allocation, delayed
allocation, journal checksum. fast fsck, etc. All you need to know is that these new
16

features have improved the performance and reliability of the filesystem when compared
to ext3.
 In ext4, you also have the option of turning the journaling feature “off”.

ReiserFS

ReiserFS is a general-purpose, journaled computer file system and is currently supported


on Linux. ReiserFS has a number of strengths:

 Generally higher performances for all file sizes.


 Wastes less space. There is no static inode space allocation; small files are packed
together.
 Much higher performance for large directories, even compared to other balanced tree
filesystems.
 Uses B* balanced trees, whereas other balanced tree filesystems use obsolete B+
trees.
 Partitions can be resized while in use.
 Extremely fast recovery in the event of unplanned machine shutdown (loss of power).
Rather than taking many seconds or even minutes to check the filesystem as e2fsck
does, ReiserFSck takes only seconds.

It also has its weaknesses:

 Kernel-based NFS is not very stable yet.


 Certain programs (qmail, for one) have issues with ReiserFS. Patches are available in
many cases.
 It is not possible to change live filesystems back and forth from ext2 to ReiserFS. To
make the change, you need to back up your data, create the file system, and restore.
 Occasionally, you may experience a stall condition (read starves). When large writes
are scheduled all at once, reads can starve. A fix for this is in the works, and the later
your ReiserFS patch, the better this situation is handled.

Compared with ext2 and ext3 in version 2.4 of the Linux kernel, when dealing with files
under 4 KB and with tail packing enabled, ReiserFS may be faster. For email servers,
ReiserFS was problematic due to semantic problems. Also, ReiserFS had a problem with very
17

fast filesystem aging when compared to other file systems, in several usage scenarios
filesystem performance decreased dramatically with time.

XFS:

XFS is a high-performance 64-bit  and supports a maximum file system size of


8 exbibytes minus one byte (263 − 1 bytes) Journaling file system created by Silicon Graphics,
Inc. (SGI) in 1993. It was the default file system in the SGI's IRIX operating system.

 It uses a B-tree balanced tree algorithm to allocate data as fast as possible. 


XFS excels in the execution of parallel input/output (I/O) operations due to its design,
which is based on allocation groups (a type of subdivision of the physical volumes in
which XFS is used- also shortened to AGs). Because of this, XFS enables extreme
scalability of I/O threads, file system bandwidth, and size of files and of the file
system itself when spanning multiple physical storage devices.
 XFS ensures the consistency of data by employing metadata journaling and
supporting write barriers. Space allocation is performed via extents with data
structures stored in B+ trees, improving the overall performance of the file system,
especially when handling large files. A feature unique to XFS is the pre-allocation of
I/O bandwidth at a pre-determined rate, this is suitable for many real-time
applications; however, this feature was supported only on IRIX, and only with
specialized hardware.

JFS:
Journaled File System or JFS is a 64-bit journaling file system created by IBM. In the AIX
operating system, there exist two generations of JFS filesystem that are called JFS (JFS1)
and JFS2 respectively. While in other operating systems, such as Linux, only the second
generation exists and is called simply JFS. This should not be confused with JFS in AIX that
actually refers to JFS1.

In the Linux operating system, JFS is supported with the kernel module (since the kernel
version 2.4.18) and the complementary user space utilities packaged under the name JFSutils.
JFS supports following features:

 Performance tuned for GNU/Linux.


 Designed from the ground up to provide Transaction/Log (not an add-on).
18

 Restarts after a system failure < 1 sec.

 Directory structures designed for speed and efficiency:


- Directories with eight or fewer entries have their contents storied inline within that
directory's i-node.
- Directories with more than eight entries have their contents stored in a B+
tree keyed on name.

 JFS utilizes extents for allocating blocks for large files.


 Support for extended attributes in addition to standard Unix-style permissions.
 Support for both internal and external logs (see below).
 Extremely Scalable; Consistent performance from minimum file size up to 4
petabytes.
 Algorithms designed for high performance on very large systems.

Actual usage of JFS in Linux is uncommon, as ext4 typically offers better performance.


There are also potential problems with JFS, such as its implementation of journal writes.
They can be postponed until there is another trigger, potentially indefinitely, which can cause
data loss over a theoretically infinite timeframe.

HOW THE FILE SYSTEM OF WINDOWS DIFFER FROM LINUX?


These filesystems differ from the Windows filesystems in a number of ways including

(1) Allowing important system folders to span multiple partitions and multiple hard drives

(2) Adding additional information about files, including ownership and permissions

(3) Establishing a number of standard folders for holding important components of the
operating system.

MACINTOSHS FILE SYSTEM

The file system in iOS and the primary format in macOS is HFS Plus. MacOS additionally
supports a variety of other formats. Regardless of the underlying format, all of the disks
attached to the device whether they are physically plugged in or are connected indirectly
through the network contribute space to create a single collection of files. Because the
number of files can easily be many millions, the file system uses directories to create a
19

hierarchical organization. Although the basic directory structures are similar for iOS and
macOS, there are differences in the way each system organizes apps and user data.

Macintosh OS supports the following file system.


 NTFS
 FAT32
 exFAT
 ext2
 HFS
 HFS Plus (HSF+)

NTFS:
This is the current preferred file system of Windows (beginning predominance circa
Windows NT 4.0 and Windows 2000, and including Windows XP). Most Windows systems
use principle partitions with this file system. This is a journal led file system with good
support for large files. It should be noted that it does NOT support POSIX permissions or
ownership. Mac OS X has read only support for this format. It has no capabilities to write to
an NTFS drive. Windows has complete read/write capabilities for this format.

FAT32
FAT32 is a legacy file system in the Windows world. However, it is still widely used as
almost all Flash-based drives use this format. Mac OS X supports this format for both reading
and writing, as does Windows. It has notable limitations, including difficulties with files of
size larger than 4 GB. Also, as with NTFS, this file system does not support POSIX and
permission / ownership errors could arise when files are moved back and forth between this
file system and a POSIX-compliant file system.

ExFAT
ExFAT, also known as FAT64, is a newer file system developed with the simplicity of FAT
in mind, and also to alleviate the FAT32 limits. Mac OS X 10.6.5 and later versions have full
read/write support for it. Unlike FAT32, it does NOT have a 4GB single file limit. However,
Linux support for exFAT is poor to nonexistent. Also, as with NTFS, this file system does
20

not support POSIX and permission / ownership errors could arise when files are moved back
and forth between this file system and a POSIX-compliant file system.

Ext2:
Ext2 is a relatively modern file system that is used primarily in Linux environments. It
features many of the same creature comforts as OS X, including a journal and the ability to
use large files (e.g. bigger than the 4 GB limit in FAT32). This file system is not natively
supported in either OS X or Windows, but free extensions are available for both operating
systems that allow basically full read/write utilization of this filesystem on both OS X and
Windows.

HFS:
Hierarchical File System (HFS) is a proprietary file system developed by Apple Inc. for use
in computer systems running Mac OS. Originally designed for use on floppy and hard disks,
it can also be found on read-only media such as CD-ROMs.

HSF PLUS:
Introduction:
This is the principal file system of Mac OS X. HFS Plus or HFS+ is a file system developed
by Apple Inc. It served as the primary file system of macOS. HFS+ was developed to replace
the Hierarchical File System (HFS) as the primary file system used in Macintosh computers
(or other systems running the classic Mac OS). It is also one of the formats used by
the iPod digital music player. HFS Plus is also referred to as Mac OS Extended or HFS
Extended, where its predecessor, HFS, is also referred to as Mac OS Standard or HFS
Standard. During development, Apple referred to this file system with the codename Sequoia.
[5] At WWDC 2017, Apple announced macOS High Sierra, in which the default file system
of Mac is changed to APFS.

HFS Plus is an improved version of HFS, supporting much larger files (block addresses are
32-bit length instead of 16-bit) and using Unicode (instead of Mac OS Roman or any of
several other character sets) for naming items. Like HFS, HFS Plus uses B-trees to store most
volume metadata, but unlike most other file systems; HFS Plus supports hard links to
directories. HFS Plus permits filenames up to 255 characters in length, and n-forked
files similar to NTFS, though until 2005 almost no system software took advantage of forks
other than the data fork and resource fork. HFS Plus also uses a full 32-bit allocation
mapping table rather than HFS's 16 bits, significantly improving space utilization with large
disks.
21

Design:
HFS Plus volumes are divided into sectors (called logical blocks in HFS), that are usually 512
bytes in size. These sectors are then grouped together into allocation blocks which can
contain one or more sectors; the number of allocation blocks depends on the total size of the
volume. HFS Plus uses a larger value to address allocation blocks than HFS, 32 bits rather
than 16 bits; this means it can access 4,294,967,296 (= 232) allocation blocks rather than the
65,536 (= 216) allocation blocks available to HFS. When disks were small, this was of little
consequence, but as larger-capacity drives became available, it meant that the smallest
amount of space that any file could occupy (a single allocation block) became excessively
large, wasting significant amounts of space. For example, on a 1 GB disk, the allocation
block size under HFS is 16 KB, so even a 1 byte file would take up 16 KB of disk space. HFS
Plus's system greatly improves space utilization on larger disks as a result.

File and folder names in HFS Plus are also character encoded in UTF-16[verification
needed] and normalized to a form very nearly the same as Unicode Normalization Form D
(NFD) (which means that recomposed characters like "å" are decomposed in the HFS+
filename and therefore count as two code units and UTF-16 implies that characters from
outside the Basic Multilingual Plane also count as two code units in an HFS+ filename). HFS
Plus permits filenames up to 255 UTF-16 code units in length.

Formerly, HFS Plus volumes were embedded inside an HFS standard file system. This was
phased out by the Tiger transition to Intel Macs, where the HFS Plus file system was not
embedded inside a wrapper. The wrapper had been designed for two purposes; it allowed
Macintosh computers without HFS Plus support in their ROM to boot HFS Plus volumes and
it also was designed to help users transition to HFS Plus by including a minimal HFS volume
with a read-only file called Where have all my files gone?, explaining to users with versions
of Mac OS 8.0 and earlier without HFS Plus, that the volume requires a system with HFS
Plus support. The original HFS volume contains a signature and an offset to the embedded
HFS Plus volume within its volume header. All allocation blocks in the HFS volume which
contain the embedded volume are mapped out of the HFS allocation file as bad blocks.

Notable among file systems used for UNIX systems, HFS Plus does not support sparse files.

There are nine structures that make up a typical HFS Plus volume.

Sectors 0 and 1 of the volume are HFS boot blocks. These are identical to the boot blocks in
an HFS volume. They are part of the HFS wrapper.
22

Sector 2 contains the Volume Header equivalent to the Master Directory Block in an HFS


volume. The Volume Header stores a wide variety of data about the volume itself, for
example the size of allocation blocks, a timestamp that indicates when the volume was
created or the location of other volume structures such as the Catalog File or Extent Overflow
File. The Volume Header is always located in the same place.

The Allocation File which keeps track of which allocation blocks are free and which are in
use. It is similar to the Volume Bitmap in HFS, in which each allocation block is represented
by one bit. A zero means the block is free and a one means the block is in use. The main
difference with the HFS Volume Bitmap is that the Allocation File is stored as a regular file,
it does not occupy a special reserved space near the beginning of the volume. The Allocation
File can also change size and does not have to be stored contiguously within a volume.

The Catalog File is a B-tree that contains records for all the files and directories stored in the
volume. The HFS Plus Catalog File is very similar to the HFS Catalog File, the main
differences being records are larger to allow more fields and to allow for those fields to be
larger (for example to allow the longer 255-character unicode file names in HFS Plus). A
record in the HFS Catalog File is 512 bytes in size, a record in the HFS Plus Catalog File is
4 KB in the classic Mac OS and 8 KB in macOS. Fields in HFS are of fixed size, in HFS Plus
the size can vary depending on the actual size of the data they store.

The Extents Overflow File is another B-tree that records the allocation blocks that are
allocated to each file as extents. Each file record in the Catalog File is capable of recording
eight extents for each fork of a file; once those are used additional extents are recorded in the
Extents Overflow File. Bad blocks are also recorded as extents in the Extents Overflow File.
The default size of an extent record in the classic Mac OS is 1 KB and 4 KB in macOS.

The Attributes File is a new B-tree in HFS Plus that does not have a corresponding structure
in HFS. The Attributes File can store three different types of 4 KB records: Inline Data
Attribute records, Fork Data Attribute records and Extension Attribute records. Inline Data
Attribute records store small attributes that can fit within the record itself. Fork Data
Attribute records contain references to a maximum of eight extents that can hold larger
attributes. Extension Attributes are used to extend a Fork Data Attribute record when its eight
extent records are already used.

The Startup File is designed for non-Mac OS systems that don't have HFS or HFS Plus
support. It is similar to the Boot Blocks of an HFS volume.
23

The second to last sector contains the Alternate Volume Header equivalent to the Alternate
Master Directory Block of HFS.

The last sector in the volume is reserved for use by Apple. It is used during the computer
manufacturing process.

HFS+ File Limits in Mac OS X:  


Volume and File Limits in Mac OS X

Maximum number of volumes: No limit

Maximum number of files and folders in a Up to 2.1 billion


file:

Maximum volume size and file size: (Mac


2 TB
OS X v 10.0 – 10.1.5)

Maximum volume size and file size: (Mac 8 TB


OS X v 10.2 – 10.2.8)

Maximum volume size and file size (Mac OS 16 TB


X v 10.3 – 10.3.9)

Maximum volume size and file size (Mac OS Almost 8 EB


X v 10.4 and later)

Benefits of HFS versus HFS+:


Typically, the HFS+ file system is better than its predecessor, but there is one case where the
Mac OS Standard beats out the Mac OS Extended format. Volumes that are smaller than 32
GB cannot be initialized as Mac OS Extended format. Upon attempting a Drive Setup
application, HFS+ will give an "Initialization Failed" message. Floppy disks cannot be
initialized with the HFS+ format.

COMPARISON OF FILE SYSTEMS:


Another important distinction that should be noted is that all of the above is based on disks
mounted under the given operating system. Limitations can be bypassed by serving a disk
24

from a server for which the format is native. For instance, a Windows client that is accessing
a served HFS+ disk that is served from a Mac OS X computer (a "shared" disk across the
network) can write to that disk if the server has granted permission. Likewise, while a Mac
OS computer cannot write to an NTFS volume it mounts itself, it can write to an NTFS
volume being served by a Windows computer.

One important question that gets asked frequently at MacRumors is: how should I format my
external device? Here are some suggestions, based on the above limitations of each
filesystem.

If the device will only be used on a Mac OS X computer, use HFS+. This will offer the most
complete support for Mac OS X features.

If the device will only be used in Windows, use NTFS, for the same rationale.

If the device will be mounted on both Windows and Mac computers, and you will not be
using very large files (all files <4 GB) use FAT32. Alternatively, if possible, mount the
device on a computer on the network which is always turned on, and format it in the native
format of that computer. Then use that computer as a server to share that volume with other
computers. For this purpose, it may be slightly advantageous to make the server a Mac OS X
computer, so that the file system complies with POSIX.

COMMON DIFFERENCES

Mac OS file names compatibility:

 Mac OS9 supports HFS and HFS+ File system and may be up to 31 characters long. 
Max OSX supports HFS+ and UFS (Unix File System) and may be up to 255
characters long.
 Colon ":" is used as a directory separator.
 File and folder names may use any characters except colon ":" and forward slash "/"
which is used for directory separators on OS9 and OSX.
 Filenames preserves case but are not case sensitive.

Windows file names compatibility:


 Windows uses two different file systems: File Allocation Table (FAT) file system and
New Technology File System (NTFS).
25

 File and folder names may be up to 255 characters long on FAT file systems and 256
characters long on NTFS. Full pathnames may be up to 260 characters long.
 There is a limit to the full pathnames of 260 characters long.
 Backslash "\" is used as the directory separator.
 File and directory names may not contain the special characters: "/\*?<>|:
 Periods are allowed in file and directory names, but not as the last character. for
example "letter.doc" is legal but "letterdoc." is illegal file name.
 Filenames preserves case and case sensitive.

LINUX file names compatibility:

 LINUX base operating systems mostly use ext file system.


 File and folder names may be up to 255 characters long.
 Forward slash"/" is used as the directory separator.
 File and directory names may not contain the special characters: space and /
 Filenames preserves case and are case sensitive.

You might also like