Presentation is loading. Please wait.

Presentation is loading. Please wait.

Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 5 File Systems.

Similar presentations


Presentation on theme: "Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 5 File Systems."— Presentation transcript:

1 Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 5 File Systems

2 Guide to Parallel Operating Systems with Windows 7 and Linux Objectives Describe the characteristics of three Windows 7 file systems Describe the characteristics of four Fedora 13 file systems Create a file system in Windows 7 and Fedora 13 Mount a file system in Windows 7 and Fedora 13 Manage file systems in Windows 7 and Fedora 13 2

3 Guide to Parallel Operating Systems with Windows 7 and Linux Windows 7 File System Characteristics To implement a file system, you need to know the following: –Allocation of the storage areas on the hard drive –Assignment of drive letters: Used to access storage areas –Characteristics of available file systems 3

4 Guide to Parallel Operating Systems with Windows 7 and Linux Disk Partitions Figure 5-1: –Shows BIOS settings for three SATA-controlled drives –Each SATA drive has its own disk controller –CD-ROM drive has its own controller Figure 5-2: –Each controller supports one device that could be a hard drive or CD-ROM drive Figure 5-3: shows drives separated into partitions Types of storage in Windows 7: –Basic and dynamic 4

5 Guide to Parallel Operating Systems with Windows 7 and Linux5 Figure 5-1 BIOS settings for SATA-controlled drives in Virtual PC 2007 Courtesy Course Technology/Cengage Learning

6 Guide to Parallel Operating Systems with Windows 7 and Linux6 Figure 5-2 Sample devices for SATA-controlled drives Courtesy Course Technology/Cengage Learning

7 Guide to Parallel Operating Systems with Windows 7 and Linux7 Figure 5-3 Partitions on three hard drives and a CD-ROM drive Courtesy Course Technology/Cengage Learning

8 Guide to Parallel Operating Systems with Windows 7 and Linux Disk Partitions (continued) Primary partition features: –Normally contains an OS, such as Windows 7 –Physical hard drive can have four primary partitions Limit drops to three if extended partitions are used Only one extended partition can be allocated per physical hard drive –However, multiple logical drives can be allocated within an extended partition Volume: –A fixed amount of storage on a hard drive Hard drive can be initialized as a dynamic disk 8

9 Guide to Parallel Operating Systems with Windows 7 and Linux Drive-Lettering Conventions Windows 7: –Follows drive-lettering conventions –Assigns a letter to each hard drive and optical drive Creating partitions and logical drives for Figure 5-4: –System Reserved partition: no drive letter –First primary partition on disk 0 assigned drive letter C –CD-ROM drive received drive letter D –Disk 1 received drive letter E –Disk 2 received drive letter F View assignments with Disk Management console 9

10 Guide to Parallel Operating Systems with Windows 7 and Linux10 Figure 5-4 Disk Manager showing drive letters after additions Courtesy Course Technology/Cengage Learning

11 Guide to Parallel Operating Systems with Windows 7 and Linux FAT16 File System FAT (File Allocation Table): file system for early PCs –Supported by Windows 7 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 FAT12: –Predecessor to FAT16 –Counter for the cluster address was limited to 12 bits –Used on first 10-MB hard drives in the IBM PC XT 11

12 Guide to Parallel Operating Systems with Windows 7 and Linux FAT16 File System (continued) Subdirectories: logical grouping of related files FAT 16 permits partitions of up to 2 GB Partition size: –Limited by the 8-bit count of sectors per cluster In Windows 7: –The length of a filename may be 256 characters –Filenames are case insensitive 12

13 Guide to Parallel Operating Systems with Windows 7 and Linux FAT16 File System (continued) 13 Table 5-1 Cluster sizes

14 Guide to Parallel Operating Systems with Windows 7 and Linux FAT32 File System Uses 32-bit cluster numbers (28 bits currently used) Continues use of subdirectories and long filenames Theoretical size limits: –268,435,438 cluster based on 28-bit cluster address –Drive sizes of approximately 2 terabytes (trillion bytes) For Windows 7: –Partition limit is 32 GB for the primary partition 14

15 Guide to Parallel Operating Systems with Windows 7 and Linux NT File System Default file system for new installations of Windows 7 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, and quotas 15

16 Guide to Parallel Operating Systems with Windows 7 and Linux 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 uses 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

17 Guide to Parallel Operating Systems with Windows 7 and Linux Compression ̶ Saving Space Compression technology 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

18 Guide to Parallel Operating Systems with Windows 7 and Linux 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 –File decrypted when accessed by an application Administrator can decrypt file in emergency A file can be encrypted or compressed, but not both 18

19 Guide to Parallel Operating Systems with Windows 7 and Linux Security ̶̶ Restricting Access Windows 7: –Controls access to files and folders –Designed to provide security for files and folders accessed on an NTFS Three elements required for file access: –User account –User password –Permissions 19

20 Guide to Parallel Operating Systems with Windows 7 and Linux Auditing ̶ Tracking Access Auditing not “turned on” by default: –Significant processing resources required With auditing enabled: –Windows 7 can be configured to keep track of events –Event occurrence causes entry in security log Information about access events include: –Type of event, date and time the event occurred –Which user triggered the event Security log may only be viewed by authorized user 20

21 Guide to Parallel Operating Systems with Windows 7 and Linux Quotas ̶ Limiting Storage Storage quotas set for individuals and storage areas: –Implemented in Windows 7 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 21

22 Guide to Parallel Operating Systems with Windows 7 and Linux Optical Media File Systems Optical disc: storage medium manipulated with lights Windows 7 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 22

23 Guide to Parallel Operating Systems with Windows 7 and Linux Fedora 13 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 23

24 Guide to Parallel Operating Systems with Windows 7 and Linux Disk Partitions Disks on the Fedora 13 virtual machine: –Allocated to mimic drives on the Windows 7 virtual machine Windows 7 disks (Disk 0, Disk 1, and Disk 2): –Match up with Fedora 13 disks (sda, sdb, and sdc) –Operating systems: Installed on the first virtual disk (Disk 0 or sda) –Partitions: The same on the remaining two virtual disks Fedora 13: assigns partitions on a hard drive 24

25 Guide to Parallel Operating Systems with Windows 7 and Linux25 Figure 5-5 Fedora 13 partitions on three disks and a CD-ROM drive Courtesy Course Technology/Cengage Learning

26 Guide to Parallel Operating Systems with Windows 7 and Linux Disk Partitions (continued) 26 Table 5-2 Mimicked drives

27 Guide to Parallel Operating Systems with Windows 7 and Linux Drive Partition Naming Conventions Partition name: device name and partition number Physical drives allocated one or more partitions: –First SATA drive is called sda, the second sdb, etc. –Example: Fedora 13 is usually installed on first physical hard drive (sda1) 27

28 Guide to Parallel Operating Systems with Windows 7 and Linux File Systems in Fedora 13 Extended 2 file system (ext2fs): –Most widely used file system in Fedora 13 Ext2fs provides the same functionality as NTFS: –Compression: reduces file storage space –Encryption: protects files 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 13: –ext3fs: implements journalizing –NTFS: read-only access is provided 28

29 Guide to Parallel Operating Systems with Windows 7 and Linux 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 7: uses the Disk Management console –Linux: uses the fdisk and mkfs programs 29

30 Guide to Parallel Operating Systems with Windows 7 and Linux Windows 7 File System Creation Chief tool: Disk Management console When creating storage area: –Start with an unallocated area on a physical disk –New Simple Volume wizard: used to start process Options in the Assign Drive Letter/Path dialog box: –Assign the following drive letter –Mount in the following empty NTFS folder –Do not assign a drive letter or drive path 30

31 Guide to Parallel Operating Systems with Windows 7 and Linux31 Figure 5-7 Specifying a partition size Courtesy Course Technology/Cengage Learning

32 Guide to Parallel Operating Systems with Windows 7 and Linux32 Figure 5-8 Assigning a drive letter Courtesy Course Technology/Cengage Learning

33 Guide to Parallel Operating Systems with Windows 7 and Linux Windows 7 File System Creation (continued) You must format the partition before you can use it Format Partition dialog box You can configure a number of options: –Do not format this volume –Format this volume with the following settings –File system –Allocation unit size –Volume label –Perform a quick format –Enable file and folder compression 33

34 Guide to Parallel Operating Systems with Windows 7 and Linux34 Figure 5-9 Format Partition options Courtesy Course Technology/Cengage Learning

35 Guide to Parallel Operating Systems with Windows 7 and Linux Fedora 13 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 35

36 Guide to Parallel Operating Systems with Windows 7 and Linux36 Table 5-3 Fedora 13 default directories

37 Guide to Parallel Operating Systems with Windows 7 and Linux Mounting a File System Windows 7’s approach to mounting a file system: –Letters given to partitions, volumes, CD-ROM drives –“Premounted” storage items available at any time –Performance is traded for user convenience Fedora 13’s approach to mounting a file system: –Mount file systems as they are needed –User convenience is traded for performance 37

38 Guide to Parallel Operating Systems with Windows 7 and Linux Mounting a Windows 7 File System Removable drives: –Mounted upon insertion into USB port –Prior to removal, you must notify Windows 7 –Data transfer: may be interrupted if USB drive removed too soon Mounted drive: –Supported by Windows 7 and Fedora 13 –Mapped to empty folder on a volume that uses NTFS –Assigned drive path instead of drive letter –Adds flexibility to storage management –To access: click drive icon 38

39 Guide to Parallel Operating Systems with Windows 7 and Linux Mounting a Fedora 13 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 mount -a command –File systems in /etc/fstab (except noauto) mounted mount attaches file system to partition via mount point: –/mnt directory is a generic mount point –Command syntax: mount -t type device mount-point 39

40 Guide to Parallel Operating Systems with Windows 7 and Linux40 Figure 5-12 Displaying mounted file systems in Fedora 13 Courtesy Course Technology/Cengage Learning

41 Guide to Parallel Operating Systems with Windows 7 and Linux41 Figure 5-13 Mounting a file system in Fedora 13 Courtesy Course Technology/Cengage Learning

42 Guide to Parallel Operating Systems with Windows 7 and Linux Managing File Systems Windows 7: –Local Disk Properties dialog box assists in file management Fedora 13: –Use fsck command to manage the swap space 42

43 Guide to Parallel Operating Systems with Windows 7 and Linux Managing Windows 7 File Systems General tab manages 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 files on this drive to have contents indexed in addition to file properties 43

44 Guide to Parallel Operating Systems with Windows 7 and Linux Tools Tab Provides three disk-tuning tools Error-checking: –Scans the volume for damage –Volume is not available during the scan Defragmentation: –Analyzes drives for fragmentation (scattered files) –Tool: analyzes and reorganizes drives Backup: –Copies contents of files and folders –Option not available on Windows 7 Home edition 44

45 Guide to Parallel Operating Systems with Windows 7 and Linux Hardware Tab Provides access to drive information and settings Options to view information: –Name and Type: display drive’s model names and types –Properties button: provides access to the Properties dialog box for a selected device 45

46 Guide to Parallel Operating Systems with Windows 7 and Linux 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 46

47 Guide to Parallel Operating Systems with Windows 7 and Linux 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 –Click OK –You will be prompted for an administrative account password 47

48 Guide to Parallel Operating Systems with Windows 7 and Linux 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 48

49 Guide to Parallel Operating Systems with Windows 7 and Linux Managing Fedora 13 File Systems File system checking and repair: –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 Example: fsck -t ext3 /dev/sda2 Exit code returned provides description of error 49

50 Guide to Parallel Operating Systems with Windows 7 and Linux Managing Fedora 13 File Systems (continued) 50 Table 5-4 Exit codes for the fsck command

51 Guide to Parallel Operating Systems with Windows 7 and Linux Managing Fedora 13 File Systems (continued) Disk usage management –df command: Used to report disk space usage of a file system Syntax: df [OPTION]... [FILE]... –du command: Used to specify disk usage of each file Syntax: du [OPTION]... [FILE]... 51

52 Guide to Parallel Operating Systems with Windows 7 and Linux Managing Fedora 13 File Systems (continued) 52 Figure 5-21 Output of df command Courtesy Course Technology/Cengage Learning

53 Guide to Parallel Operating Systems with Windows 7 and Linux Swap Space Management free command used to: –Display amount of free and used memory –Manage swap space Swap space is used to implement paging Paging: –Pages written to disk when physical memory is low –Pages read back into physical memory when needed –Helps PC performance Swap partition can yield better performance 53

54 Guide to Parallel Operating Systems with Windows 7 and Linux Swap Space Management (continued) 54 Figure 5-23 Displaying free space for memory and swap file systems Courtesy Course Technology/Cengage Learning

55 Guide to Parallel Operating Systems with Windows 7 and Linux Managing Fedora 13 File Systems (continued) Disk quota –Alerts system administrator before a user consumes too much disk space or a partition becomes full –Fedora 13 can restrict disk space by implementing disk quotas Security –Configure by adding permissions to directories and the objects they contain 55

56 Guide to Parallel Operating Systems with Windows 7 and Linux Summary Storage areas on hard drives are used to store programs and data NTFS provides options for: –Journalizing, compression, encryption, security, auditing, and quotas Windows 7 uses: –Disk Management console to manage storage areas Fedora 13: –Uses partitions on a hard drive to store information 56

57 Guide to Parallel Operating Systems with Windows 7 and Linux Summary (continued) Windows 7: –Handles the mounting of drives (except USB drives) Fedora 13: –You can mount devices when they are needed Windows 7 and Fedora 13: –Tools are available to manage file systems: –Management tasks include: Reporting information about disk space availability Cleaning up temporary files Managing disk space quota 57


Download ppt "Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 5 File Systems."

Similar presentations


Ads by Google