Title: Chapter 3: File Systems
1Chapter 3 File Systems
- A Guide to Operating Systems
- Troubleshooting and Problem Solving
2Chapter Objectives
- Understand the basic functions of all file
systems - Describe the major elements of the DOS and
Windows 3.1/ 3.11 file system - Compare and contrast the Windows 95/ 98 file
system (FAT16 and FAT32) with the older DOS/
Windows 3.1 file system - Describe the fundamental features of the UNIX
file system - Describe the basics of the Macintosh file system
3Understanding File System Functions
- Partition and format disks to store and retrieve
information - Establish file naming conventions
- Provide utilities for functions such as file
compression and disk defragmentation - Provide for file and data integrity
- Provide storage media management functions
4A File System Metaphor
5Data Files Contain
- Sounds
- Video
- Web Pages for the Internet
6Block Allocation
- Keeps track of where specific files are stored on
disk - In DOS and Windows, these are clusters
- Hard disk platter has two sides (read/ write head)
- Clusters are mapped to sectors, heads, and tracks
- Divided into logical blocks
- Tracks that line up on platter are called
cylinders
7Block Allocation
- Two techniques are used to store data
- A fixed portion of the disk is used (FAT)
- Various locations on the disk are used (UNIX and
NTFS)
8Partitions and Related Components
- Divides hard drive into sections
- Creates multiple logical volumes that you assign
drive letters to - Partition table (DOS, Mac OS, and Windows
- Disk label in UNIX
- Boot block in UNIX
- Master boot record in Windows (MBR)
9The DOS/Windows 3.1 File System
- Uses a file allocation table (FAT) file system
- Use of 8.3 file names which can be up to 8
characters long followed by a period and an
extension of 3 characters - With DOS prior 4.0, the maximum size of file
system was 32 MB (FAT12) - With MS-DOS from 4.0, the maximum size was 2 GB
(FAT16)
10Partitioning
- The FAT file system supports two partitions per
hard drive - a primary and a secondary partition - A secondary partition may be divided into a
maximum of three logical drives
11Sample DOS Partition Table Structure
- FDISK is used to modify partition information
12MS-DOS FDISK Utility
13FDISK Partition Information Screen
14Formatting Placing a file system on a
partition
- Boot block contains information about disk
(number of tracks and sectors per track) - Boot block contains small program to start
operating system
- In DOS use the format command
- Writes all of the file system structure to disk
- A floppy uses first sector as the boot block
15FORMAT Command Switches
16Root Directory and File Attributes
- Root directory contains the following
- name, start cluster, file size, file modification
date and time - every partition is a fixed size
- File attributes (characteristics)
- hidden, read only and archive
17Clusters
- Not fixed in length
- If a file does not exactly match the disk space
available in the cluster, there will be unused
space at the end of cluster - Unused spots in FAT are marked as bad clusters
- The largest possible partition in FAT is 4 GB
18Hard Disk Cluster Reference
19Typical FAT Directory Structure
- The FAT table and root directory are found at the
beginning of each partition, and are always at
the same location. - Each item in the directory consists of 32 bytes
20Extensions
- SYS extension is generally the device driver
- COM or EXE extensions are program files that the
operating system can execute - BAT extensions are batch files of commands that
can be executed as if they were typed on the
keyboard - Filename and extension cannot contain spaces
21ATTRIB Arguments and Switches
22DOS File System Utilities
- CHKDSK checks the contents of directories and
verifies the consistency of FAT tables - /F, for Fix allows you to correct problems
- SCANDISK is a menu driven interface
- Copies files it will manipulate to a disk
- Conducts some of the same tasks as CHKDSK
23Another DOS Utility
- Defragment - rewrites files to a disk so that
they are contiguous - Looks for empty FAT location and uses the cluster
indicated - Continues to use the next empty cluster until no
more free clusters are found
24More About Defragmentation
- The Disk Defragmenter utility maximizes access
time and makes it faster to write new files to
disk - Floppy disks do not need to be defragmented
- The hard disk should be defragmented on a regular
basis
25Windows 95/ 98 File System
- FAT16 is similar to the system used in DOS/ Win
3.1 - FAT32 is a new system introduced in Windows 95,
release B - Both the FAT 16 and FAT32 file system for Windows
95/ 98 have features in common with the DOS
version of the FAT16 system with some new ideas
26Windows 95/ 98 FAT16
- File names may contain as many as 255 characters
- File names are not case sensitive
- File name can include spaces and several
characters that 8.3 names cannot (./\)
27DOS 8.3 Filenames versus Long Filenames (LFN)
28Long Filenames (LFN)
- The LFN is stored by using a series of additional
directory entries - It can contain up to 13 characters in upper or
lower case - Unicode allows for representation of any
character in any language
29Long Filenames (LFN)
- Unicode is a 16-bit code
- ASCII (American Standard Code for Information
Interchange) uses an entire byte to represent
each character - Limits number of characters represented to 255
30Long Filename Storage Scheme
31FAT32
- Gets around the problem of cluster size
- Allows the partitions to be up to 8 GB
- Blocks can be allocated with up to 8 KB
- The maximum partition size will be raised to 32
GB - Dont use FAT32 if you plan to access your hard
disk from other operating systems
32Windows 95/98 File System Utilities
- Windows 95/ 98 includes the capability to create
compressed disk volumes - Windows 95 also has a defragmentation utility
that will run from system scheduler - No other programs should be running while using
the defragmentation utility
33DEFRAG Utility
34Windows NT File Systems
- Windows NT supports two types of file systems
- The extended FAT16 system
- The New Technology File System (NTFS)
- Both systems are Portable Operating System
Interface (POSIX) compliant
35New Technology File System (NTFS) Features
- Built-in security
- Ability to use larger disks and larger files
- Ability to compress file and directory contents
on the fly - Better recoverability and stability
- Less disk fragmentation
36NTFS Numerical Equivalents
37NTFS Default Cluster Sizes
38Tracking Files and Clusters
- NTFS tracks files and clusters using a Master
File Table (MFT) - The MFT is located at the beginning of the
partition - The Boot sector is located ahead of the MFT
- Normally the MFT takes up 1 MB
39NT Disk Administrator
- NT Disk Administrator allows you to partition and
format disks - Allows you to change disk and partition
attributes - Performs disk maintenance
- Allows setup RAID (Redundant Arrays of
Independent Disk)
40NT After the Partition
- File systems can be created in two ways
- use format utility
- use the disk administrator utility (better
choice) - NTFS features
- partitions smaller than about 512 MB take up more
overhead than FAT - slightly more CPU intensive
41UNIX Information Nodes (Inodes) Design
42UNIX File System
- The UNIX File System (UFS) uses information
nodes, or inodes - Inode 0 contains the root of the file system
- The file system is identified by the superblock
which contains information about the layout of
blocks, sectors, and cylinder groups on the file
system - The inode does not contain a filename
- Directory entries can point to the same inode
- A hard link makes it possible for file names to
appear in several directories under several names
43UNIX Directory Showing Multiple Entries Pointing
to the Same Inode
44UNIX File System Path Entries
45Mounting
- A Path starts out with /, which indicates root
directory - The mount command maps the root inode of another
file system onto the empty directory - Mount command has several options
- shows no parameter results in a printout of the
disks that are currently mounted - shows the name of the partition and the path on
which it was mounted
46UNIX Drive Mount Path
47UNIX Special Features
- Case-sensitivity (must type file names exactly as
they appear) - There are two types of devices
- A raw device has no logical division in blocks
- A block device does have logical division
- Partitions of all disks will appear as devices
which are kept in the /dev or /devices directory - Symbolic link is merely a pointer to a file it
can point to a file that doesnt exist
48UNIX Features
- Write command saves the label to the disk
- Print partition table command in fdisk or format
- File System Checker (fsck) operates when you
start up UNIX to verify the integrity of the
superblock, the inodes, all cluster groups, and
all directory entries - UFS file system can be up to 4 GB in size
49The Macintosh File System
- Macintosh Filing System (MFS) keeps track of 128
documents, applications, or folders - Hierarchical Filing System (HFS) like FAT16, HFS
divides a volume into units called allocation
blocks
50Macintosh Operating System 8.1
- Referred to as HFS, like Windows NT (NTFS) in
that it increases the number of allocation blocks
per volume - The first 2 sectors of the formatted disk are
boot blocks in the volume information block - The catalog b-tree is a list of all files in the
volume, - Catalog b-tree tracks the filename, logical
location, folder structure and physical location
51More About Macintosh 8.1
- It supports medium filenames (up to 31
characters) - Rather than extensions, it uses type codes and
creator codes - Files contain two parts
- data fork contains frequently changed information
- resource fork contains fixed information
52Mac Simple Text Resources, as Seen Through ResEdit
53Macintosh First Aid
- Mac OS ships with two basic disk utilities
- Disk First Aid - which repairs minor hard drive
problems - Drive setup - which formats and partitions IDE
and SCSI hard drives - Sherlock Program searches disks for filenames and
text within files
54Mac OS 8.5s Sherlock Search Utility
55Chapter Summary
- Chapter Three
- Gives an overview of the basic functions of all
file systems - Compares the Windows 95/98 file system with the
older DOS/Windows 3.1 file systems - Describes the fundamental features of the UNIX
file system - Describes the basics of the Macintosh file system