Presentation on theme: "1 File and Disk Maintenance. 2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on."— Presentation transcript:
2 File Systems A file system defines the structure and the rules used to read, write, and maintain information stored on a disk. Which system used is determined by; Hardware Software Security needs Need for a dual-booting system
3 FAT??? file allocation table – where the OS records how the disk space is used
4 File Systems FAT 16 – oldest, created for DOS, supported by most OSs, cannot be installed on partitions larger than 2 GB, or on hard drives larger than 4GB. FAT 32 – supports disks from 512 to 2TB, compatible with Windows 98 and up NTFS – (new technology file system) – better file security (Encrypting File System), disk compression, logging features, reliability and stability. NTFS volumes can not be accessed by DOS, or Windows 95 or Windows 98.
5 File Systems èThe operating system keeps track of data (documents, pictures, etc.) by placing it into a file. èTo store and retrieve files: è Disk divided into tracks è Tracks are divided into sectors è Sectors grouped into clusters è Number of sectors in a cluster is determined by è Size of the hard drive è File allocation system – FAT, FAT32, NTFS, e
6 When you format a disk the operating systems creates concentric recording bands, called tracks, around the circumference of the disk. Then, the formatting program (in our case Windows XP) subdivides each track into equal parts, called sectors. Although not all of them are shown in the following diagram, there are 80 concentric tracks on a 3 ½ inch high density diskette and each track is divided into 18 sectors. Each sector in turn contains 512 bytes. So lets see..... 80 tracks X 18 sectors X 2 sides X 512 bytes = 1,474,560 bytes = 1.4 MB
8 A hard disk has extremely smooth metal or glass plates called platters (vs. the floppy mylar disk of a floppy disk). Each platter is divided into tracks and sectors by the format operation, like a floppy disk, however the number of tracks and sectors is different. The number of tracks on a hard disk depends on the disk size and the manufacturer.
9 A cluster, also known as an allocation unit, consists of one or more sectors of storage space, and represents the minimum amount of space that an operating system allocates when saving the contents of a file to a disk. The number of sectors per cluster is dependent on Type of disk (floppy disk, hard disk) Version of operating systems Size of disk Every sector contains 512 bytes. (NTFS does allow you to change this number.) The number of clusters per disk is determined by the filing system (FAT 16, FAT 32 or NTFS). Clusters?
11 Example - File size = 2KB Hard drive = 2GB FAT 16 – the file will use 1 cluster which is 64 sectors, so 64 X 512 bytes per sector = 32KB – 2KB = 30KB slack space FAT 32 – the file will use 1 clusters which is 8 sectors, so 8 X 512 bytes per sector = 4KB – 2KB = 2KB slack space NTFS – the file will use 1 cluster which is 4 sectors, so 4 X 512 bytes per sector = 2KB – 2KB = 0 slack space
12 So, what does this all mean to us, as Windows XP users? The bigger your disk – the bigger your clusters (because there is a maximum number of clusters per disk). One way to help alleviate the problem of slack space is to partition the hard drive into smaller drives. Reducing the drive size will reduce the cluster size.
13 So what can cause problems with a Disk? Physical hard drive problems: Wear and tear on hard disk - Minimize with Power Management and/or Hibernation Head crash - Minimize by placing system where it will not get knocked around. Software-related problems: Viruses -Minimize by using virus protection software Some error causing conditions to data that may be repairable: è Power surges è Power outages è Locked system
14 Cleaning Up Your Disk Computer performance depends a great deal on the hard drive. Need disk space for: New files Temporary files Documents waiting to be printed Cache files Cache – storage area for often used information that can be accessed quickly Recycle
15 Cleaning Up Your Disk Disk cleanup is a utility that helps maintain the hard disk. Intended for hard drives. Will remove the following; Internet cache files Downloaded program files Offline web pages Offline lines, & temporary offline files Temporary files Files in the recycle bin Windows components that you no longer use Installed programs that you no longer use Catalog files for the Content Indexer
16 Check Disk The Check Disk utility is a disk analysis and repair utility that examines disks for errors and, where possible, repairs errors. Checks the logical structure Checks the physical integrity of the disks surface, if it finds a bad sector it will attempt to move the data to another location. Take care of Lost Clusters
17 What are lost clusters? Lost Clusters: Have no directory entry in directory table Do not belong to any file Take up disk space - Unavailable for new data Cannot be retrieved/deleted Reasons for Lost Clusters Not exiting program properly Power surge/failure
19 Check Disk can fix lost clusters è Can fix lost clusters automatically or è Save them to disk as files Side note: You can check if you have lost clusters by clicking on a file and comparing the file size in explorer window to status bar files size.
20 Check Disk continued è CAN check/repair local hard drives, floppy disks, and removable drives è CANNOT find/fix errors on CD- ROMs or network drives
21 Check Disk, continued Should be used on a regular basis è The first time you use it you should back up your disk before running check disk. è Close all open programs when using this program, including screen saver è If disk is formatted as NTFS, Windows XP Professional will automatically (without running Check Disk): è Log all file transactions è Replace bad clusters è Store copies of key information for all files on NTFS volume
22 Contiguous and Noncontiguous Files èWindows XP Professional keeps track of data by placing it into a file. èTo store and retrieve files: è Disk divided into sectors è Sectors grouped into clusters è Number of sectors in a cluster is determined by è Size of the hard drive è File allocation system – FAT, FAT32, NTFS, etc.
23 Contiguous and Noncontiguous Files When a file is deleted: è Only entries in FAT deleted è Space file occupied becomes available
24 Contiguous and Noncontiguous Files Files are: è Contiguous – written to adjacent clusters on a disk è Noncontiguous (fragmented) – written to a disk in nonadjacent clusters. So a Fragmented Disk has noncontiguous files. It takes longer to read a Fragmented Disk because the head must move around so much going to the various locations of the file clusters.
28 Defragmentation Rearranges the files on a disk so that all parts of each files are store in consecutive clusters. It also records the clusters for one file right after the clusters for another file, and in the process, removes free space between files that would result in more fragmentation. At the end of defragmentation all the unused space is near the inner edge of the disk.
29 Defragmentation, continued Prior to running Disk Defragmenter: è Run Check Disk and Disk Cleanup è Close All open programs è Allow ample time, can take hours – depends on how fragmented your disk is. è Back up disk