1.14k likes | 2.13k Views
File Systems. Guide to Operating Systems Third Edition. Objectives. After reading this chapter and completing the exercises you will be able to: Understand the basic functions common to all file systems
E N D
File Systems Guide to Operating Systems Third Edition
Objectives After reading this chapter and completing the exercises you will be able to: • Understand the basic functions common to all file systems • Explain the design of the Windows 2000, Windows XP, and Windows Server 2003 (FAT16, FAT32, and NTFS) Guide to Operating Systems, Third Edition
Objectives (continued) • Describe the file systems used by UNIX and Linux systems, including ufs and ext • Discuss the NetWare file system and NSS • Explain the Mac OS X Extended (HFS+) file system including features added in Mac OS X version 10.3 Guide to Operating Systems, Third Edition
Understanding File System Functions • File system is designed for storing and managing files on storage media • PC file systems: • Partition and format disks to store and retrieve information • Enable files to be organized through directories and folders • Establish file-naming conventions Guide to Operating Systems, Third Edition
Understanding File System Functions (continued) • PC file systems (continued): • Provide utilities to maintain and manage the file system and storage media • Provide for file and data integrity • Enable error recovery or prevention • Secure the information in files Guide to Operating Systems, Third Edition
Understanding File System Functions (continued) • 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 • Data can be text, images, music and sounds, video, etc Guide to Operating Systems, Third Edition
Understanding File System Functions (continued) • Must be a way to write digital information onto disk, track it, update it, and recall it • OS typically groups disk sectors in some logical way, creates a record of this structure, and builds a directory to track the type of data stored in each file Guide to Operating Systems, Third Edition
Understanding File System Functions (continued) • Directories also store: • Date and time the directory or file was created • Date and time the directory or file was last modified • Directory or file size • Directory of file attributes Guide to Operating Systems, Third Edition
Designing a Directory Structure • Important feature: • ability to store information according to a pattern of organization that is enabled by the use of directories • Windows versions and the Mac OS, these are called folders Guide to Operating Systems, Third Edition
Designing a Directory Structure (continued) • Directories and folders • can be organized in a hierarchy that is similar to a tree structure • Many keep most of their files in the computer’s primary level or root directory Guide to Operating Systems, Third Edition
Designing a Directory Structure (continued) • Consider directories for the following: • Operating system 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, Third Edition
Designing a Directory Structure (continued) • The folder structure from the root might be as follows: • Windows • Program FilesDocuments and Settings • Shared • Forms • Inetpub Guide to Operating Systems, Third Edition
Designing a Directory Structure (continued) • For UNIX/Linux systems: • bin • lib • usr • var • tmp Guide to Operating Systems, Third Edition
Designing a Directory Structure (continued) • For UNIX/Linux systems (continued): • dev • mnt • etc • sbin • home • proc Guide to Operating Systems, Third Edition
Designing a Directory Structure (continued) • In Mac OS X: • Applications • Applications (Mac OS 9) • System FolderLibrary • System Guide to Operating Systems, Third Edition
Designing a Directory Structure (continued) • In Mac OS X (continued): • Library • Users • Documents Guide to Operating Systems, Third Edition
Disk Storage Basics • Low-level format • software process that marks the location of disk tracks and sectors Guide to Operating Systems, Third Edition
Block Allocation • Block allocation • keep track of where specific files are stored on the disk • Clusters • Logical blocks mapped to sectors, heads, and tracks on the disk Guide to Operating Systems, Third Edition
Block Allocation (continued) • Block allocation information is stored: • FAT (file allocation table) • New Technology File System (NTFS) Guide to Operating Systems, Third Edition
Partitions • Partitioning • process of blocking a group of tracks and sectors to be used FAT or NTFS • High-level formatted • disk divisions and patterns needed by a particular operating system to store files Guide to Operating Systems, Third Edition
Partitions (continued) • Partition table in Mac OS and Windows • Disk label in UNIX • Boot block in UNIX Master Boot Record (MBR) in Windows • tiny program used to begin booting an operating system from a disk Guide to Operating Systems, Third Edition
Windows 2000/XP/Server 2003 File Systems • Three file systems supported: • FAT16 • FAT32 • NTFS version 5 Guide to Operating Systems, Third Edition
Extended FAT16 • Evolved from FAT16 system in earlier versions of Windows • Uses long file names • Uses Unicode • Coding system Guide to Operating Systems, Third Edition
Extended FAT16 (continued) • Assigned a letter followed by a colon: A:, B:, C:, and so on through Z: • Typically, C: is reserved for the first hard disk Guide to Operating Systems, Third Edition
Extended FAT16 (continued) • Format command • writes the file system structure to the disk • includes several additional switches that modify precise program operation Guide to Operating Systems, Third Edition
Extended FAT16 (continued) • Switches • (extra code) to change the way a particular command operates • File attributes • file characteristics such a Hidden, Read-only, Archive, etc. Guide to Operating Systems, Third Edition
Extended FAT16 (continued) • File stored to disk • data is written in the clusters on the disk • Filename stored in the directory Guide to Operating Systems, Third Edition
Extended FAT16 (continued) • “linked-list” method • Bad clusters • areas never used for file storage • Formatting a disk • removes all data that was on the disk • The FAT tables and root directory are found at the beginning • Each item in a directory consists of 32 bytes Guide to Operating Systems, Third Edition
Extended FAT16 (continued) • Status bits • identify the type of filename contained in each entry • Volume, Directory, System, Hidden, Read-only, and Archive • attrib command • to look at or set attributes • typing attrib in a directory shows all settings Guide to Operating Systems, Third Edition
FAT32 • Accommodates larger disks than FAT16 • Allows partitions of up to 2 TB • Windows 2000, XP, Server 2003 • convert from FAT16 or FAT32 to NTFS Guide to Operating Systems, Third Edition
NTFS • Advantages of NTFS: • Ability to compress file and directory contents on the fly • Better recoverability and stability • Less disk fragmentation • Local file and folder-level security Guide to Operating Systems, Third Edition
NTFS (continued) • Basic features: • Long filenames (LFN) • Built-in security features • Better file compression than FAT • Ability to use larger disks and files Guide to Operating Systems, Third Edition
NTFS (continued) • Basic features: • File activity tracking for better recovery and stability than FAT • POSIX support • Volume striping and volume extensions • Less disk fragmentation than FAT Guide to Operating Systems, Third Edition
NTFS (continued) • Enables the use of LFNs • Equipped with security features that meet the U.S. government’s C2 security specifications • high-level, “top secret” standards for data protection, system auditing, and system access Guide to Operating Systems, Third Edition
NTFS (continued) • Large databases • SQL Server database file might be 20 GB • Ability to keep a log of file system activity • Supports POSIX to enable portability of applications Guide to Operating Systems, Third Edition
NTFS (continued) • 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 • Ability to establish disk quotas Guide to Operating Systems, Third Edition
NTFS (continued) • NTFS 5 files can be encrypted • Distributed Link Tracking • available in NTFS 5 so that shortcuts are not lost when you move files to another volume • Uses a Master File Table (MFT) • located at the beginning of the partition • when a file is made in NTFS, a record for that file is added to the MFT Guide to Operating Systems, Third Edition
NTFS (continued) • Basic disks • use traditional disk management • Dynamic disks • setup large volumes on one disk • extend volumes onto additional physical disks • chkdsk utility • much more robust than in other Windows operating systems Guide to Operating Systems, Third Edition
NTFS (continued) • CD-ROM File System (CDFS) • OS can read and write files to CD-ROM • Universal Disk Format (UDF) • used on CD-ROM and large capacity Digital Video Disk-Read Only Memory (DVD-ROM) media Guide to Operating Systems, Third Edition
The UNIX File System • Works differently from anything discussed up to this point • “UNIX file system” is really a misnomer • many different file systems that can be used • Extended file system (ext or ext fs) • native in Linux and installed by default • ufs UNIX file system (and also ext/ext2/ext3) uses the concept of information nodes, or inodes Guide to Operating Systems, Third Edition
The UNIX File System (continued) • An inode contains • name of file • general information about the file • information (pointer) • Pointer information based on logical blocks • Superblock • information about the layout of blocks, sectors, and cylinder groups Guide to Operating Systems, Third Edition
The UNIX File System (continued) • mount command • OS told to map the root inode of another file system onto the empty directory • Directory is nothing more than a special file • Two types of devices • raw devices and block devices • Raw device has no logical division in blocks, whereas a block device does Guide to Operating Systems, Third Edition
The UNIX File System (continued) • Every device must be represented by a device inode • Symbolic link • to link a directory entry to a file that is on a different partition Guide to Operating Systems, Third Edition
The NetWare File System • Novell Storage Services (NSS) • disk partitions • storage pools • volumes • Storage pools • ways to divide the use of a disk • can be a superset of disk partitions Guide to Operating Systems, Third Edition
The NetWare File System (continued) • Balanced-tree (b-tree) • fast file access • tree structure off the root • Features of NSS • file compression • hot fixes • journaling • user disk quotas Guide to Operating Systems, Third Edition
The NetWare File System (continued) • Features of NSS • file flushing • storage pool expansion • data shredding • improved file backup Guide to Operating Systems, Third Edition
The Macintosh File System • Macintosh Filing System (MFS) • limited to keeping track of 128 documents, applications, or folders • Hierarchical Filing System (HFS) • at most, 216 (65,536) units Guide to Operating Systems, Third Edition
The Macintosh File System (continued) • Boot blocks • identify the filing system, the names of important system files, and other important information • Volume information block • points to other important areas of information Guide to Operating Systems, Third Edition
The Macintosh File System (continued) • Catalog b-tree • list of all files on the volume • Extents b-tree • track the location of the file fragments, or extents • “medium” filenames • up to 31 characters in length Guide to Operating Systems, Third Edition
The Macintosh File System (continued) • Invisible type codes and creator codes • Files created with Apple’s SimpleText text editor have a type code of TEXT, and a creator code of ttxt • Mac files an contain two parts, or forks: • the data fork • the resource fork Guide to Operating Systems, Third Edition