Monday, 28 July 2014

COBOL How the data in a sector is read or written.

When a disk drive is in operation, the disks on the spindle rotate at a high speed. To read or write the sectors on the disks, an actuator moves the read/write heads to the appropriate track. Refer below figure for more details.

The actuator for a disk drive has one read/write head for each recording surface. This actuator can move to any track on the disk surfaces. When the actuator moves, all of the read/write heads move at the same time. 

As a result, the read/write heads are always positioned on the same track on the recording surfaces of the disk. The tracks that are positioned under the read/write heads can be referred to as a cylinder. 

As a result, a disk drive has as many cylinders as it has tracks on the recording surfaces. Only one read/write head can be turned on at one time. As a result, the data on only one track can be read or written at one time.

How a sector is read or written. 

  • The actuator moves to the cylinder that the sector is in. This is called actuator movement.
  • The read/write head for the disk surface that contains the sector is turned on.
  • The disk drive waits until the sector rotates around to the read/write head. This is called rotational delay.
  • The read/write head reads the sector into internal storage or writes the data from internal storage to the sector.

Application Perfomance Factor.

  • Most business applications spend far more time reading and writing data than they spend processing it. As a result, the efficiency of a system or a program depends to a large extent on the efficiency of the I/O operations.
  • When you design a system or write a new program, you should try to minimize actuator movement because that’s the access step that takes the most time.  

Created with Artisteer

No comments:

Post a comment