0% found this document useful (0 votes)
7 views20 pages

File System

Uploaded by

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

File System

Uploaded by

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

File System

What Does a File System Do?


• Responsible for creating, manipulating, renaming,
copying, and removing files to and from a storage
device
• Organizes files into common storage units called
directories
• Keeps track of where files and directories are
located
• Assists users by relating files and folders to the
physical structure of the storage medium

2
Figure 10-1: Files and directories in a file
system are similar to documents and
folders in a filing cabinet

3
Storage Mediums
• A hard disk, or drive, is the most common storage
medium for a file system
– Physically organized into tracks and sectors
– Read/write heads move over specified areas of the
hard disks to store (write) or retrieve (read) data
– Random access device
• Can read or write data directly anywhere on the disk
• Faster than sequential access, which reads and writes
from beginning to end
• Makes use of the file system to organize files
4
File Systems and Operating
Systems
• The type of file management system is dependent
on the operating system
– FAT (file allocation table)
• Used from MS-DOS to Windows ME
– NTFS (New Technology File System)
• Default for Windows NT through Windows 2003
– Unix and Linux support several file systems

5
FAT
• Groups hard drive sectors into clusters
– Increases performance by organizing blocks of
sectors contiguously
• Maintains the relationship between files and clusters
being used for the file
– Clusters have two entries in the table
• Current cluster information
• Link to the next cluster or a special code indicating it
is the last cluster
• Keeps track of writable clusters and bad clusters
6
FAT (continued)
• Organizes the hard drive into
– Partition boot record
• Contains information on how to access the volume
with a file system
– Main and backup FAT
• If an error occurs in reading the main FAT, the backup
is copied to the main to ensure stability
– Root directory
• Contains entries for every file and folder in the
directory

7
Defragmentation
• Occurs when files have clusters scattered in different
locations on the storage medium rather than in a
contiguous location
• Windows provides the Disk Defragmenter utility to
reorganize clusters contiguously
– Improves performance by minimizing movement of
the read/write heads
– Should be used regularly to ensure system runs at
peak performance

8
Figure 10-6
Files become fragmented as they are stored in noncontiguous
clusters; a defragmenting utility moves files to contiguous clusters
and improves disk performance

9
Advantages of FAT
• Efficient use of disk space
– Does not have to use contiguous space for large files
• File names (FAT32) can have up to 255 characters
• Easy to undelete files that have been deleted
– When a file is deleted, the system places a hex value
of E5h in the first position of the file name
– File remains on drive and can be undeleted by
providing the original letter in the undelete process

10
Disadvantages of FAT
• Overall performance slows down as more files are
stored on the partition
• Hard drive can quite easily become fragmented
• Lack of security
– NTFS provides access rights to files and directories
• File integrity problems
– Lost clusters
– Invalid files and directories
– Allocation errors

11
NTFS
• Overcomes limitations of the FAT system
• Is a “journaling” file system
– Keeps track of transaction performed and “rolls
back” transactions if errors are found
• Uses a master file table (MFT) to store data about
every file and directory on the volume
– Similar to a database table with records for each file
and directory
• Uses clusters and reserves blocks of space to allow
the MFT to grow
12
Advantages of NTFS
• File access is very fast and reliable
• With the MFT, the system can recover from
problems without losing significant amounts of data
• Security is greatly increased over FAT
• File encryption with EFS (Encrypting File System)
and file attributes
• File compression
– Process of reducing file size to save disk space

13
Disadvantages of NTFS

• Large overhead
– Not recommended for volumes less than 4 GB

• Cannot access NTFS volumes from MS-DOS,


Windows 5, or Windows 98

14
Comparing File Systems
• Choosing the correct file system is operating system
dependent
• NTFS is recommended for Windows systems
– Today’s networked environments need security
– Today’s machines use tools that require large volumes
– If the hard drive is 10 GB or less, FAT is more
efficient in handling smaller volumes of data
• UNIX/Linux have many file system choices

15
File Organization
• Binary or text
– Binary files are computer readable but not human
readable (i.e., executable programs, image files)
• Faster to access than text files
– Text files consist of ASCII or Unicode characters
• Easy to view and modify with application programs
• Sequential or random access
– Sequential data is accessed one chunk after the other
in order
– Random access data can be accessed in any order
16
Figure 10-7
Sequential vs. random access

Connecting with Computer Science 17


Sequential Access
• Starts at the beginning of the file and processes to
the end of the file
– Writing process is very fast because new data is
added to the end of a file
– Inserting, deleting, or modifying data can be very
slow
• Can store data in rows like a database record
– Rows can have field delimiters or specify fixed sizes
for each field

Connecting with Computer Science 18


Figure 10-8
A comma can be used as a row delimiter

19
Figure 10-9
Data can also have a fixed size

20

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy