OS CH 12 Mass Stogare
OS CH 12 Mass Stogare
Hard disk is a rigid non-removable magnetic disk with a large data storage capacity
(contains billions to trillions of bytes of data)
Hard disks can store data from 20MB to more than 1-TB (terabyte).
A hard disk/drive unit comes with a set rotation speed varying from 4,200
revolutions per minute to 15,000 rpm.
1. Disk platter
2. Surface
3. Spindle
4. Tracks
5. Sectors
6. Read/write head
Components
platter :- Platter is the circular disk on which magnetic data is stored in a hard disk .
• Each platter(disk) has a flat circular shape like a CD or DVD.
• Platter have two surface(upper & lower),both surface are covered by a magnetic material.
Hard disk platters are made of rigid metal, while "floppy" disks are made of
more flexible plastic.
Each platter has two working surfaces. Older hard disk drives would
sometimes not use the very top or bottom surface of a stack of platters, as
these surfaces were more susceptible to potential damage.
The collection of all tracks that are the same distance from the edge of the
platter, ( i.e. all tracks immediately above one another in the following
diagram ) is called a cylinder.
Each track is further divided into sectors, traditionally containing 512 bytes of
data each, although some modern disks occasionally use larger sector sizes.
CLV/CAV
The capacity of tracks(outer/inner) whether uniform or not depends on how disk surface
is organized and accordingly how disk rotation happens.
Disk can be rotated or organised in two modes:
Seek Time: Seek time is the time taken by the read/write head of
a disc to locate the specified track where the data is to be read or
write. So the disk scheduling algorithm that gives minimum
average seek time is better.
Disadvantages
Very Expensive
Less storage capacity SSD are available as compared to hard
disk
Magnetic tapes
Magnetic tapes were once used for common secondary storage
before the days of hard disk drives, but today are used primarily
for backups.
Multiple I/O requests may arrive by different processes and only one I/O request can
be served at a time by the disk controller. Thus other I/O requests need to wait in the
waiting queue and need to be scheduled.
Two or more request may be far from each other so can result in greater disk arm
movement.
Hard drives are one of the slowest parts of the computer system and thus need to be
accessed in an efficient manner.
Disk Scheduling Algorithms
Advantages:
Every request gets a fair chance
No indefinite postponement
Disadvantages:
Does not try to optimize seek time
May not provide the best possible service
Example:
Suppose the order of request is- (82,170,43,140,24,16,190)
And current position of Read/Write head is : 50
As a result, the request near the disk arm will get executed first.
SSTF is certainly an improvement over FCFS as it decreases the
average response time and increases the throughput of system.Let
us understand this with the help of an example.
Suppose the order of request is- (82,170,43,140,24,16,190)
And current position of Read/Write head is : 50
Disadvantages:
Overhead to calculate seek time in advance
Can cause Starvation for a request if it has higher seek time as compared
to incoming requests
High variance of response time as SSTF favours only some requests
SCAN
SCAN: In SCAN algorithm the disk arm moves into a particular
direction and services the requests coming in its path and after
reaching the end of disk, it reverses its direction and again services
the request arriving in its path.
So, the disk arm moves in a circular fashion and this algorithm is also
similar to SCAN algorithm and hence it is known as C-SCAN (Circular
SCAN).
Suppose the requests to be addressed are-82,170,43,140,24,16,190. And the
Read/Write arm is at 50, and it is also given that the disk arm should
move “towards the larger value”.
In CLOOK, the disk arm in spite of going to the end goes only to
the last request to be serviced in front of the head and then from
there goes to the other end’s last request.