0% found this document useful (0 votes)
11 views14 pages

DBMS 1 Disk Structure v2

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

DBMS 1 Disk Structure v2

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

DBMS Tutorial 24.10.

2018
Disks - Physical Structure
Platters : each individual disk. A hard disk contains several platters.

Surfaces : the two sides of each platter.

Tracks : concentric circles on a single platter

Cylinder : tracks at the same radius. Therefore total no. of cylinders = no. of tracks/surface

Sectors and Gaps : sectors are segments of the tracks separated by gaps that are not magnetized
- blank areas, help identity the beginning of a sector).

Read/Write heads : a head reads the bits (magnetic orientation) passing under it, and can also
alter the bits to write information on the disk. The heads are each attached to an arm, and the arms
for all the surfaces move in and out together, being part of the rigid head assembly.
In this example, since there are 4
platters (and therefore 8 surfaces) each
cylinder is made up of 8 tracks (of the
same radius)
Blocks and Granularity
Blocks are logical units of data that are transferred between disk and main
memory; blocks consist of one or more sectors. So, a "sector" is a physical unit of
the disk, while a "block" is a logical unit.
Some Videos

Copy-Paste from a hard drive

https://youtu.be/9eMWG3fwiEU?t=53

Inside a hard drive animation

https://youtu.be/n6uPALWAyxc?t=11

Detailed:

https://www.youtube.com/watch?v=kdmLvl1n82U
Disks Access Characteristics
Blocks (or the consecutive sectors that comprise the blocks) are read or written
when:

a) The heads are positioned at the cylinder containing the track on which the block
is located, and

b) The sectors containing the block move under the disk head as the entire disk
assembly rotates.
Disks Access Characteristics
Seek Time : the time to position the head assembly at the proper cylinder. Seek
time can be 0 if the heads happen already to be at the proper cylinder. If not, then
the heads require some minimum time to start moving and to stop again, plus
additional time that is roughly proportional to the distance traveled.

Rotational Latency : the time for the disk to rotate so the first of the sectors
containing the block reaches the head.

Transfer Time : the time it takes the sectors of the block and any gaps between
them to rotate past the head. If a disk has 250,000 bytes per track and rotates
once in 10 milliseconds, we can read from the disk at 25 megabytes per second.
Disks Access Characteristics : Max and Min
Seek Time

● Max: In the worst case, the head is positioned at the innermost cylinder, and the block we want to
read is on the outermost cylinder (or vice versa). For a disk with n cylinders, this means travelling
n-1 cylinders. For example: n=5000, seek time would be maximum if head moves from cylinder
number 1 to cylinder number 5000, or from 5000 to 1, total cylinders crossed would 5000-1.
● Min: 0, if the head is already at the right cylinder.

Rotational Latency
New Slide
● Max: Time for one whole revolution, the max rotational latency.
● Min: 0, if the head is already at the right block.

Transfer Time

● Is constant and there is no maximum or minimum. It will always be the same because time to
read/write a block is fixed.
Sample Exercise
A disk has 4 platters, 5000 tracks/surface and 40 sectors to a track. Capacity of a
sector is 512 bytes and 4 sectors make a block. Gaps take up 15% of the tracks.
Seek time is given by 1+0.004n ms(n= number of cylinders traversed). Speed is
5200rpm.

(a) Calculate the capacity of : A surface, a cylinder and a track?


(b) Max seek time.
(c) Max seek time if head is at 2000th cylinder.
(d) Rotational Latency : maximum and average.
(e) Transfer time.
Example 11.3 (DS:CB)
Example 11.3 : The Megatron 747 disk has the
following characteristics :

There are 8 platters providing 16 surfaces.


There are 214 = 16,384 tracks per surface.
There are 27 = 128 sectors per track.
There are 212 = 4096 bytes per sector.
Block size 214 = 16,384 bytes
Sectors make up 90% of the tracks. The disk rotates at 7200 rpm;
To move the head assembly between cylinders takes one millisecond to start and
stop, plus one additional millisecond for every 1000 cylinders traveled
Example 11.3 (DS:CB)
(a) Capacity of the disk?
Example 11.3 : The Megatron 747 disk has (b) Capacity of a track?
the following characteristics : (c) Blocks on a track?
(d) Time taken for one rotation?
There are 8 platters providing 16 surfaces. (e) The minimum & maximum times
There are 214 = 16,384 tracks per surface. to read a block?
There are 27 = 128 sectors per track. (f) Same as (e) if the head is at
There are 212 = 4096 bytes per sector. 2000th cylinder?
Block size 214 = 16,384 bytes
Sectors make up 90% of the tracks. The disk rotates at 7200 rpm;
To move the head assembly between cylinders takes one millisecond to start and
stop, plus one additional millisecond for every 1000 cylinders traveled
Exercise 11.3.1 (DS:CB)
The Megatron 777 disk has the following characteristics:
1. There are ten surfaces, with 10,000 tracks each.
2. Tracks hold an average of 1000 sectors of 512 bytes each.
3. 20% of each track is used for gaps.
4. The disk rotates at 10,000 rpm.
5. The time it takes the head to move n tracks is 1 + 0.001n milliseconds.

a) What is the capacity of the disk?


b) What is the maximum seek time?
c) What is the maximum rotational latency?
d) If a block is 16,384 bytes (i.e., 32 sectors), what is the transfer time of a block?
e) What is the average rotational latency?
Answers
Sample Exercise Example 11.3.: Exercise 11.3.1.:

(a) Capacity of a surface (a) 237 bytes (a) 51.2 GB


= 102.4 MB; Cap. of a (b) 512 kB (b) 10.99ms
Cylinder = 164 kB; (c) 4 (c) 6ms
Cap. of a track = 20kB (d) 8.3ms (d) 0.19ms
(b) 20.99 ms
(e) 25.93ms, (e) 3ms
(c) 13ms
0.25ms
(d) 11.5ms
(e) 1.1ms (f) 23.934ms,
0.25ms
(a) Surface = 512x40x5000 bytes
(a) 51.2 x 109 bytes
= 102.4 x 10 bytes =97.65 MB
= 47.6GB
Cylinder = 163840 bytes = 160kB

You might also like