What is interleaving?
Interleaving is the technique to avoid another full rotation of a disk when retrieving a data from a sector in disk.
You can also read this defitinion from Webopedia, http://www.webopedia.com/TERM/I/interleaving.html
So for example, if sectors are being interleaved, this means that if they are stored, basically, into a factor of 1:4, if the next data to be retrieved is on sector 5 from sector 1, if sectors are arranged like this,
1 8 6 4 2 9 7 5 3
Then it don't need anymore to wait for another spindle or full revolution of the disk.
This is what Wikipedia has explained,
Information is commonly stored on disk storage in very small pieces referred to as sectors or blocks. These are arranged in concentric rings referred to as tracks across the surface of each disk. While it may seem easiest to order these blocks in direct serial order in each track, such as 1 2 3 4 5 6 7 8 9, for early computing devices this ordering was not practical.
Data to be written or read is put into a special region of reusable memory referred to as a buffer. When data needed to be written, it was moved into the buffer, and then written from the buffer to the disk. When data was read, the reverse took place, transferring first into the buffer and then moved to where it was needed. Most early computers were not fast enough to read a sector, move the data from the buffer to somewhere else, and be ready to read the next sector by the time that next sector was appearing under the read head.
When sectors were arranged in direct serial order, after the first sector was read the computer may spend the time it takes, for example, for three sectors to pass by before it is ready to receive data again. However with the sectors in direct order, sector two, three, and four have already passed by. The computer doesn't need sectors 4, 5, 6, 7, 8, 9, or 1, and must wait for these to pass by, before reading sector two. This waiting for the disk to spin around to the right spot slows the data transfer rate.
To correct for the processing delays, the ideal interleave for this system would be 1:4, ordering the sectors like this: 1 8 6 4 2 9 7 5 3. It reads sector 1, processes for three sectors whereby 8 6 and 4 pass by, and just as the computer becomes ready again, sector two is arriving just as it is needed. Sometimes the interleave is expressed as a "skip factor",[1][2] the number of physical sectors between consecutive logical sectors.
A skip factor of 0 places the sectors sequentially—1 2 3 4 5 6 ... .
Modern disk storage does not need interleaving since the buffer space is now so much larger. Data is now more commonly stored as clusters which are groups of sectors, and the data buffer is sufficiently large to allow all sectors in a block to be read at once without any delay between sectors.
Comments
Post a Comment