Tuesday 19 January 2021

Magnetic Disks: Working Principles

 

Magnetic Disks:

 

Magnetic disks are the most popular direct access secondary storage device. They are also the most popular online secondary storage devices. A magnetic disk is a thin circular plate/ platter made of metal or plastic and coated on both sides with the recording material that can be magnetized such as iron oxide.

 

Data are recorded on a disk in the form of tiny invisible magnetized and non-magnetized spots (representing 1s and 0s) on the coated surfaces of the disk. A standard binary code, usually 8 bit EBCDIC, is used for recording data. The disk itself is stored in a specially designed protective envelope or cartridge, or several of them are stacked together in a sealed contamination free container.

 

Like magnetic tapes, magnetic disks can also be erased and reused indefinitely. Old data on a disk are erased automatically by recording your data in the same area. However, stored data can be read many times without affecting the data.

 

 

Principles of Operation:

 

Storage Organization:

 

The surface of a disk is divided into a number of invisible concentric circles called tracks. The tracks are numbered consecutively from outermost to innermost starting from zero. The number of tracks varies greatly between disks from as few as 40 on some low capacity disk to several thousand on high capacity disks.

 

In addition to the concentric circles, a disk’s surface is also divided into invisible pie shaped segments.  Hence, if there are 10 such pie shaped segments, each track will be divided into 10 parts. Each of these 10 portions of a track is called a sector.


Tracks and Sectors on a disk


A sector typically contains 512 bytes. It is the smallest unit with which any disk drive works. That means, disk drives are designed to access (read/ write) a complete sector at a time. Even if a computer needs to change just one byte out of the 512 bytes stored on a sector, it rewrites the entire sector.

 

When people refer to the number of sectors a disk has, the unit they use is sectors per track - not just sectors. Hence, if a disk has 200 tracks and 8 sectors per track, it has 1600 (200x8) sectors - not 8 sectors.  Each sector of a disk is assigned a unique number.

 

To access a piece of data (record) stored on disk, the record’s disk address must be specified. A disk address represents the physical location of a record on the disk and it comprises of sector number, track number, and surface number (when double sided disks are used).

 

Often, multiple disks are stacked and used together to create large capacity disk storage systems. In this case, a set of magnetic disks is fixed to a central shaft, one below the other, to form a disk pack.


Disk pack illustration


The disk pack is sealed and mounted on a disk drive consisting of a motor to rotate the disk pack about its axis. Disk drive also has an access arms assembly having separate read/ write heads for each surface of the disk pack on which data can be recorded.

 

Normally, the upper surface of the topmost disk and the lower surface of the bottommost disk are not used in a disk pack because these surfaces may be scratched easily. However, this drawback has been eliminated in modern disk drives using miniaturization and precision components.

 

For faster access of data from disk packs, a concept called cylinder is used for data organization on disk packs. The disk address of data record on such a disk comprises of sector number, cylinder number, and the surface number (track number is not required because track number and cylinder number are same). This scheme is called the CHS addressing or Cylinder – Head – Sector addressing. The same is also referred to as disk geometry.

 

Storage Capacity:

 

Storage capacity of a disk is a multiple of a number of recording surfaces, number of tracks per surface, number of sectors per track, and number of bytes per sector. That is,

 

Storage capacity of a disk system= number of recording surfaces x number of tracks per surface x number of sectors per track x number of bytes per sector

 

Access Mechanism:

 

Most disk drives have a single read/write head for each disk surface. However, some faster disk systems use multiple heads on each access arm to service a number of adjacent tracks simultaneously.


Disk system


In case of a disk pack each usable surface has its own read/write head and all the heads move together. The read/write heads are of flying type. They do not have direct contact with the disk surfaces. A separation of about 0.00002 inch is maintained between a read/write head and its corresponding disk surface.

 

A head crash, in which the head touches the disk, destroys the data stored in the area of the crash and can destroy a read write/head as well.

 

 

Access Time:

 

Disk access time is the interval between the time a computer makes a request for transfer of data from a disk system to primary storage and the time this operation is completed. To access data stored on a disk, disk address of the desired data is specified in terms of surface/head number, track/cylinder number, and sector number. Disk access time depends on the following three parameters:

 

  1.  Seek Time:

 

As soon as a disk unit receives a read/write command, it positions the read/write heads on the specified track (cylinder) number first by moving the access arms assembly in the proper direction. The time required to position the read write head over the desired track/cylinder is called seek time.  Seek time varies depending on the position of the access arms assembly when a read/write command is received. It is of the order of 10 to 100 milliseconds.

 

  1. Latency:

 

Once the heads are positioned on the desired track, the head on the specified surface is activated. Since the disk is continuously rotating, this head should wait for the desired data to come under it. This rotational waiting time i.e. the time required to spin the desired sector under the head is called latency.

 

Latency, also known as a rotational delay time, is also a variable and it depends on the distance of the desired sector from the initial position of the head on the specified track. It also depends on the rotational speed of the disk that may be anywhere from 300 rpm to 7200 rpm. Modern ultra-fast disks can reach 10K rpm or more. An average latency time is thus normally specified and is of the order of 5 to 80 milliseconds.

 

  1. Transfer Rate:

 

Transfer rate refers to the rate at which data is read from or written to a disk. Once the read/write head is positioned over the address sector, the desired data is read/written at a speed determined by the rotational speed of the disk. If the rotational speed of a disk is 3600 rpm and the disk has 125 sectors/track with 512 bytes/sector, the amount of data transferred in one full revolution of the disk will be  125 x 512 =  64000 bytes = 64K bytes (approx.).

 

The transfer rate of a disk system depends on the density of stored data and rotational speed of the disk. Since access time for a piece of data stored on a disk depends on its physical location, it is more correct to refer to a disk system as a direct access storage device instead of random access storage device.

 

 

Disk Formatting:

 

Magnetic disks come in different sizes. The size of a disk is usually referred to by its diameter. Typical disk size include those with 14 inch, 9 inch, 8 inch,5 ¼  inch, 5 ½  inch, 3 ¼  inch diameter.

 

In a concept called as low level disk formatting, before a disk can be used with a computer system, it must first be prepared by the computer system. For this, the raw (unformatted) disk is inserted in the disk drive on the computer system and the disk formatting command is initiated.  In this process, the disk drive’s read/write head lays down a magnetic pattern on the disk’s surface. This pattern enables the disk drive to organize and store data in the data organization defined for the disk drive.

 

However, modern disk drives do not require low level formatting as the disk controller can present a consistent view of disk geometry to the computer while hiding the internal hardware arrangement.

 

In order to store files and data on a disk, a file system has to be created on the disk.  The Operating System maintains a table with the sector and track locations of data on the disk. This table, known as File Allocation Table (FAT), enables the computer to locate data easily. The Operating System’s disk formatting command takes care of scanning and marking bad sectors, creating the FAT, and setting aside sufficient disk space for it.

 

 

Disk Controller:

 

A disk drive is connected to and controlled by a disk controller that interprets the commands for operating the disk drive. Since disk is a direct access storage device, the disk controller typically supports only Read and Write commands. The disk address consisting of surface number, cylinder/ track number, and sector number needs to be specified as parameters to the disk Read and Write commands.  Often, a disk controller is connected to and controls more than one disk drive. In this case, the disk drive number must also be specified as a parameter to the read and write commands.


No comments:

Post a Comment