Skew vs. interleave

Fred Cisin cisin at xenosoft.com
Fri Jul 30 18:00:34 CDT 2021


On Fri, 30 Jul 2021, Mike Stein via cctalk wrote:
> There's a small discussion on S100computers about the terms 'skew' and
> 'interleave'.
> In CP/M documentation 'skew' refers to what's usually called interleave
> these days, i.e. offsetting sectors on a track to compensate for the fact
> that by the time the computer has processed a given sector the next one has
> already passed by, so that the computer has to wait an entire revolution
> for it to pass by the head again; in other documentation as in Chuck's
> 22disk for example this is also called 'interleave'.
> However, in later documentation the meaning of 'skew' seems to have changed
> to refer to the offset of sectors between adjacent tracks to compensate for
> the time required to step the head.
> Can anyone (Fred, Chuck?) shed some light on this apparent double meaning
> of 'skew'? And if skew was used to describe sector interleave then what was
> the offsetting of sectors between tracks called?
> Inquiring minds need to know ;-)

Good question.
You obviously understand the issue, but others might not.  So, here is the 
background:

It is not the only item where each company has their own name.  What to 
"granule", "block", "allocation unit" have in common?
How can they get away with making up their own names for everything?
MS-DOS has a "File Allocation Table" that consists of a linked list of 12 
bit entries.  Not all are 12 bit.
What is it called on Coco?  Mac?  "Microsoft Stand-Alone BASIC"?


When reading multiple sectors, after reading one sector, and going back 
for the next one, a fast system can then read the next one, but, if it 
takes too long to process before reading again, the beginning of the next 
sector may have already gone by, and you have to wait a full revolution 
of the disk before you can get it.
On a 300RPM disk, a revolution is 200 ms.  (1/300 of a minute)
On a 360RPM disk (1.2M and 8"), a revolution is 167ms (1/36 of a minute) 
That's enough of a delay to want to do something about it.

Other than making the whole system faster, a simple solution is to 
rearrange the sectors.
Instead of
1 2 3 4 5
if the sectors were stored on the disk as
1 4 2 5 3 
or even
1 5 4 3 2
then when going back for the next sector, you would wait part of a 
revolution, instead of the whole revolution.

Some called that "skew", some called it "interleave", some called it 
"sector sequence".

It is a physical interleaving of the sectors.  It only requires that 
FORMAT put them on the disk in a different sequence (trivially easy).
For reading and writing, it doesn't matter, and can be ignored, since your 
BIOS or FDC read will look for sector #1, then #1, then #3, ... and will 
wait patiently until the sector with the right "header" comes around


But, there is another related way to do the same thing.  Instead of 
rearranging the physical sequence of the sectors, use them in a different 
order.
With the physical sectors still in order of
1 2 3 4 5
When writing a file, you could put the first data in sector 1, then put 
the next data in sector 3, then 5, then 2, then 4.
That is called "logical interleave"
It does mean that the software that reads the file needs to know to read
1 3 5 2 4 , and then assemble the file accordingly.
If you have an "alien" disk, that you are not yet familiar with, and the 
sectors are in non-sequential order, then it probably uses a physical 
interleave, and your software can go ahead and read a 1 2 3 4 5 sequence.
But, if the sectors on the disk are in 1 2 3 4 5 order,
then, is it assuming that you can read that fast?
or that you don't mind waiting a full revolution between sector reads?
OR is it using the sectors in a "logical interleave" sequence?
Well, you could read the file, and see whether it makes sense.
Or, find a file on the disk that is text, a programming source file, or 
something else that you are familiar with, such as sequential data.
Read a sector, and look for text at the end of the sector, particularly 
incomplete word, then look at the other sectors to see which sector has 
the rest of that word (called, "looking for half a worm").
Sometimes, you may need to do a lot of that to find the sequence.

OK, that was "Interleave", which used to occasionally be called "skew".


But, there is another use of the word "skew".
Later on, after the interleave was "solved", people looked for other ways 
to avoid wasted time.
When you finish reading a track, and step to the next track, will you ba 
able to read in time for the first sector?  Or will you have to wait an 
entire revolution for it to come around again?
To speed that up, some systems start each track at a different point:
1 2 3 4 5
2 3 4 5 1
3 4 5 1 2
4 5 1 2 3
5 1 2 3 4
1 2 3 4 5
For reading or writing, it doesn't matter, since your BIOS or FDC read 
looks for a sector number and doesn't care about order.
For FORMAT, it means a different sector sequence on each track.


So, we have two concepts, and two words, and inconsistent choices of the 
words.  One way to think of it was that sector sequence was called two 
different names.  But, when people added in offsetting the beginning of 
the next track, "skew" seemed to make sense as a name for that, and that 
"interleave" would then make more sense for simple sector sequence, 
calling for asking MiniTru to go back and retroactively change the word 
"skew" to "interleave" in all of the oldest documentation.

--
Grumpy Ol' Fred     		cisin at xenosoft.com




More information about the cctalk mailing list