1 / 87

Guide to Operating Systems, 4 th ed.

Guide to Operating Systems, 4 th ed. Chapter 11: Standard Operating and Maintenance Procedures. Explain file system maintenance techniques for different operating systems Perform regular file system maintenance by finding and deleting unused files and directories

bthoreson
Download Presentation

Guide to Operating Systems, 4 th ed.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Guide to Operating Systems, 4th ed. Chapter 11: Standard Operating and Maintenance Procedures

  2. Explain file system maintenance techniques for different operating systems Perform regular file system maintenance by finding and deleting unused files and directories Perform disk maintenance that includes defragmenting, relocating files and folders, running disk and file repair utilities, and selecting RAID options Explain the types of backups and develop a backup plan Explain how to install software for best performance Tune operating systems for optimal performance Objectives Guide to Operating Systems, 4th ed. 2

  3. File System Maintenance Successful file system maintenance is closely linked to the file structure on a computer. A well-planned file structure makes it easy to locate files, update files, share folders and files, back up and archive files, and delete unwanted files. On server OSs, well-designed file structures favorably impact network performances and security. Guide to Operating Systems, 4th ed.

  4. File System Maintenance Basic rules for creating a file structure: Keep a manageable number of directories in the root directory. Keep OS files in the default directories. Keep different versions of software in their own directories. Keep data files in directories on the basis of their functions. Design home directories to match the functions of users in an organization. Group files with similar security needs within the same directories. Guide to Operating Systems, 4th ed.

  5. File System Maintenance It does not take long for the number of directories in the root directory to proliferate. Most Windows software vendors install their applications in the default directory – Program Files. If you have 30 or so software applications, it can make sense to create one or two directories within the root that are intended for software applications, and then create subdirectories within each main applications directory to contain particular applications. Guide to Operating Systems, 4th ed.

  6. File System Maintenance Example directories in the root directory for Windows 7 Guide to Operating Systems, 4th ed.

  7. File System Maintenance Example root directory structure in UNIX/Linux includes the following directories: bin for files to start the OS and perform essential OS tasks (binary) lib for libraries including settings used by the OS. usr for users’ files and user programs. var for files in which the content varies or are used temporarily. tmp for files used only temporarily. dev for devices such as keyboard and mouse. mnt for DVD/CD-ROM drives, and other removable media. etc for system and config files, including files needed at startup. sbin for user programs and utilities (system binary files). home for users’ home directories. proc for system resource tracking. Guide to Operating Systems, 4th ed.

  8. File System Maintenance Some examples of folders in the root of a Mac OS X Leopard/Snow Leopard (many same as UNIX): Applications – software applications bin – same use as in UNIX dev – same use as in UNIX etc – same use as in UNIX home for users’ home directories Library for shared library files network for network devices, files for servers, and network-related libraries of functions System for system files Tmp – same as in UNIX Users - for user accounts (containing a subfolder for each account) Var – Same use as in UNIX Volumes for mounted volumes including hard disks

  9. File System Maintenance OS directories are typically placed in the root directory and have appropriate subdirectories under a main directory Guide to Operating Systems, 4th ed.

  10. File System Maintenance Each user account in Mac OS X Leopard/Snow Leopard (many same as UNIX): Applications – software applications bin – same use as in UNIX dev – same use as in UNIX etc – same use as in UNIX home for users’ home directories Library for shared library files network for network devices, files for servers, and network-related libraries of functions System for system files Tmp – same as in UNIX Users - for user accounts (containing a subfolder for each account) Var – Same use as in UNIX Volumes for mounted volumes including hard disks

  11. File System Maintenance In addition to folders off the root, each user account in Mac OS X Snow Leopard typically contains folders such as: Desktop – for files that are on the user’s desktop. Downloads – for downloaded files, such as from the Internet. Library – for support files, such as fonts used by the account. Movies – for movies that can be played on the computer. Music - for music files. Pictures – for picture files. Public – for files to share with others over a network. Sites – for personal website and Web-formatted (HTML) files to be shared over a network or the Internet.

  12. File System Maintenance Operating system directories are typically placed in the root directory and have appropriate subdirectories under a main directory. Windows 7 OS system files are contained in the Windows directory, which has subdirectories such as System, System32, and SysWOW64. Macintosh system files are kept in the bin, dev, etc, Library, network,sbin, System, and Volumes directories. UNIX/Linux system files are in the bin, dev, etc, lib, mnt, proc, sbin, and other directories depending on the distribution.

  13. File System Maintenance Advantages to installing and leaving OS files in default directories: Easier for others to help with computer problems Many software installations expect OS files to be in the default locations Files are more easily found by uninstall programs if it becomes necessary to uninstall software If different versions of software are still used: Put different versions in different subdirectories under a main applications directory Example: If Microsoft Word 2007 and 2010 are being used, create Word2007 and Word2010 subdirectories under the Program Files directory Guide to Operating Systems, 4th ed.

  14. File System Maintenance Some directory structures offer special locations for data files Example: Word processing, spreadsheet and database files should be stored as subdirectories under a root directory called Data On a file server, files might be stored on the basis of directories set up for departments Home directories on a server often reflect the organizational structure. Helps organize data based on users. Guide to Operating Systems, 4th ed.

  15. Finding and Deleting Files A solid file structure makes it easier to find and delete unneeded files. Temporary files are often created when you install new software and running some applications and are sometimes not deleted automatically. Some software applications do not completely delete temporary files when the application installation is finished. Some software applications create temporary files that are not deleted when the application is improperly terminated. Most installations create a temporary directory and a set of temporary files that are stored in a main temporary directory under the root directory or under an account’s home directory. Guide to Operating Systems, 4th ed.

  16. Finding and Deleting Files Web browsers write an impressive number of temporary Internet files that are not deleted, unless you set an expiration date, or delete them using an OS utility or utility that comes with the Web browser. In most cases, the files can be deleted regularly. Some cookies may be kept because they contain specialized information for accessing particular websites. Many cookies are deleted because they do not contain information that is needed by the computer user and only take up space. Some users regularly delete all cookies, because new ones are created anyway when they re-access websites. It is good practice to implement a regular schedule for finding and deleting temporary files.

  17. Deleting Temporary Files in Windows Windows XP/Vista/7, Server 2003/R2, and Server 2008/R2: Use the Disk Cleanup Tool to select which files to delete (some examples are listed below): Downloaded program files Temporary Internet files Recycle Bin Setup log files System error memory dump files Temporary files Use search tool to search for and delete all files with .tmp file extension Right-click Recycle Bin on desktop and select Empty Recycle Bin Guide to Operating Systems, 4th ed.

  18. Deleting Temporary Files in Windows In Windows XP/Vista/7, Server 2003/R2, and Server 2008 R2, temporary files are typically located in the \Temp and |Windows\Temp folders, as well as other locations, such as in users’ home directories. In Windows XP and Windows Server 2003/Server 2003 R2, temporary Internet files from Internet Explorer are in the \Documents and Settings\accountname\Local Settings\Temporary Internet Files directory. Guide to Operating Systems, 4th ed.

  19. Deleting Temporary Files in Windows A convenient way to delete unneeded files in Windows OSs is to use the Disk Cleanup tool. In Windows 7 and Windows Server 2008 R2, you can start Disk Cleanup by: Clicking Start; Typing Disk Cleanup in the Search programs and files text box on the Start menu; Click Disk Cleanup. For Windows XP: Click Start; Point to All Programs; Point to or click Accessories; Point to or click System Tools; Click Disk Cleanup. Guide to Operating Systems, 4th ed.

  20. Deleting Temporary Files in Windows Starting Disk Cleanup in Windows 7 Guide to Operating Systems, 4th ed.

  21. Deleting Temporary Files in Windows When you start Disk Cleanup, it scans your disk to determine the amount of space that can be restored after cleaning (removing) specific types of files. Downloaded program files Temporary Internet files Offline Web pages; Hibernation file cleaner (In Windows Vista only) Debug dump files; Recycle Bin Setup log files System error memory dump files Temporary files Thumbnails Guide to Operating Systems, 4th ed.

  22. Deleting Temporary Files in Windows When you start Disk Cleanup, it scans your disk to determine the amount of space that can be restored after cleaning (removing) specific types of files. Per user archived Windows Error Reporting (WEP) files; Per user queued Windows error reporting; Systen archived Windows Error Reporting; Catalog files for the Content Indexer (Windows XP); Web Client/publisher temporary files (Windows XP); Other temporary files depending on installed applications. Guide to Operating Systems, 4th ed.

  23. UNIX/Linux • View UNIX/Linux files by using the ls command • Some of the options that can be used with this command: • -a lists all files including hidden files • -C formats the listing in columns for easier reading • -d lists directories • -f displays files in an unsorted list • -l presents detailed information including permissions and file size • -r sorts files in reverse alphabetical order • -s displays the size of files (in blocks) • -S sorts files and directories on the basis of size • -t sorts files and directories on the basis of time they were last modified • Example: ls –a lists all files including hidden files Guide to Operating Systems, 4th ed.

  24. UNIX/Linux Linux with GNOME desktop allows you to view files through a graphical interface Guide to Operating Systems, 4th ed.

  25. UNIX/Linux Files and folders are deleted by using the remove (rm) command Options for this command: -i for interactive option (asks if you are sure you want to delete) -r for recursive (used to delete the entire directory contents) Example: rm /home/mjackson/docs *.txt This command will delete all files with a .txt extension in the mjackson directory In the Linux GNOME Nautilus tool, you delete a file by finding the file, click on it and press the delete key on your keyboard Guide to Operating Systems, 4th ed.

  26. UNIX/Linux A file can be found by using the find command Options that can be used with this command: -atime for last access time -ctime for last changed time -mtime for last modification time -name for the filename, including the use of wildcard searches -print to print the results of the find -size for file size (in blocks or bytes; with bytes specified by a “c”) -user to find files by ownership Example: to find a all files in directory/usr that are owned by the user lpadron: find / -user lpadron Guide to Operating Systems, 4th ed.

  27. UNIX/Linux UNIX/Linux provides commands to help you assess the allocation of disk space: df – enables you to view information on the basis of the file system. It provides statistics on the total number of blocks, the number used, the number available, and the % of capacity used. du – used to display statistics for a given directory and its subdirectories, or for a subdirectory alone. Guide to Operating Systems, 4th ed.

  28. UNIX/Linux On a UNIX/Linux computer that acts as a server, the administrator can set up disk quotas. A disk quota can be established in blocks for each user as a way to ensure that users do not occupy all of the disk space. A disk quota is set by using the edquota command that opens the quota file for editing. The quota file must first be created by the administrator, or in some versions of UNIX/Linux, it is created automatically when you first use edquota. Guide to Operating Systems, 4th ed.

  29. UNIX/Linux UNIX/Linux disk quotas for server users Guide to Operating Systems, 4th ed.

  30. Mac OS X Mac OS X Leopard and Snow Leopard are generally effective in automatically cleaning out temporary files on a regular basis. However, it is still important to periodically find and delete unneeded files. Guide to Operating Systems, 4th ed.

  31. Mac OS X Displaying file sizes in Mac OS X Snow Leopard Guide to Operating Systems, 4th ed.

  32. Maintaining Disks • It is important to perform disk maintenance in order to maintain the integrity of files and to ensure disk performance. • Important disk maintenance tasks include: • Defragmenting disks • Moving files to spread the load between multiple disks • Using disk utilities to find and repair damaged files • Deploying RAID techniques that extend the life of disks and provide disk redundancy Guide to Operating Systems, 4th ed.

  33. Defragmenting Disks Fragmentation – means that unused space develops between files and other information written on a disk When an OS is first installed, files are placed contiguously on a disk (little or no unused space between files) Guide to Operating Systems, 4th ed.

  34. Defragmenting Disks Files located contiguously on a disk Guide to Operating Systems, 4th ed.

  35. Defragmenting Disks As the OS deletes files, creates new files, and modifies files, the unused space between them grows and becomes scattered. The greater the fragmentation, the more space is wasted. The disk read/write head must move over more disk area to find individual files and data in files. Guide to Operating Systems, 4th ed.

  36. Defragmenting Disks When the disk read/write head must move over more disk area to find information, two problems result: The read/write head works harder when there is more disk fragmentation, resulting in a possible hardware failure. The problem is apparent through excessive noise and hard disk activity. Guide to Operating Systems, 4th ed.

  37. Defragmenting Disks A fragmented disk Guide to Operating Systems, 4th ed.

  38. Defragmenting Disks Defragmentation – the process of removing the empty pockets between files and other information on a hard drive. Two ways to defragment: Older method is to take a complete backup of a disk’s contents and perform a full restore. Some administrators run a surface analysis of a disk before the restore to find damaged disk sectors and tracks. Some surface analysis tools are destructive to data and attempt to reformat the damaged area to determine if it can be recovered. Others are not destructive to data because they relocate information from a damaged disk area to an undamaged location, and then mark the damaged area as off limits so that no files can be written there. Guide to Operating Systems, 4th ed.

  39. Defragmenting Disks Two ways to defragment: Another option is to run a disk defragmentation tool. Many OSs come with a built-in defrag tool. Some can run in the background as you use your computer. Some perform a quick analysis to see if defrag is even needed. If disk fragmentation is 20% or less, defrag is not needed. Guide to Operating Systems, 4th ed.

  40. Defragmenting Disks You can start Disk Defragmenter and analyze a disk for fragmentation in any of these Windows OSs by: Click Start; Point to All Programs; Point to or click Accessories; Point to or click System Tools; Click Disk Defragmenter. Guide to Operating Systems, 4th ed.

  41. Defragmenting Disks To determine if a disk or volume needs to be defragmented, click the disk and click Analyze (in Windows 7 or Server 2008 R2) in the Disk Defragmenter window. In Windows Vista and Server 2008 you will not see a listing of disks or the Analyze or Analyze disk button because an analysis is done automatically when Disk Defragmenter is started. Guide to Operating Systems, 4th ed.

  42. Defragmenting Disks In UNIX/Linux and Mac OS X, file systems are designed to reduce the need for defragmenting a disk These OSs first write to a hidden journal, which is loaded into memory and then the contents are written to disk in a linear fashion, not a sequential fashion. Linear – data is temporarily stored and written all at one time in more contiguous spaces. These file systems can use methods, such as writing to consecutive space and writing to existing fragmented areas, to minimize fragmentation. Sequential – data is not stored but written as soon as it is created and therefore written to whatever disk areas are immediately open. Defragmentation tools are usually not included with these Oss.

  43. Defragmenting Disks Earlier version of Mac OS and Mac OS X had problems with memory fragmentation. Pockets of unused space developed in memory. Receiving a message that there is not enough memory can be an indication of memory fragmentation. Mac OS X Leopard and Snow Leopard use much improved malloc (memory allocation tools) subroutines in the OS to better address memory fragmentation so that the user typically does not experience this problem.

  44. Defragmenting Disks Should the user experience messages indicating there is not enough memory, there are four ways to handle possible memory fragmentation: Implement virtual memory. Close all open applications. Shut down and restart the computer. Open your least-used applications first and the most used applications last. Close the applications in the reverse order in which they were opened.

  45. Moving Disk Files to Spread the Load • A technique that can help extend the life of disk drives is to spread files evenly across disks when there is more than one disk. • Usually used in servers. • Before files are moved, the server administrator examines disk and file activity to determine how to spread files across the disk drives to achieve even loading in terms of activity. • Files must be moved on the basis of their functions so that files containing related information are on the same drive. • Disk activity is monitored in Windows OSs using Performance Monitor. • Resources in use can be viewed with the Computer Management tool in Windows. Guide to Operating Systems, 4th ed.

  46. Moving Disk Files to Spread the Load Studying resource use in Windows 7 using the Computer Management Tool Guide to Operating Systems, 4th ed.

  47. Using Disk Utilities to Repair Damaged Files • The following utilities enable you to repair damaged files and file links: • Disk First Aid in the Mac OS X Disk Utility • fsck and p_fsck in UNIX/Linux • chkdsk in Windows • Disk First Aid – verifies files, folders, and mounted disks. • Will also repair a disk and disk permissions • Disk First Aid is combine with the Disk Utility Guide to Operating Systems, 4th ed.

  48. Using Disk Utilities to Repair Damaged Files • Disk First Aid • To access Disk First Aid from Finder: • Click Go; • Click Utilities; • Double-click Disk Utility; • Select a disk; • Access the First Aid tab. Guide to Operating Systems, 4th ed.

  49. Using Disk Utilities to Repair Damaged Files fsck utility – used to check one or more file systems Looks for orphaned files without names; Bad directory pointers; Inode problems; Directories that do not exist; Bad links; Bad blocks; Duplicated blocks; Pathname problems. If it finds problems – it gives you the opportunity to fix or disregard the problem. Guide to Operating Systems, 4th ed.

  50. Using Disk Utilities to Repair Damaged Files fsck utility To use fsck: Enter the command along with a file list. p_fsck utility – checks two or more file systems simultaneously (instead of one at a time) Should not be applied to the root file system Guide to Operating Systems, 4th ed.

More Related