Presentation is loading. Please wait.

Presentation is loading. Please wait.

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux Chapter 3 File Systems.

Similar presentations


Presentation on theme: "Guide to Parallel Operating Systems with Microsoft Windows XP and Linux Chapter 3 File Systems."— Presentation transcript:

1 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux Chapter 3 File Systems

2 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux2 Objectives Describe the characteristics of three Windows XP file systems Describe the characteristics of four Fedora Core 4 file systems Create a file system in Windows XP and Fedora Core 4 Mount a file system in Windows XP and Fedora Core 4 Manage file systems in Windows XP and Fedora Core 4

3 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux3 File Systems Structures for organizing, naming, and storing files Components: files, directories, access methods Preparing a PC to accept files –Allocate storage areas on a disk –Format storage area for a file system Develop file management skills in two OSs –Windows XP –Fedora Core 4

4 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux4 Windows XP File System Characteristics Gain file system knowledge through implementation Three file system aspects to master –Allocation of the storage areas on the hard drive –Assignment of drive letters Used to access storage areas –Characteristics of available file systems

5 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux5 Disk Partitions Scenario 1: PC, two hard drives, one CD-ROM drive –Two hard drives assigned to first disk controller –CD-ROM assigned to second disk controller Scenario 2: same devices using disk partitions Two storage types in Windows XP: basic, dynamic Basic storage allows allocation of three storage types –Primary partitions: separate allocation units on disk –Extended partitions: created from free drive space –Logical drives: drives created in an extended partition

6 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux6 Disk Partitions (continued)

7 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux7 Disk Partitions (continued)

8 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux8 Disk Partitions (continued) Primary partition features –Normally contains an OS, such as Windows XP –Physical hard drive can have four primary partitions Limit drops to three if extended partitions are used Extended partition features –One extended partition per physical hard drive –Extended partition supports up to 24 logical drives Dynamic disk storage divides disk into volumes –Volume: fixed amount of storage on a hard drive –Multiple volumes may reside on a single disk –A single volume can span multiple disks

9 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux9 Drive-Lettering Conventions Windows XP follows drive-lettering conventions –Drive letters assigned to all hard drives, optical drives –Example: first partition on first drive assigned letter C Creating partitions and logical drives for Figure 3-3 –First primary partition on disk 0 assigned drive letter C –CD-ROM drive received drive letter D –Logical drives on disk 0 assigned drive letters E and F –Primary partition on disk 1 received drive letter G –Logical drives on disk 1 assigned letters H and I View assignments with Disk Management console

10 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux10 Drive-Lettering Conventions (continued)

11 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux11 FAT16 File System FAT (File Allocation Table): file system for early PCs –Supported by Windows XP and Linux FAT16 disk hierarchy –Sector: smallest unit of space, usually 512 bytes –Cluster: group of sectors Size is related to the size of the disk partition Size range: 4 sectors to 64 sectors FAT16 permits partitions up to 2 GB of storage Two notes on filenames in Windows XP –The length of a filename may be 256 characters –The filenames are case insensitive

12 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux12 FAT16 File System (continued)

13 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux13 FAT32 File System Uses 32-bit cluster numbers (28 bits currently used) Continues use of subdirectories and long filename Theoretical size limits –268,435,438 cluster based on 28-bit cluster address –Drive sizes of approximately 2 terabytes (trillion bytes) Actual size limit for partition is 32 BB –Limit set by Microsoft for Windows XP

14 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux14 NT File System Default file system for Windows XP NTFS (New Technology File System) features –Supports volumes as large as 2 terabytes –Cluster sizes: 512 bytes to 64 KB (4 KB default) –Master file table (MFT): used to manage NTFS volume Allocates space for each file record File attributes written to allocated space in MFT Binary search algorithm used to locate items Options unique to NTFS: journalizing, compression, encryption, security, auditing, quotas

15 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux15 Journalizing—Ensuring that Data is Written Maintains data integrity for the hard drive How NTFS provides a fail-safe file system –Corrects itself against a hard drive sector corruption –Protects against power loss during hard drive writes NTFS journalizing techniques based on transactions –Write action is either accomplished or canceled Scenario 1: sector damaged during write operation –Response: sector marked, data written to good sector Scenario 2: power is lost during write operation –Response: transaction processed after OS restarts

16 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux16 Compression—Saving Space Compression software reduces file sizes –Example: word-processing documents compress well Access compressed files with decompression –Recompress files before rewriting to hard drive Performance considerations –Decompression/recompression requires CPU cycles System performance may be adversely affected –Reserve compression for little used files and folders

17 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux17 Encryption—Protecting Data Effects of applying NTFS encryption to a file –Only the file creator can view file contents –Non-authorized user will not see meaningful data Accessing application decodes encrypted file Administrator can decrypt file in emergency A file can be encrypted or compressed, but not both

18 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux18 Security—Restricting Access Windows XP controls access to files and folders Three elements required for file access –User account –User password –Permissions User groups simplify organization of user accounts –File or folder may have different user groups Each user group may have a unique permission set –Example involving three user groups Groups: ACCTMANAGERS, PAYABLE, RECEIVABLE Each group is assigned variation on three permissions

19 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux19 Security—Restricting Access (continued)

20 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux20 Security—Restricting Access (continued)

21 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux21 Auditing—Tracking Access Auditing not “turned on” by default –Significant processing resources required Enable auditing to track certain events –Event causes XP to record an entry in security log Important information recorded for file access event –Type of event –The date and time that event occurred –Which user triggered the event Security log may only be viewed by authorized user –Example: administrator is an authorized user

22 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux22 Quotas—Limiting Storage Storage quotas set for individuals and storage areas –Implemented in Windows XP when a PC is shared –Administrator cannot limit space for a group Consequence of storing data beyond quota –User receives message indicating hard drive is full Log file stores information regarding quotas –Used to determine which users are at or near quota

23 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux23 Optical Media File Systems Optical disc: storage medium manipulated with light XP supports two file systems for optical media –UDF (Universal Disk Format) Read-write interoperable among major OSs Compatible between rewritable and write-once media Implementations: DVDs, CD-Rs, and CD-RWs –Compact Disc File System (CDFS) Alias for ISO 9660 (CD-ROM file system standard) Makes CD-ROMs readable by many different platforms

24 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux24 Fedora Core 4 File System Characteristics File system knowledge areas to master –Allocation of the partitions on the hard drive Each partition on a physical drive is named –Creation of file systems on the partitions Partition is formatted for the type of file system File systems are mounted on mount points –Creation and management of directories and files –Characteristics of available file systems

25 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux25 Disk Partitions Sample physical device setup using ATA technology –Attach up to four drives to PC –Primary and secondary controllers manage drives –Each controller supports two drives, master and slave Hard drive may have four primary partitions –First physical drive named hda1 –Extended partitions named hda2, hda3, and hda4 –First logical partition in hda2 is named hda5 –Partitions on other hard drives named the same way –Second controller contains CD-ROM hard drive (hdc) Partition table is located in sector 0 of a drive

26 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux26 Disk Partitions (continued)

27 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux27 Drive Partition Naming Conventions Partition name: device name and partition number Physical drives allocated one or more partitions –First installed IDE drive called hda, the second is hdb –First SCSI drive is called sda, the second sdb, etc. OS usually installed on master hard drive, hda1 fdisk command: partition table manipulator –Shows the partition table with file systems –Syntax: fdisk [ -l ] [ -v ] [ -s partition] [ device ] -v: prints version number of fdisk program -l: lists the partition tables for devices, then exits -s partition: size of partitions (except DOS) are output

28 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux28 Physical Drives in Fedora Core 4 Partitions are formatted for particular file systems –Examples: FATT16, FAT32, ext2, or ext3 mkfs command –Used to format and define hard drive partitions –File system specific

29 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux29 File Systems in Fedora Core 4 Extended 2 file system (ext2fs) –Most widely used file system in Fedora Core 4 Functionality similar to NTFS provided: –Compression: reduces file storage space –Encryption: protects file from intruders –Security: restricts access to authorized users –Auditing: tracks file access (actual or attempted) –Quotas: limits total size of files per user Some other file systems used in Fedora Core 4 –ext3fs: implements journalizing –NTFS: read-only access is provided

30 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux30 File System Creation Formatting: prepares a storage area for use –Creates root of directory structure and file system Tools for creating a storage area and a file system –Windows XP: use the Disk Management console –Linux: use mkfs program

31 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux31 Windows XP File System Creation Chief tool: Disk Management Console Two areas where storage may be created –A primary partition –A logical drive within an extended partition Storage area is defined in unallocated area on disk Using New Partition Wizard –Right-click unallocated area, click New Partition –After clicking Next, select the extended partition type Choices: primary or extended partition –Go to the next screen and set storage amount in MB

32 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux32 Windows XP File System Creation (continued)

33 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux33 Windows XP File System Creation (continued) Creating a logical drive in the new extended partition –Reopen the New Partition Wizard –Select New Logical Drive –Indicate the size of the logical drive –Choose from 3 options in Assign Drive Letter or Path Assign the following drive letter Mount in the following empty NTFS folder Do not assign a drive letter or drive path –Format the partition Seven options are available

34 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux34 Windows XP File System Creation (continued)

35 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux35 Windows XP File System Creation (continued)

36 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux36 Fedora Core 4 File System Creation Used for storing system configurations and data Initial structure created: “/” directory and swap file Uses for the hidden swap file –Holding parts of programs and data files –OS moves data between swap file and memory Define file systems after “/” and swap file –Create a new partition using the fdisk command –Create the file system using the mkfs command Example: mkfs -t ext2 /dev/fd0 –If mount point needed, use mkdir to create a directory Example: mkdir /home/User01/mydirectory

37 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux37 Fedora Core 4 File System Creation (continued)

38 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux38 Mounting a File System Windows XP approach to mounting a file system –Letters given to partitions, volumes, CD-ROM drives –“Premounted” storage items available at any time –Performance is traded off for user convenience Fedora Core 4 approach to mounting a file system –Mount file systems as they are needed –User convenience traded off for performance

39 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux39 Mounting a Windows XP File System Mounted drives add flexibility to storage management Premounted storage areas that are always available –Partitions, logical drives, CD-ROM drives Removable drives are mounted by Windows XP –Example: USB drives mounted when inserted into port Use Disk Management to create a mounted drive –Start with the drive you want to mount; e.g., F drive –Map mounted drive to empty folder on NTFS volume –Assign drive path to mounted drive Example: C:\Mount Drive F

40 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux40 Mounting a Fedora Core 4 File System Mounting: makes a file system available for use –After mounting, files are accessible at mount point –Superuser access required to mount a file system Some partitions are mounted automatically –Script in /etc/rc.d executes the mount -a command –File systems in /etc/fstab (except noauto) are mounted Mounted partitions appear to be in local directory mount attaches file system to partition via mount point –/mnt directory is a generic mount point –Command syntax: mount -t type device mount-point

41 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux41 Mounting a Fedora Core 4 File System (continued)

42 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux42 Mounting a Fedora Core 4 File System (continued)

43 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux43 Managing File Systems Windows XP: use Local Disk Properties dialog box Approaches used in Fedora Core 4 –Use fsc command to check and repair file system –Manage the swap space

44 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux44 Managing Windows XP File Systems Starting point: Local Disk Properties for drive –Tools are grouped under six tabs –Security tab visible if simple file sharing not enabled Disabling simple file sharing –Click Start, point to My Computer –Click Local Disk (C:)-> Tools menu-> Folder Options –Click the View tab, go to Advanced Settings section –Uncheck the Use simple file sharing Using tools in Sharing and Quota tabs –Administrative rights required

45 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux45 Managing Windows XP File Systems (continued)

46 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux46 General Tab Provides useful information for managing disk space –Type: a local disk is a hard drive on the PC –File system: indicates the file system type on the drive –Used space: displays amount of used space on drive –Free space: displays amount of unused space on drive –Capacity: displays the total capacity of the disk drive –Disk Cleanup: removes temporary and Internet files –Compress drive to save disk space –Allow Indexing Service to index this disk for fast file searching

47 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux47 Tools Tab Provides three disk-tuning tools Error-checking –Scans drive for system errors and bad sectors –Drive is not available during the scan Defragmentation –Analyzes drives for fragmentation (scattered files) –Disk Defragmenter: analyzes and reorganizes drives Backup –Copies contents of files and folders –Option not available on Windows XP Home edition

48 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux48 Tools Tab (continued)

49 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux49 Tools Tab (continued)

50 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux50 Hardware Tab Provides access to drive information and settings Three sources of information –Name and Type: display model names and types –Troubleshoot button: links you to Help and Support –Properties: used to set drive removal policies and write caching

51 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux51 Hardware Tab (continued)

52 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux52 Sharing Tab Shares the entire contents of a drive Hidden share C$ is displayed in dialog box (default) Creating additional shares (for administrators) –Click the New Share button –Type the share name in the Share name text box –Click the Permissions button –Check the appropriate Allow check boxes –Click OK twice

53 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux53 Sharing Tab (continued)

54 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux54 Security Tab Used to set the NTFS permissions –NTFS permissions control access to data on drive Modifying NTFS group permissions (administrator) –Set the Allow check boxes for each user group

55 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux55 Security Tab (continued)

56 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux56 Quota Tab Tracks/controls disk space usage for NTFS volumes –Used by administrators to optimize use of disk space Options –Enable quota management –Deny disk space to users exceeding quota limit –Do not limit disk usage –Limit disk space to –Set warning level to –Log event when a user exceeds their quota limit –Log event when a user exceeds their warning level

57 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux57 Quota Tab (continued)

58 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux58 Managing Fedora Core 4 File Systems Use the fsck command Manage swap space

59 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux59 File System Checking and Repairing File corruption and OS errors –Caused by power losses or non-graceful shutdowns –File system buffer cache out of sync with disk Buffer cache: memory used for quick data access fsck command: checks for and repairs errors –Syntactically similar to the mkfs command –Format: fsck –t ; e.g., fsck -t ext3 /dev/hda2 –Exit code returned provides description of error

60 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux60 File System Checking and Repairing (continued)

61 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux61 Swap Space Management Paging supports multitasking –Pages written to disk when physical memory is low –Pages read back into physical memory when needed Swap space is used to implement paging –Swap partition: guarantees contiguous disk blocks –Swap file: blocks may fragment, are not easily scaled Use free command to determine swap space size –Detailed report of memory usage –All the numbers are reported in 1024-byte blocks

62 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux62 Swap Space Management (continued)

63 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux63 Summary Three partition types: primary, extended, logical Storage area allocated and formatted for file system File systems supported by Windows XP: FAT, NTFS File systems supported by Fedora: FAT, ext2, ext3 NTFS uses volumes; FAT, ext2, and ext3 use partitions

64 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux64 Summary (continued) NTFS options: journalizing, compression, encryption, security, auditing, and quotas Disk Management Console: Windows XP disk tool Windows XP premounts drives (except USB drives) Mount drives in Fedora Core 4 as needed File system management tools are available in Windows XP and Fedora Core 4


Download ppt "Guide to Parallel Operating Systems with Microsoft Windows XP and Linux Chapter 3 File Systems."

Similar presentations


Ads by Google