Chapter 12.3 Mass-Storage SystemsChapter 12-3 Mass-Storage SystemsDisk ManagementSlide 4Disk Management – Preliminary CommentsDisk Management – Disk FormattingDisk Management – Disk SectorsSlide 8Disk Management – Low-Level FormattingSlide 10Slide 11Disk Management – Low-Level Formatting- Raw DiskDisk Management – That Boot BlockWindows 200 Boot ApproachBooting from a Disk in Windows 2000Bad Blocks – IDE ControllersBad Blocks – SCSI ControllersBad Blocks – SCSI Controllers – moreSwap Space ManagementSwap-Space ManagementSwap Space Management - IntroductionSwap Space UseSwap Space LocationRAIDRedundant Arrays of Independent Disks (RAID)Redundant Arrays of Inexpensive Disks (RAID)Improvement in Performance via ParallelismEnd of Chapter 12.3Chapter 12.3 Mass-Storage SystemsChapter 12.3 Mass-Storage Systems.2/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsChapter 12-3 Mass-Storage SystemsChapter 12-3 Mass-Storage SystemsChapter 12-1:Overview of Mass Storage StructureChapter 12-2:Disk AttachmentDisk SchedulingChapter 12-3: Disk Management Swap-Space Management RAID StructureChapter 12-4Stable-Storage ImplementationTertiary Storage DevicesOperating System IssuesPerformance Issues.3/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDisk ManagementDisk Management.4/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDisk ManagementDisk ManagementWe will discuss three very important topics:Disk FormattingBoot Blocks, and Bad Blocks.5/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDisk Management – Preliminary CommentsBefore a disk is first put into use, it must be formatted.But the disk can (and does, typically) support a variety of often diverse uses – fromOperating system needs andUser needs, and Certain specialized needs for sometimes special applications.So, the disk must / can be formatted in a number of ways – and is.Further, when disks are manufactured and sent out for use, they often have bad spots (bad sectors).This is the normThus any kind of formatting must account for bad spots on the disk and map logical blocks into physical sectors.So, there’s a lot of important information in this section..6/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDisk Management – Disk FormattingInitially a disk is divided into sectors that the disk controller can read from and write to.Recall: the disk controller is itself a small, very specialized processor and executes a restricted instruction set. The instruction set deals primarily with instructions dealing with I/O and instructions dealing with device operations themselves.Instructions include requests such as: input and output (open, close, read, write, etc. and additional instructions needed to control and manage the disk operations (is device ready; timing; much more)As stated in previous lectures, instructions to the disk controller and other low level privileged instructions take the form of ‘commands’ and ‘instructions’ (depends on the computing system)Commands handled interpretively; Instructions – generally assembler level – are a bit different..7/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDisk Management – Disk SectorsFormatting the disk into sectors is referred to as low-level formatting.Typical sector size is 512 bytes; others are available, such as 256 bytes, 1024 bytes (IK) and others. 512 is the norm.Each sector itself contains a specific data structure consisting of a header, body of the sector, and a trailer.Headers and Trailers are used for control information needed by the disk controller. These typically include:Sector number (can check against the request for I/O) - Usually found in header.Error Correction Codes (ECC) - Usually found in trailerData area itself – generally 512 bytes..8/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDisk Management – Disk SectorsThe error correcting code (not exactly the same as those used in main memory – but the thinking and specific bits are very similar…) is generated when data is written to the data portion.There are a variety of formulas used in generating ECCs.When a read takes place, the hardware calculates the code based on the number and position of specific bitsand compares it to the code stored in the sector.If different, the sector is somehow corruptedBecause the ECC is error-correcting, the bit (hopefully one) may be both identified (detected) and corrected.This is called a soft error and this phenomenon is passed on to system administrators and tech reps for maintenance concerns.We talk a lot about ECC, parity, redundancy and more when we discuss RAID ahead...9/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDisk Management – Low-Level FormattingUsually the disk is low-level formatted as part of production.Part of this formatting includes a process to designate a number of bytes of the data portion of a sector. Header and trailer sizes are generally fixed because they are hardware processed.As stated, the disk may be ‘divided’ into specific portions of the disk (called partitions) which may be used for specific needs. Because of the physical characteristics of disk access, partitions are normally allocated ‘in cylinders.’Each partition is essentially a separate logical disk.Three typical partitions arePartition for the operating system’s executable codePartitions for user filesOften, partition(s) of raw disk..10/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDisk Management – Low-Level FormattingGiven that three (or more) partitions are established, these partitions need to be made ready.After partitioning, step 2 is logical formatting (creation of a file system).Here, the OS needs to establish several data structures for control and management.These partitions are initialized and include structures such as empty directories and other structures (like memory maps) to be used to manage free and allocated regions necessary during normal operations. In truth, there is much more than just these….11/38Silberschatz, Galvin and Gagne ©2005Operating System ConceptsReally – much more is done depending on the OSAre we using virtual memory?
View Full Document