Read ch03_Slides text version

Objectives

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

Chapter 3 File Systems

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 2

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

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

· Develop file management skills in two OSs

­ Windows XP ­ Fedora Core 4

­ Characteristics of available file systems

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

3

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

4

1

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

Disk Partitions (continued)

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 5 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 6

Disk Partitions (continued)

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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 7 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 8

2

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

Drive-Lettering Conventions (continued)

· 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

9 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 10

· View assignments with Disk Management console

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

FAT16 File System

· FAT (File Allocation Table): file system for early PCs

­ Supported by Windows XP and Linux

FAT16 File System (continued)

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 11 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 12

3

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)

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

· Actual size limit for partition is 32 BB

­ Limit set by Microsoft for Windows XP

· Options unique to NTFS: journalizing, compression, encryption, security, auditing, quotas

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 13 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 14

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

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

· NTFS journalizing techniques based on transactions

­ Write action is either accomplished or canceled

· Performance considerations

­ Decompression/recompression requires CPU cycles

· System performance may be adversely affected

· Scenario 1: sector damaged during write operation

­ Response: sector marked, data written to good sector

­ Reserve compression for little used files and folders

· Scenario 2: power is lost during write operation

­ Response: transaction processed after OS restarts

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 15 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 16

4

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

Security--Restricting Access

· Windows XP controls access to files and folders · Three elements required for file access

­ User account ­ User password ­ Permissions

· Accessing application decodes encrypted file · Administrator can decrypt file in emergency · A file can be encrypted or compressed, but not both

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 17 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 18

Security--Restricting Access (continued)

Security--Restricting Access (continued)

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

19

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

20

5

Auditing--Tracking Access

· Auditing not "turned on" by default

­ Significant processing resources required

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

· Enable auditing to track certain events

­ Event causes XP to record an entry in security log

· Consequence of storing data beyond quota

­ User receives message indicating hard drive is full

· Important information recorded for file access event

­ Type of event ­ The date and time that event occurred ­ Which user triggered the event

· Log file stores information regarding quotas

­ Used to determine which users are at or near quota

· Security log may only be viewed by authorized user

­ Example: administrator is an authorized user

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 21 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 22

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

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

­ Compact Disc File System (CDFS)

· Alias for ISO 9660 (CD-ROM file system standard) · Makes CD-ROMs readable by many different platforms

­ Creation and management of directories and files ­ Characteristics of available file systems

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

23

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

24

6

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

Disk Partitions (continued)

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 25 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 26

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.

· Describe the characteristics of three Windows XP file systems

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 27 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 28

7

Physical Drives in Fedora Core 4

· Partitions are formatted for particular file systems

­ Examples: FATT16, FAT32, ext2, or ext3

File Systems in Fedora Core 4

· Extended 2 file system (ext2fs)

­ Most widely used file system in Fedora Core 4

· mkfs command

­ Used to format and define hard drive partitions ­ File system specific

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 29 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 30

File System Creation

· Describe the characteristics of four Fedora Core 4 file systems · 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

31

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

32

8

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

Windows XP File System Creation (continued)

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 33 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 34

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

Windows XP File System Creation (continued)

­ Format the partition

· Seven options are available

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 35 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 36

9

Windows XP File System Creation (continued)

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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 37 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 38

Fedora Core 4 File System Creation (continued)

· Create a file system in Windows XP and Fedora Core 4

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

39

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

40

10

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

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

· Fedora Core 4 approach to mounting a file system

­ Mount file systems as they are needed ­ User convenience traded off for performance

· 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

41 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 42

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

Mounting a Fedora Core 4 File System

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 43

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 44

11

Mounting a Fedora Core 4 File System (continued)

Mounting a Fedora Core 4 File System (continued)

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

45

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

46

Managing File Systems

· Mount a file system in Windows XP and Fedora Core 4 · 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

47

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

48

12

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

Managing Windows XP File Systems (continued)

· 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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 49 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 50

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

51

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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 52

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

13

Tools Tab (continued)

Tools Tab (continued)

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

53

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

54

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

Hardware Tab (continued)

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

55

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

56

14

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

Sharing Tab (continued)

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

57

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

58

Security Tab

· Used to set the NTFS permissions

­ NTFS permissions control access to data on drive

Security Tab (continued)

· Modifying NTFS group permissions (administrator)

­ Set the Allow check boxes for each user group

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

59

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

60

15

Quota Tab

· Tracks/controls disk space usage for NTFS volumes

­ Used by administrators to optimize use of disk space

Quota Tab (continued)

· 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

61 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 62

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

Managing Fedora Core 4 File Systems

· Use the fsck command · Manage swap space

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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

63

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

64

16

File System Checking and Repairing (continued)

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

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 65 Guide to Parallel Operating Systems with Microsoft Windows XP and Linux 66

Swap Space Management (continued)

· Manage file systems in Windows XP and Fedora Core 4

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

67

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

68

17

Review Questions (Page 136)

1. B, C, D 2. D 3. A, B, C, D 4. C 5. D 6. A, B, C, D 7. B, C, D 8. A, B, C 9. C 10.A, B, D 11.B 12.C, D 13.B 14. D 15.D 16.A, C 17.B 18.B, C 19.A, D 20.A, B, D 21.A, C 22.A, B, D 23.B, C, D 24.A, B, D 25.B, C 26.A, D

Guide to Parallel Operating Systems with Microsoft Windows XP and Linux

69

18

Information

ch03_Slides

18 pages

Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

950663