0% found this document useful (0 votes)
5 views

Mass Storage Structure

Magnetic disks serve as the primary secondary storage in modern computers, utilizing platters coated with magnetic material to store data accessed by read-write heads. Disk scheduling algorithms, such as FCFS, SSTF, SCAN, and C-SCAN, optimize access times and minimize seek times for I/O requests. RAID structures enhance performance and reliability by using multiple disks, though they do not guarantee data availability due to potential software and hardware errors.

Uploaded by

bhaveshpenneru27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Mass Storage Structure

Magnetic disks serve as the primary secondary storage in modern computers, utilizing platters coated with magnetic material to store data accessed by read-write heads. Disk scheduling algorithms, such as FCFS, SSTF, SCAN, and C-SCAN, optimize access times and minimize seek times for I/O requests. RAID structures enhance performance and reliability by using multiple disks, though they do not guarantee data availability due to potential software and hardware errors.

Uploaded by

bhaveshpenneru27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

Mass-Storage Systems

Magnetic Disks
 Magnetic disks provide the bulk of secondary storage for modern computer systems.

 Each disk platter has a flat circular shape, like a CD.

 Common platter diameters range from 1.8 to 3.5 inches.

 The two surfaces of a platter are covered with a magnetic material. We store information by
recording it magnetically on the platters.

 A read–write head “flies” just above each surface of every platter.

 The heads are attached to a disk arm that moves all the heads as a unit.

 The surface of a platter is logically divided into circular tracks, which are subdivided into sectors.

 The set of tracks that are at one arm position makes up a cylinder.

 There may be thousands of concentric cylinders in a disk drive, and each track may contain
hundreds of sectors.

 The storage capacity of common disk drives is measured in gigabytes.


Moving-head Disk Mechanism
When the disk is in use, a drive motor spins it at high speed.

Most drives rotate 60 to 250 times per second, specified in terms of rotations per minute (RPM).

Common drives spin at 5,400, 7,200, 10,000, and 15,000 RPM.

Disk speed has two parts.

The transfer rate is the rate at which data flow between the drive and the computer.

The positioning time, or random-access time, consists of two parts:

the time necessary to move the disk arm to the desired cylinder, called the seek time, and

the time necessary for the desired sector to rotate to the disk head, called the rotational latency.

Although the disk platters are coated with a thin protective layer, the head will sometimes damage
the magnetic surface.

This accident is called a head crash. A head crash normally cannot be repaired; the entire disk must
be replaced.
Disk Scheduling
 The operating system is responsible for using hardware efficiently — for the disk
drives, this means having a fast access time and disk bandwidth

 Minimize seek time

 Seek time  seek distance

 Disk bandwidth is the total number of bytes transferred, divided by the total time
between the first request for service and the completion of the last transfer

Disk Scheduling
There are many sources of disk I/O request
(Cont.)
 OS
 System processes
 Users processes
 I/O request includes input or output mode, disk address, memory address, number of sectors to
transfer
 OS maintains queue of requests, per disk or device
 Idle disk can immediately work on I/O request, busy disk means work must queue
 Optimization algorithms only make sense when a queue exists
 Several algorithms exist to schedule the servicing of disk I/O requests
 The analysis is true for one or many platters
 We illustrate scheduling algorithms with a request queue (0-199)

98, 183, 37, 122, 14, 124, 65, 67

Head pointer 53
FCFS
Illustration shows total head movement of 640 cylinders
SSTF
 Shortest Seek Time First selects the request with the minimum seek time from the
current head position

 SSTF scheduling is a form of SJF scheduling; may cause starvation of some requests

 Illustration shows total head movement of 236 cylinders


SSTF
SCAN
 The disk arm starts at one end of the disk, and moves toward the other end, servicing requests
until it gets to the other end of the disk, where the head movement is reversed and servicing
continues.

 SCAN algorithm Sometimes called the elevator algorithm

 Illustration shows total head movement of 208 cylinders

 But note that if requests are uniformly dense, largest density at other end of disk and those
wait the longest.
SCAN (Cont.)
C-SCAN
 Provides a more uniform wait time than SCAN

 The head moves from one end of the disk to the other, servicing requests as it goes
 When it reaches the other end, however, it immediately returns to the beginning of
the disk, without servicing any requests on the return trip

 Treats the cylinders as a circular list that wraps around from the last cylinder to the first
one

 Total number of cylinders?


C-SCAN (Cont.)
LOOK & C-LOOK
 As we described them both SCAN and C-SCAN move the disk arm across the full width of
the disk In practice , neither algorithm is often implemented this way.

 More commonly If the arm goes only as far as the final request in each direction. Then, it
reverses direction immediately without going all the way to the end of the disk

 LOOK a version of SCAN, C-LOOK a version of C-SCAN, they look for a request before
continuing to move in a given direction

 Arm only goes as far as the last request in each direction, then reverses direction
immediately, without first going all the way to the end of the disk
C-LOOK (Cont.)
Selecting a Disk-Scheduling Algorithm
 SSTF is common and has a natural appeal because it increases performance over FCFS.

 SCAN and C-SCAN perform better for systems that place a heavy load on the disk

 Less starvation

 Performance depends on the number and types of requests.


 For instance, suppose that the queue usually has just one outstanding request. Then, all
scheduling algorithms behave the same, because they have only one choice of where to
move the disk head: they all behave like FCFS scheduling
 Requests for disk service can be greatly influenced by the file-allocation method. A
program reading a contiguously allocated file will generate several requests that are close
together on the disk, resulting in limited head movement.
 A linked or indexed file, in contrast, may include blocks that are widely scattered on the
disk, resulting in greater head movement.
 The disk-scheduling algorithm should be written as a separate module of the operating
system, allowing it to be replaced with a different algorithm if necessary

 Either SSTF or LOOK is a reasonable choice for the default algorithm


RAID Structure
 Disk drives have continued to get smaller and cheaper, so it is now economically feasible to attach
many disks to a computer system.
 Having a large number of disks in a system presents opportunities for improving the rate at which
data can be read or written, if the disks are operated in parallel.
 Furthermore, this setup offers the potential for improving the reliability of data storage, because
redundant information can be stored on multiple disks.

 Thus, failure of one disk does not lead to loss of data. A variety of disk-organization techniques,
collectively called redundant arrays of independent disks (RAID), are commonly used to
address the performance and reliability issues.

 In the past, RAIDs composed of small, cheap disks were viewed as a cost-effective alternative to
large, expensive disks.

 Today, RAIDs are used for their higher reliability and higher data-transfer rate, rather than for
economic reasons.

 Hence, the I in RAID, which once stood for “inexpensive,” now stands for “independent.”
RAID Levels
RAID 0 provides the performance, while RAID 1 provides the reliability. Generally, this
level provides better performance than RAID 5.
Selecting a RAID Level
 level 0 is used in high-performance applications where data loss is not
critical.
 level 1 is popular for applications that require high reliability with fast
recovery.
 RAID 0 + 1 and 1 + 0 are used where both performance and reliability are
important—for example, for small databases.
 Due to RAID 1’s high space overhead, RAID 5 is often preferred for storing
large volumes of data.
 Level 6 is not supported currently by many RAID implementations, but it
should offer better reliability than level 5.
 Rebuilding is easiest for RAID level 1, since data can be copied from
another disk. For the other levels, we need to access all the other disks in
the array to rebuild data in a failed disk.
 Rebuild times can be hours for RAID 5 rebuilds of large disk sets.
Problems with RAID
 Unfortunately, RAID does not always assure that data are available for the
operating system and its users.
 A pointer to a file could be wrong, for example, or pointers within the file
structure could be wrong.
 Incomplete writes, if not properly recovered, could result in corrupt data.
 Some other process could accidentally write over a file system’s structures,
too.
 RAID protects against physical media errors, but not other hardware and
software errors.
 As large as is the landscape of software and hardware bugs, that is how
numerous are the potential perils for data on a system.

You might also like