Difference between revisions of "Sector interleaving"
(Created page with "'''Interleaving''' is a technique for speeding up access to sequential data on rotating magnetic media. Data is written and read sector by sector on tracks on Flop...") |
(Clarify) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | ''' | + | '''Sector interleaving''' is a technique for speeding up access to sequential data on rotating magnetic media. |
− | + | It is useful because on [[floppy disk]]s and [[hard disk]]s, the time interval (for reading or writing), between the end of one [[sector]] on a [[track]], and the start of the next sector, was often less than the time needed for processing (reading) or delivering (writing) the data. If the sectors had been arranged with one immediately after the other on the data media, the following sector would already have started when the software went to deal with it, and so it could only have been processed after waiting a complete revolution of the media, for the desired sector to come around to the [[head]] again. However, if space is left between two logically consecutive sectors for the 'next' sector, multiple sectors can be read in a single revolution of the media. The process is called 'sector interleaving', or simply 'interleaving'. | |
− | + | ==Details== | |
There are two ways to express the number of sectors skipped: | There are two ways to express the number of sectors skipped: | ||
Line 14: | Line 14: | ||
The relationship between Skip Factor and Interleave Factor is simple: | The relationship between Skip Factor and Interleave Factor is simple: | ||
− | Skip Factor = Interleave Factor - 1 | + | Skip Factor = Interleave Factor - 1; e.g.: Interleave Factor = 3:1 => Skip Factor = 2 |
− | + | Examples for physical sector orders for an MFM disk with 17 sectors per track: | |
+ | |||
+ | * Interleave 2:1: <FONT COLOR="RED">1</FONT>, 10, <FONT COLOR="RED">2</FONT>, 11, <FONT COLOR="RED">3</FONT>, 12, <FONT COLOR="RED">4</FONT>, 13, <FONT COLOR="RED">5</FONT>, 14, <FONT COLOR="RED">6</FONT>, 15, <FONT COLOR="RED">7</FONT>, 16, <FONT COLOR="RED">8</FONT>, 17, <FONT COLOR="RED">9</FONT> | ||
+ | * Interleave 3:1: <FONT COLOR="RED">1</FONT>, <FONT COLOR="BLUE">7</FONT>, 13, <FONT COLOR="RED">2</FONT>, <FONT COLOR="BLUE">8</FONT>, 14, <FONT COLOR="RED">3</FONT>, <FONT COLOR="BLUE">9</FONT>, 15, <FONT COLOR="RED">4</FONT>, <FONT COLOR="BLUE">10</FONT>, 16, <FONT COLOR="RED">5</FONT>, <FONT COLOR="BLUE">11</FONT>, 17, <FONT COLOR="RED">6</FONT>, <FONT COLOR="BLUE">12</FONT> | ||
+ | |||
+ | Interleave Factors up to 4:1 were commonly used depending on controller capabilities. | ||
The disk controller, not the disk, sets the interleave factor. Some controllers can optionally implement different interleave factors at will. Choosing a wrong interleave factor degrades read/write performance significantly. Changing the interleave factor requires a low-level format. | The disk controller, not the disk, sets the interleave factor. Some controllers can optionally implement different interleave factors at will. Choosing a wrong interleave factor degrades read/write performance significantly. Changing the interleave factor requires a low-level format. | ||
+ | |||
+ | {{semi-stub}} | ||
+ | |||
+ | ==External links== | ||
+ | |||
+ | * [https://superuser.com/questions/1562649/whats-the-difference-between-sector-interleave-and-sector-skew-and-are-both-ev What's the difference between sector interleave and sector skew, and are both ever used on the same disk?] | ||
+ | <!-- * [http://209.68.14.80/ref/hdd/geom/tracksInterleaving-c.html The PC Guide: Interleaving] missing --> | ||
+ | |||
+ | [[Category: Device Basics]] |
Latest revision as of 17:11, 21 January 2024
Sector interleaving is a technique for speeding up access to sequential data on rotating magnetic media.
It is useful because on floppy disks and hard disks, the time interval (for reading or writing), between the end of one sector on a track, and the start of the next sector, was often less than the time needed for processing (reading) or delivering (writing) the data. If the sectors had been arranged with one immediately after the other on the data media, the following sector would already have started when the software went to deal with it, and so it could only have been processed after waiting a complete revolution of the media, for the desired sector to come around to the head again. However, if space is left between two logically consecutive sectors for the 'next' sector, multiple sectors can be read in a single revolution of the media. The process is called 'sector interleaving', or simply 'interleaving'.
Details
There are two ways to express the number of sectors skipped:
- The Skip Factor indicates how many sectors must be skipped in order to get to the next sector to be read.
- The Interleave Factor (or just Interleave) indicates how many revolutions the disk stack has to perform in order to completely read a single data track.
While the Skip Factor is a positive pure number (0, 1, 2, ...), the Interleave Factor is usually given as a ratio, e.g. 2:1, or 3:1, meaning two respectively three revolutions are needed to read one data track.
The relationship between Skip Factor and Interleave Factor is simple:
Skip Factor = Interleave Factor - 1; e.g.: Interleave Factor = 3:1 => Skip Factor = 2
Examples for physical sector orders for an MFM disk with 17 sectors per track:
- Interleave 2:1: 1, 10, 2, 11, 3, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8, 17, 9
- Interleave 3:1: 1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12
Interleave Factors up to 4:1 were commonly used depending on controller capabilities.
The disk controller, not the disk, sets the interleave factor. Some controllers can optionally implement different interleave factors at will. Choosing a wrong interleave factor degrades read/write performance significantly. Changing the interleave factor requires a low-level format.