Presentation is loading. Please wait.

Presentation is loading. Please wait.

Guide to Operating Systems, 5th Edition

Similar presentations


Presentation on theme: "Guide to Operating Systems, 5th Edition"— Presentation transcript:

1 Guide to Operating Systems, 5th Edition
Chapter 4 File Systems Guide to Operating Systems, 5th Edition Chapter 4 File Systems

2 Objectives After completing this chapter, you will be able to:
List the basic functions common to all file systems Use and describe the file systems used by Windows OSs Use and describe the file systems used by UNIX and Linux systems, including ufs and ext Use and describe the Mac OS X Extended (HFS+) file system Objectives After completing this chapter, you will be able to: List the basic functions common to all file systems Use and describe the file systems used by Windows OSs Use and describe the file systems used by UNIX and Linux systems, including ufs and ext Use and describe the Mac OS X Extended (HFS+) file system Guide to Operating Systems, 5th Edition

3 Understanding File Systems Functions
All information stored on a computer’s hard disk is managed, stored, and retrieved through a file system The file system allocates locations on a disk for storage and it keeps a record of where specific information is kept Some file systems also implement recovery procedures when a disk area is damaged or when the OS goes down Understanding File Systems Functions All information stored on a computer’s hard disk is managed, stored, and retrieved through a file system The file system allocates locations on a disk for storage and it keeps a record of where specific information is kept Some file systems also implement recovery procedures when a disk area is damaged or when the OS goes down Guide to Operating Systems, 5th Edition

4 Understanding File Systems Functions
File systems used by operating systems perform the following general tasks: Provide a convenient interface for users and applications to open and save files Provide a hierarchical structure to organize files Store file metadata to provide detailed information about files Organize space on a storage device Understanding File Systems Functions File systems used by operating systems perform the following general tasks: Provide a convenient interface for users and applications to open and save files Provide a hierarchical structure to organize files Store file metadata to provide detailed information about files Organize space on a storage device Guide to Operating Systems, 5th Edition

5 User Interface When a user double-clicks a file to open it
The user interface calls the file system with a request to open the file The file type determines exactly how the file is opened If the file is an application, the application is loaded into memory and run by the CPU If the file is a document, the application associated with the document type is loaded into memory and opens the file User Interface When a user double-clicks a file to open it The user interface calls the file system with a request to open the file The file type determines exactly how the file is opened If the file is an application, the application is loaded into memory and run by the CPU If the file is a document, the application associated with the document type is loaded into memory and opens the file Guide to Operating Systems, 5th Edition

6 Hierarchical Structure
The overall purpose of a file system is to create a structure for filing data A file is a set of data that is grouped in some logical manner, assigned a name, and stored on the disk Data contained in files can be text, images, music and sounds, video, or Web pages OSs typically group file data in some logical way, creates a record of this structure, and builds a folder or directory to track the type of data stored in each file Hierarchical Structure The overall purpose of a file system is to create a structure for filing data A file is a set of data that is grouped in some logical manner, assigned a name, and stored on the disk Data contained in files can be text, images, music and sounds, video, or Web pages OSs typically group file data in some logical way, creates a record of this structure, and builds a folder or directory to track the type of data stored in each file Guide to Operating Systems, 5th Edition

7 Hierarchical Structure
Folder or directory – organizational structure that contains files and may additionally contain subdirectories (or subfolders) Folders can be organized in a hierarchy that is similar to a tree structure Some users keep most of their files in the computer’s primary level or root directory (root folder) Some programs use an automated setup that suggests folders for new programs Example – creating new subfolders under the Program Files folder Hierarchical Structure Folder or directory – organizational structure that contains files and may additionally contain subdirectories (or subfolders) Folders can be organized in a hierarchy that is similar to a tree structure Some users keep most of their files in the computer’s primary level or root directory (root folder) Some programs use an automated setup that suggests folders for new programs Example – creating new subfolders under the Program Files folder Guide to Operating Systems, 5th Edition

8 Hierarchical Structure
A chaotic file structure: Makes it difficult to run or remove programs Makes it difficult to determine the most current versions Makes users spend unproductive time looking for specific files To avoid chaos, design the file and folder structure from the start (especially on servers) Hierarchical Structure A chaotic file structure: Makes it difficult to run or remove programs Makes it difficult to determine the most current versions Makes users spend unproductive time looking for specific files To avoid chaos, design the file and folder structure from the start (especially on servers) Guide to Operating Systems, 5th Edition

9 Hierarchical Structure
Default structure might consist of folders for the following: OS files Software applications Work files, such as word-processing, graphics, spreadsheets, and database files Public files that you share over the network Utilities files Temporary files Hierarchical Structure Default structure might consist of folders for the following: OS files Software applications Work files, such as word-processing, graphics, spreadsheets, and database files Public files that you share over the network Utilities files Temporary files Guide to Operating Systems, 5th Edition

10 Hierarchical Structure
Figure 4-2 Sample folder structure for a Windows-based system Guide to Operating Systems, 5th Edition

11 Hierarchical Structure
Figure 4-3 Fedora root folders in the GNOME Files tool Guide to Operating Systems, 5th Edition

12 Hierarchical Structure
In Mac OS X, the default folder structure includes: Applications for Mac OS X software applications System for Mac OS X system files Library for library files Users for user accounts Documents for documents Hierarchical Structure In Mac OS X, the default folder structure includes: Applications for Mac OS X software applications System for Mac OS X system files Library for library files Users for user accounts Documents for documents Guide to Operating Systems, 5th Edition

13 File Metadata Metadata is information that describes data but is not the actual data itself Information found in metadata: Date and time the folder or file was created Date and time the folder or file was last modified Date and time the folder or file was last accessed Folder or file size Folder or file attributes, such as security information, or if the folder or file was backed up If the information in a folder or file is compressed or encrypted File Metadata Metadata is information that describes data but is not the actual data itself Information found in metadata: Date and time the folder or file was created Date and time the folder or file was last modified Date and time the folder or file was last accessed Folder or file size Folder or file attributes, such as security information, or if the folder or file was backed up If the information in a folder or file is compressed or encrypted Guide to Operating Systems, 5th Edition

14 File Metadata Figure 4-4 Windows file metadata
Guide to Operating Systems, 5th Edition

15 Storage Device Space Organization
Hard disks arrive from manufacturer with low-level formatting A low-level format is a software process that marks the location of disk tracks and sectors Tracks are like several circles around a disk and each track is divided into sections of equal size called sectors Storage Device Space Organization Hard disks arrive from manufacturer with low-level formatting A low-level format is a software process that marks the location of disk tracks and sectors Tracks are like several circles around a disk and each track is divided into sections of equal size called sectors Guide to Operating Systems, 5th Edition

16 Storage Device Space Organization
Figure 4-5 Disk tracks and sectors on a platter Guide to Operating Systems, 5th Edition

17 Storage Device Space Organization
Block allocation – divides the disk into logical blocks called clusters, which correlate to sectors, heads, and tracks on the disk Called allocation units in Windows systems Data regarding block allocation is stored using one of two techniques: File allocation table (FAT) New Technology File System (NTFS) and UNIX/Linux file systems – uses various locations on the disk to store a special type of file that is used for directory and file allocation information Storage Device Space Organization Block allocation – divides the disk into logical blocks called clusters, which correlate to sectors, heads, and tracks on the disk Called allocation units in Windows systems Data regarding block allocation is stored using one of two techniques: File allocation table (FAT) New Technology File System (NTFS) and UNIX/Linux file systems – uses various locations on the disk to store a special type of file that is used for directory and file allocation information Guide to Operating Systems, 5th Edition

18 Storage Device Space Organization
Partitioning – process of blocking a group of tracks and sectors to be used by a particular file system, such as FAT or NTFS After partitioning, the disk must be high-level formatted in order for the OS to store files It might be necessary for a disk to have more than one file system Will require a partition for each file system Example: To allow the installation of Red Hat Enterprise Linux and Windows 10 on the same computer Storage Device Space Organization Partitioning – process of blocking a group of tracks and sectors to be used by a particular file system, such as FAT or NTFS After partitioning, the disk must be high-level formatted in order for the OS to store files It might be necessary for a disk to have more than one file system Will require a partition for each file system Example: To allow the installation of Red Hat Enterprise Linux and Windows 10 on the same computer Guide to Operating Systems, 5th Edition

19 Storage Device Space Organization
Logical drives – creating multiple logical volumes on a single disk and assigning drive letters to each volume When a partition is created, information about that partition is stored in a special area of the disk known as the partition table (in MS-DOS, Mac OS, and Windows) and disk label (in UNIX/Linux) Another piece of disk that is reserved is known as the boot block in UNIX/Linux and Mac OS X, or the Master Boot Record (MBR) in MS-DOS and Windows Storage Device Space Organization Logical drives – creating multiple logical volumes on a single disk and assigning drive letters to each volume When a partition is created, information about that partition is stored in a special area of the disk known as the partition table (in MS-DOS, Mac OS, and Windows) and disk label (in UNIX/Linux) Another piece of disk that is reserved is known as the boot block in UNIX/Linux and Mac OS X, or the Master Boot Record (MBR) in MS-DOS and Windows Guide to Operating Systems, 5th Edition

20 Storage Device Space Organization
Figure 4-6 Multiple partitions used in one Windows 10 system Guide to Operating Systems, 5th Edition

21 Storage Device Space Organization
In Windows, the MBR consists of four elements: The boot program The disk signature The partition table The end-of-MBR marker Not all operating systems support partitions in the same way Each operating system uses specific utilities to create partitions Storage Device Space Organization In Windows, the MBR consists of four elements: The boot program The disk signature The partition table The end-of-MBR marker Not all operating systems support partitions in the same way Each operating system uses specific utilities to create partitions Guide to Operating Systems, 5th Edition

22 Storage Device Space Organization
Windows supports two types of drive partitioning: Basic Dynamic Basic disks support up to four partitions per hard drive Four primary partitions or three primary and one extended partition Extended partition may be further divided into logical drives Storage Device Space Organization Windows supports two types of drive partitioning: Basic Dynamic Basic disks support up to four partitions per hard drive Four primary partitions or three primary and one extended partition Extended partition may be further divided into logical drives Guide to Operating Systems, 5th Edition

23 Storage Device Space Organization
Figure 4-7 A disk with primary and extended partitions Guide to Operating Systems, 5th Edition

24 Storage Device Space Organization
Since Windows XP, you can access a volume as a folder on another NTFS volume When using Windows Disk Management utility to format a disk You have the option to mount the disk instead of assigning a drive letter The empty folder into which a volume is mounted is called a volume mount point Storage Device Space Organization Since Windows XP, you can access a volume as a folder on another NTFS volume When using Windows Disk Management utility to format a disk You have the option to mount the disk instead of assigning a drive letter The empty folder into which a volume is mounted is called a volume mount point Guide to Operating Systems, 5th Edition

25 Storage Device Space Organization
Figure 4-8 Using a volume mount point in Windows Guide to Operating Systems, 5th Edition

26 Storage Device Space Organization
Formatting – the process of placing the file system on the partition Necessary in order to install an operating system After the OS is installed, a disk management tool can be used to partition and format additional free space Can also use the format command from the Command Prompt window The format command includes several switches (extra codes) To view a list of these switches, type format /? Storage Device Space Organization Formatting – the process of placing the file system on the partition Necessary in order to install an operating system After the OS is installed, a disk management tool can be used to partition and format additional free space Can also use the format command from the Command Prompt window The format command includes several switches (extra codes) To view a list of these switches, type format /? Guide to Operating Systems, 5th Edition

27 Storage Device Space Organization
Table 4-1 Format command switches Guide to Operating Systems, 5th Edition

28 Storage Device Space Organization
Table 4-1 Format command switches (continued) Guide to Operating Systems, 5th Edition

29 Storage Device Space Organization
When a file is stored to disk: Data is written to clusters on the disk Filename is stored in the folder, along with the number of the first cluster the data is stored in When the OS fills the first cluster, data is written to the next free cluster and the FAT entry corresponding with the first cluster points to the number of the second cluster used When the second cluster is full, the OS continues with the next free cluster and the FAT entry for the second cluster points to the number of the third cluster used, and so on… When a file is completely written to the disk, the FAT entry for the final cluster is filled with all 1s (means end of file) This is commonly referred to as the linked-list method Storage Device Space Organization When a file is stored to disk: Data is written to clusters on the disk Filename is stored in the folder, along with the number of the first cluster the data is stored in When the OS fills the first cluster, data is written to the next free cluster and the FAT entry corresponding with the first cluster points to the number of the second cluster used When the second cluster is full, the OS continues with the next free cluster and the FAT entry for the second cluster points to the number of the third cluster used, and so on… When a file is completely written to the disk, the FAT entry for the final cluster is filled with all 1s (means end of file) This is commonly referred to as the linked-list method Guide to Operating Systems, 5th Edition

30 Storage Device Space Organization
Clusters are a fixed length When a files does not use all of the space in a cluster, the rest of the cluster is unusable Unusable spots are marked in the FAT as bad clusters (never used for file storage) Each partition stores and extra copy of the FAT table in case the first copy gets damaged There is only one copy of the root directory on each partition The FAT tables and root directory are at the beginning of each partition Storage Device Space Organization Clusters are a fixed length When a files does not use all of the space in a cluster, the rest of the cluster is unusable Unusable spots are marked in the FAT as bad clusters (never used for file storage) Each partition stores and extra copy of the FAT table in case the first copy gets damaged There is only one copy of the root directory on each partition The FAT tables and root directory are at the beginning of each partition Guide to Operating Systems, 5th Edition

31 Storage Device Space Organization
Figure 4-9 Typical FAT directory structure Guide to Operating Systems, 5th Edition

32 Storage Device Space Organization
Each FAT directory entry contains filename, file revision date and time, file size, and file attributes Each folder entry contains status bits Identify the type of filename contained in each entry Status bits in use are: Volume, Folder, System, Hidden, Read-only, and Archive Storage Device Space Organization Each FAT directory entry contains filename, file revision date and time, file size, and file attributes Each folder entry contains status bits Identify the type of filename contained in each entry Status bits in use are: Volume, Folder, System, Hidden, Read-only, and Archive Guide to Operating Systems, 5th Edition

33 Storage Device Space Organization
Table 4-2 Attribute command (attrib) arguments and switches Guide to Operating Systems, 5th Edition

34 Windows File Systems Windows XP through Windows Server 2008 R2 support three files systems: Extended FAT16 FAT32 NTFS Windows 8, Windows Server 2012, and later versions also support ReFS These OSs also support file systems for DVD/CD-ROM drives and USB devices (flash drives) Windows File Systems Windows XP through Windows Server 2008 R2 support three files systems: Extended FAT16 FAT32 NTFS Windows 8, Windows Server 2012, and later versions also support ReFS These OSs also support file systems for DVD/CD-ROM drives and USB devices (flash drives) Guide to Operating Systems, 5th Edition

35 FAT16 and Extended FAT16 Extended FAT16 evolved from FAT16 used in earlier versions of MS-DOS and Windows (3.x/95/98/Me) In extended FAT16: Maximum size of a volume is 4GB Maximum size of a file is 2GB Can be read by non-Windows OSs like UNIX/Linux Considered a stable file system Long filenames (LFNs) can be used Can contain up to 255 characters Not case sensitive FAT16 and Extended FAT16 Extended FAT16 evolved from FAT16 used in earlier versions of MS-DOS and Windows (3.x/95/98/Me) In extended FAT16: Maximum size of a volume is 4GB Maximum size of a file is 2GB Can be read by non-Windows OSs like UNIX/Linux Considered a stable file system Long filenames (LFNs) can be used Can contain up to 255 characters Not case sensitive Guide to Operating Systems, 5th Edition

36 FAT32 Support for FAT32 started with Windows 95 Release 2
Designed to accommodate larger capacity disks FAT32: Root folder does not have to be at the beginning of a volume Can use disk space more efficiently than FAT16 It uses smaller cluster sizes Largest volume that can be formatted is 32 GB Maximum file size is 4 GB Offers fast response on small, 1 or 2 GB partitions FAT32 Support for FAT32 started with Windows 95 Release 2 Designed to accommodate larger capacity disks FAT32: Root folder does not have to be at the beginning of a volume Can use disk space more efficiently than FAT16 It uses smaller cluster sizes Largest volume that can be formatted is 32 GB Maximum file size is 4 GB Offers fast response on small, 1 or 2 GB partitions Guide to Operating Systems, 5th Edition

37 FAT64 FAT64 is also known as exFAT
Proprietary file system introduced by Microsoft for mobile personal storage Good choice for USB flash devices that may store large files (such as pictures, videos, etc…) Maximum size of a file is 16 EB Available starting in Service Pack 1 for Windows Vista Support is available for Linux from a third party FAT64 FAT64 is also known as exFAT Proprietary file system introduced by Microsoft for mobile personal storage Good choice for USB flash devices that may store large files (such as pictures, videos, etc…) Maximum size of a file is 16 EB Available starting in Service Pack 1 for Windows Vista Support is available for Linux from a third party Guide to Operating Systems, 5th Edition

38 NTFS NTFS – primary Windows file system for all Windows OSs starting with Windows NT 3.1 Uses a Master File Table (MFT) instead of FAT tables The MFT and related files take up about 1 MB of disk space When a file is created, a record for that file is added to the MFT Contains additional attributes such as security settings, ownership, and permissions NTFS NTFS – primary Windows file system for all Windows OSs starting with Windows NT 3.1 Uses a Master File Table (MFT) instead of FAT tables The MFT and related files take up about 1 MB of disk space When a file is created, a record for that file is added to the MFT Contains additional attributes such as security settings, ownership, and permissions Guide to Operating Systems, 5th Edition

39 NTFS The MFT record reflects the sequence of clusters that a file uses
It is possible to have multiple filenames that refer to the same file A technique known as hard linking This feature is also available in UNIX/Linux file systems NTFS The MFT record reflects the sequence of clusters that a file uses It is possible to have multiple filenames that refer to the same file A technique known as hard linking This feature is also available in UNIX/Linux file systems Guide to Operating Systems, 5th Edition

40 NTFS Table 4-3 NTFS versions Guide to Operating Systems, 5th Edition

41 NTFS Basic features of NTFS: Long filenames Built-in security features
Better file compression than FAT Ability to use larger disks and files than FAT File activity tracking for better recovery and stability than FAT Portable Operating System Interface for Unix (POSIX) support Volume striping and volume extensions Less disk fragmentation than FAT NTFS Basic features of NTFS: Long filenames Built-in security features Better file compression than FAT Ability to use larger disks and files than FAT File activity tracking for better recovery and stability than FAT Portable Operating System Interface for Unix (POSIX) support Volume striping and volume extensions Less disk fragmentation than FAT Guide to Operating Systems, 5th Edition

42 NTFS NTFS is equipped with security features that meet the US government’s C2 security specifications Refers to high-level, “top-secret” standards for data protection, system auditing, and system access Some files can be compressed by more than 40%, saving disk storage for other storage needs NTFS has the ability to keep a log or journal of file system activity (called journaling) Makes it possible for files to be restored in the event of a power failure NTFS NTFS is equipped with security features that meet the US government’s C2 security specifications Refers to high-level, “top-secret” standards for data protection, system auditing, and system access Some files can be compressed by more than 40%, saving disk storage for other storage needs NTFS has the ability to keep a log or journal of file system activity (called journaling) Makes it possible for files to be restored in the event of a power failure Guide to Operating Systems, 5th Edition

43 NTFS NTFS supports volume striping NTFS has hot fix capabilities
Process that equally divides the contents of each file across two or more volumes to extend disk life, enable fault tolerance, and balance disk load for better performance NTFS has hot fix capabilities If a bad disk area is detected, automatically copies the information to another disk area that is not damaged NTFS NTFS supports volume striping Process that equally divides the contents of each file across two or more volumes to extend disk life, enable fault tolerance, and balance disk load for better performance NTFS has hot fix capabilities If a bad disk area is detected, automatically copies the information to another disk area that is not damaged Guide to Operating Systems, 5th Edition

44 NTFS In addition to NTFS 4 features, NTFS 5 adds several new features:
Ability to encrypt files No system reboot required after creating an extended volume Ability to reduce drive designations Indexing for fast access Ability to retain shortcuts and other file information when files and folders are placed on other volumes Ability to establish disk quotas NTFS In addition to NTFS 4 features, NTFS 5 adds several new features: Ability to encrypt files No system reboot required after creating an extended volume Ability to reduce drive designations Indexing for fast access Ability to retain shortcuts and other file information when files and folders are placed on other volumes Ability to establish disk quotas Guide to Operating Systems, 5th Edition

45 NTFS NTFS 6 (latest version) adds several new features:
Transactional NTFS – used to perform operations in transactions (all at once or not all) Partition resizing – allows administrator to expand or shrink partitions Self-healing – the chkdsk utility runs in the background to correct hard disk problems (instead of having to take the volume down to run it) NTFS NTFS 6 (latest version) adds several new features: Transactional NTFS – used to perform operations in transactions (all at once or not all) Partition resizing – allows administrator to expand or shrink partitions Self-healing – the chkdsk utility runs in the background to correct hard disk problems (instead of having to take the volume down to run it) Guide to Operating Systems, 5th Edition

46 NTFS Table 4-4 FAT16, FAT32, FAT64, and NTFS compared
Guide to Operating Systems, 5th Edition

47 NTFS Basic disks use traditional disk partitioning techniques
Limited to four primary partitions or three primary partitions and one extended partition Dynamic disks do not use traditional partitioning techniques Make it possible to set up a large number of volumes Can convert basic disk to dynamic disks using the Disk Management tool NTFS Basic disks use traditional disk partitioning techniques Limited to four primary partitions or three primary partitions and one extended partition Dynamic disks do not use traditional partitioning techniques Make it possible to set up a large number of volumes Can convert basic disk to dynamic disks using the Disk Management tool Guide to Operating Systems, 5th Edition

48 NTFS The chkdsk utility can detect and fix an extensive set of file system problems in FAT and NTFS system This utility is available in all versions of Windows starting with Windows 2000 Windows 2000 and later versions have a built-in disk defragmenting tool A defragmenter is a tool that rearranges data on the disk in a continuous fashion, ridding the disk of scattered open clusters NTFS The chkdsk utility can detect and fix an extensive set of file system problems in FAT and NTFS system This utility is available in all versions of Windows starting with Windows 2000 Windows 2000 and later versions have a built-in disk defragmenting tool A defragmenter is a tool that rearranges data on the disk in a continuous fashion, ridding the disk of scattered open clusters Guide to Operating Systems, 5th Edition

49 NTFS Table 4-5 Chkdsk switch options
Guide to Operating Systems, 5th Edition

50 NTFS Figure 4-11 Disk Defragmenter in Windows 10
Guide to Operating Systems, 5th Edition

51 Resilient File System (ReFS)
ReFS became available staring with Windows Server 2012 Main use is in large file-sharing applications where volumes are managed by Storage Spaces Mostly backward-compatible with NTFS Doesn’t support file compressions, disk quotas, and EFS (Encrypting File System) Windows can’t be booted from an ReFS volume Can correct some types of data corruption automatically Resilient File System (ReFS) ReFS became available staring with Windows Server 2012 Main use is in large file-sharing applications where volumes are managed by Storage Spaces Mostly backward-compatible with NTFS Doesn’t support file compressions, disk quotas, and EFS (Encrypting File System) Windows can’t be booted from an ReFS volume Can correct some types of data corruption automatically Guide to Operating Systems, 5th Edition

52 CDFS and UDF Windows versions after Windows 2000 recognize some additional file systems used by peripheral storage technologies CD-ROM File System (CDFS) – supported so that OSs can read and write files to DVD/CD-ROM drives Universal Disk Format (UDF) – also used on DVD/CD-ROMs, which are used for large file storage to accommodate movies and games CDFS and UDF Windows versions after Windows 2000 recognize some additional file systems used by peripheral storage technologies CD-ROM File System (CDFS) – supported so that OSs can read and write files to DVD/CD-ROM drives Universal Disk Format (UDF) – also used on DVD/CD-ROMs, which are used for large file storage to accommodate movies and games Guide to Operating Systems, 5th Edition

53 The UNIX/Linux File System
There are many different file systems that can be used with UNIX Some file systems are more “native” to specific UNIX operating systems than others Most versions of UNIX and Linux support the UNIX file system (ufs), which is the original native UNIX file system Ufs is a hierarchical file system that is expandable, supports large storage, provides excellent security, and is reliable The UNIX/Linux File System There are many different file systems that can be used with UNIX Some file systems are more “native” to specific UNIX operating systems than others Most versions of UNIX and Linux support the UNIX file system (ufs), which is the original native UNIX file system Ufs is a hierarchical file system that is expandable, supports large storage, provides excellent security, and is reliable Guide to Operating Systems, 5th Edition

54 The UNIX/Linux File System
In Linux, the native file system is called the extended file system (ext or ext fs) Ext is modeled after ufs and enables the use of the full range of built-in Linux commands, file manipulation, and security The first ext version had bugs ext2 – reliable file system that handles large disk storage ext3 – added journaling capabilities ext4 – supports file sizes up to 16 TB The UNIX/Linux File System In Linux, the native file system is called the extended file system (ext or ext fs) Ext is modeled after ufs and enables the use of the full range of built-in Linux commands, file manipulation, and security The first ext version had bugs ext2 – reliable file system that handles large disk storage ext3 – added journaling capabilities ext4 – supports file sizes up to 16 TB Guide to Operating Systems, 5th Edition

55 The UNIX/Linux File System
Table 4-6 Typical file system supported by UNIX/Linux Guide to Operating Systems, 5th Edition

56 The UNIX/Linux File System
Both ufs and ext use the same structure Built on the concept of information nodes (or inodes) Each file has an inode and is identified by an inode number An inode contains general information about that file such as: User and group ownership, permissions, size and type of file, date the file was created, and the date the file was last modified and read The UNIX/Linux File System Both ufs and ext use the same structure Built on the concept of information nodes (or inodes) Each file has an inode and is identified by an inode number An inode contains general information about that file such as: User and group ownership, permissions, size and type of file, date the file was created, and the date the file was last modified and read Guide to Operating Systems, 5th Edition

57 The UNIX/Linux File System
Both ufs and ext use the same structure Each disk is divided into logical blocks The superblock contains information about the layout of blocks, sectors, and cylinder groups on the file system The inode does not contain a filename; the filename is stored in a folder Several folder entries can point to the same inode Called a hard link The UNIX/Linux File System Both ufs and ext use the same structure Each disk is divided into logical blocks The superblock contains information about the layout of blocks, sectors, and cylinder groups on the file system The inode does not contain a filename; the filename is stored in a folder Several folder entries can point to the same inode Called a hard link Guide to Operating Systems, 5th Edition

58 The UNIX/Linux File System
A UNIX/Linux system can have many file systems Mounts file systems as a sub file system of the root file system All file systems are referred to by a path The path starts out with / (/ indicates the main root directory of the file system) The mount command has several options Typing it without parameters results in a display of the disks currently mounted The UNIX/Linux File System A UNIX/Linux system can have many file systems Mounts file systems as a sub file system of the root file system All file systems are referred to by a path The path starts out with / (/ indicates the main root directory of the file system) The mount command has several options Typing it without parameters results in a display of the disks currently mounted Guide to Operating Systems, 5th Edition

59 The UNIX/Linux File System
Figure UNIX/Linux file system paths Guide to Operating Systems, 5th Edition

60 The UNIX/Linux File System
Disks are referenced by a special inode called a device There are two types of devices: Raw device – has no logical division in blocks Block device – does have logical division in blocks Devices are normally kept in the /dev or /devices directory Symbolic link – used to link a directory entry to a file that is on a different partition A pointer to a file The UNIX/Linux File System Disks are referenced by a special inode called a device There are two types of devices: Raw device – has no logical division in blocks Block device – does have logical division in blocks Devices are normally kept in the /dev or /devices directory Symbolic link – used to link a directory entry to a file that is on a different partition A pointer to a file Guide to Operating Systems, 5th Edition

61 The UNIX/Linux File System
You must first partition a disk to use the UNIX/Linux file system The command to partition the disk differs slightly Most UNIX systems use either fdisk or format Typing man fdisk or man format at the command prompt gives you an overview of available commands The UNIX/Linux File System You must first partition a disk to use the UNIX/Linux file system The command to partition the disk differs slightly Most UNIX systems use either fdisk or format Typing man fdisk or man format at the command prompt gives you an overview of available commands Guide to Operating Systems, 5th Edition

62 The UNIX/Linux File System
Figure The man page for the fdisk command Guide to Operating Systems, 5th Edition

63 The UNIX/Linux File System
Once a partition is made, a file system can be created You must know the device name of the partition on which you wish to create a file system Type newfs, followed by the name of the device The newfs command is not available in all versions of Linux Use the mkfs command instead The UNIX/Linux File System Once a partition is made, a file system can be created You must know the device name of the partition on which you wish to create a file system Type newfs, followed by the name of the device The newfs command is not available in all versions of Linux Use the mkfs command instead Guide to Operating Systems, 5th Edition

64 The UNIX/Linux File System
When a file is saved to disk, the system stores part of the data to memory Until it has time to write to disk If computer is shut down prior to data being written to disk, you can end up with a damaged file system Manually force a write of all data in memory by using the sync command Fsck – a utility that verifies the integrity of the superblock, the inodes, all cluster groups, and all directory entries The UNIX/Linux File System When a file is saved to disk, the system stores part of the data to memory Until it has time to write to disk If computer is shut down prior to data being written to disk, you can end up with a damaged file system Manually force a write of all data in memory by using the sync command Fsck – a utility that verifies the integrity of the superblock, the inodes, all cluster groups, and all directory entries Guide to Operating Systems, 5th Edition

65 The UNIX/Linux File System
Table 4-7 UNIX/Linux file system commands Guide to Operating Systems, 5th Edition

66 The Macintosh File System
Macintosh Filing System (MFS) of 1984 was limited Kept track of 128 documents, applications or folders Reasonable limit when the only storage device was a 400 KB floppy disk drive In 1986, Apple created Hierarchical Filing System (HFS) Divided a volume (disk partition) into allocation blocks – similar to clusters on PCs In 1998, Apple released Mac OS 8.1 with a new file system called Hierarchical Filing System Extended Format (HFS+) The Macintosh File System Macintosh Filing System (MFS) of 1984 was limited Kept track of 128 documents, applications or folders Reasonable limit when the only storage device was a 400 KB floppy disk drive In 1986, Apple created Hierarchical Filing System (HFS) Divided a volume (disk partition) into allocation blocks – similar to clusters on PCs In 1998, Apple released Mac OS 8.1 with a new file system called Hierarchical Filing System Extended Format (HFS+) Guide to Operating Systems, 5th Edition

67 The Macintosh File System
In Mac OS X version 3.0, Mac OS Extended (HFS+) includes new features: A case-sensitive format to make the file system more compatible with other UNIX/Linux systems Journaling Ability to store up to 16 TB of data The first two sectors of a Mac-formatted disk are: Boot sectors, or boot blocks Followed by volume information block – contains catalog b-tree A list of all files on the The Macintosh File System In Mac OS X version 3.0, Mac OS Extended (HFS+) includes new features: A case-sensitive format to make the file system more compatible with other UNIX/Linux systems Journaling Ability to store up to 16 TB of data The first two sectors of a Mac-formatted disk are: Boot sectors, or boot blocks Followed by volume information block – contains catalog b-tree A list of all files on the Guide to Operating Systems, 5th Edition

68 The Macintosh File System
Macintoshes can read/write to disks from other OSs Mac OS has always supported medium filenames (up to 31 characters) Any character may be used in a filename except the colon (:) Macintosh paths are written as colon-separated entities such as: Hard Drive:System Folder:Preferences:Finder Prefs Mac uses type codes and creator codes instead of filename extensions as in Windows The Macintosh File System Macintoshes can read/write to disks from other OSs Mac OS has always supported medium filenames (up to 31 characters) Any character may be used in a filename except the colon (:) Macintosh paths are written as colon-separated entities such as: Hard Drive:System Folder:Preferences:Finder Prefs Mac uses type codes and creator codes instead of filename extensions as in Windows Guide to Operating Systems, 5th Edition

69 The Macintosh File System
Macintosh files can contain two parts, or forks: Data fork – contains frequently changing information (such as word processing data) Resource fork – contains information that is fixed (such as a program’s icons, menu resources, and splash screens) Apple’s equivalent to a Windows shortcut is the alias The system-level Alias Manager keeps track of the original The word “alias” is tacked onto the filename when the alias is created and the filename is italicized The Macintosh File System Macintosh files can contain two parts, or forks: Data fork – contains frequently changing information (such as word processing data) Resource fork – contains information that is fixed (such as a program’s icons, menu resources, and splash screens) Apple’s equivalent to a Windows shortcut is the alias The system-level Alias Manager keeps track of the original The word “alias” is tacked onto the filename when the alias is created and the filename is italicized Guide to Operating Systems, 5th Edition

70 The Macintosh File System
Mac OS X comes with two disk utilities: Disk Utility – manages disk drives Disk First Aid – repairs disk problems Older versions of Mac OS X came with a utility (Sherlock) that searches disks for filenames and text within files Spotlight replaced Sherlock in Mac OS X 10.4 Tiger Spotlight indexes by filenames and by metadata associated with documents Does not work on files in the UNIX system/kernel The Macintosh File System Mac OS X comes with two disk utilities: Disk Utility – manages disk drives Disk First Aid – repairs disk problems Older versions of Mac OS X came with a utility (Sherlock) that searches disks for filenames and text within files Spotlight replaced Sherlock in Mac OS X 10.4 Tiger Spotlight indexes by filenames and by metadata associated with documents Does not work on files in the UNIX system/kernel Guide to Operating Systems, 5th Edition

71 The Macintosh File System
Figure A Spotlight search in Mac OS X Guide to Operating Systems, 5th Edition

72 The Macintosh File System
When a Mac is not shut down properly a disk integrity check will automatically run at the next startup Macs will boot from a DVD/CD-ROM or various SCSI devices To boot from a DVD/CD-ROM, press the “C” key while booting up Pressing the Shift-Option-Delete-Apple (SODA) keys while booting will bypass the internal hard drive and boot from the next drive in a SCSI chain The Macintosh File System When a Mac is not shut down properly a disk integrity check will automatically run at the next startup Macs will boot from a DVD/CD-ROM or various SCSI devices To boot from a DVD/CD-ROM, press the “C” key while booting up Pressing the Shift-Option-Delete-Apple (SODA) keys while booting will bypass the internal hard drive and boot from the next drive in a SCSI chain Guide to Operating Systems, 5th Edition

73 Summary One of the basic functions of an OS is to enable you to store and access information on a computer or other digital device Tasks performed by a file system include providing a convenient interface, providing a hierarchical structure, storing file metadata, organizing space on a storage device, and providing utilities to maintain and manage the file system Summary One of the basic functions of an OS is to enable you to store and access information on a computer or other digital device Some of the tasks performed by a file system include providing a convenient interface, providing a hierarchical structure, storing file metadata, organizing space on a storage device, and providing utilities to maintain and manage the file system Guide to Operating Systems, 5th Edition

74 Summary The file system should offer the ability to defragment files, compress file contents, ensure file and data integrity, secure files, and control removable storage media Before a file system can be placed on a hard disk, the disk must be partitioned and formatted FAT64 (exFAT) is mainly used for flash drives NTFS is the native file system for Windows 2000 and later Summary The file system should offer the ability to defragment files, compress file contents, ensure file and data integrity, secure files, and control removable storage media Before a file system can be placed on a hard disk, the disk must be partitioned and formatted FAT64 (exFAT) is mainly used for flash drives NTFS is the native file system for Windows 2000 and later Guide to Operating Systems, 5th Edition

75 Summary ReFS became available starting with Windows Server 2012
Chkdsk is an important disk verification and repair utility that works for FAT16, FAT32, and NTFS UNIX and Linux support many different file systems Ufs and ext use information nodes (inodes) to organize information about files Different varieties of UNIX/Linux use different file system utilities, such as fdisk and format, to partition and format disks Summary ReFS became available starting with Windows Server 2012 Chkdsk is an important disk verification and repair utility that works for FAT16, FAT32, and NTFS UNIX and Linux support many different file systems Ufs and ext use information nodes (inodes) to organize information about files Different varieties of UNIX/Linux use different file system utilities, such as fdisk and format, to partition and format disks Guide to Operating Systems, 5th Edition

76 Summary Mac OS X uses the Mac OS Extended (HFS+) file system
Two important Mac OS X disk tools include the Disk Utility and Disk First Aid Summary Mac OS X uses the Mac OS Extended (HFS+) file system Two important Mac OS X disk tools include the Disk Utility and Disk First Aid Guide to Operating Systems, 5th Edition


Download ppt "Guide to Operating Systems, 5th Edition"

Similar presentations


Ads by Google