I took most of this off line, but I'll try to close down the discussion, so
we can get back to TUHS history.
Please be careful of your wording as it is easy to get confused
particularly if you never used the original 1/2" tape system you might not
understand the actual terms. The term for reading Read and Write I/O Sizes in
a user program are different than tape block sizes (or as they were
originally referred LRECL - Logical Record Length).
As I said to Paul K, I sadly know way more about the minutia of tapes that
I really should admit [I broke in during the 60s using 7-track tapes on the
IBM Mainframes which really date me and I remember the 5-track tapes on one
of the systems, but I never personally used it].
On Wed, Oct 17, 2018 at 2:14 AM emanuel stiebler <emu(a)e-bbes.com> wrote:
Longer blocks, too (2k or so) which would make any
buffering issues more
severe.
*Your user program read/wrote with 2K or more using DMA reads or writes but
it wrote 512 byte 'blocks.'*
As Paul W pointed out correctly, the TK50 and its children in the DLT*
family all used a fixed format 512 byte *blocks on the tape*. This
cannot be changed. The tape format is handled by the tape controller
microcode and all of the blocks on all the streamers (DLT, 1/4, 1/2", 4mm
and 8mm) that I know about were fixed at 512 byte, although the OS could
write multiple (N) blocks at a time to the tape controller which will will
write as N blocks on the tape.
This was different from 1/2" parallel 7 and 9-track tape which was actually
had variable size 'blocks' in the writes and the tape format. Since the
terminalogy was defined (by IBM) for 5/7/9 track drives, we still use that
terminology.
The trick is that streamer** format write* (which is bit seral):
<HW HDR BLK1 bit serial><512 bytes of serial data
[blk1]><HW TLR BLK1 bit serial><HW HDR BLK2 bit serial><512 bytes of
serial
data[blk2]><HW TLR BLK2 bit serial>.....<HW HDR BLKn bit serial><512
bytes
of serial data>[blkn]<HW TLR BLKn bit serial>
The key is that there are no inter-record gaps (IRG) between the <HW TKR
BLK x bit serial> and <<HW HDR BLK x+1 bit serial> frames when recording on
a streamer. BTW: they usually use a serpitine scheme - starting with the
center of the tape and moving outwards in a circular pattern - IIRC down on
tape end and up on tape start -- but that's fuzzy in my memory and I'm at
work so I can not look in any of the controller books have at home. If
you lose the bit stream on input (data under run), the tape controller
backs up the tape and when it starts to write again, it goes over the last
block trailer and start its new write at the end of it. For instance the
original 1/4" QIC format wrote 4 passes, then later when the recording head
got better, it wrote 9 passes and then even more, but in the newer formats
(and withe better media) the head was smaller.
Also remember that EOT is handled different in the streamer formats from
1/2" 7/9 track and IIRC EOT can even differ between the different streamer
formats.
If you look at 1/2" parallel 7/9-track (which is where the terms and basic
concepts originate) 9-track has a 'inter-record gap' between the last
block's trailer and the next block's header. When IBM originally defined
that 7 and 9 track formats (whch ANSI later codified), these gaps are
defined so that the there is time to start and stop the motors (somewhere,
I have a very old IBM document from the late 60s that describes this very
well using IBM terms like LRECL and DASD - direct access storage device ;-)
The key difference from a streamer tape is that the IBM LRECL or logicial
record size, could (and did) vary ***. But to try to keep the amount of
wasted space (*i.e.* least amount of inter-record gaps), different programs
use different 'block size' and some formats (like ANSI labeled tapes) the
block size (LRECL) can vary within the tape itself.
Also, I don't think I ever knew why, but for some reason IBM's tape
utilites tended to like LRECL 10240 and 20480. Since many of us UNIX
folks came from IBM and Multics, we also used the same sizes (*i.e.* 20b or
10240 8 bit bytes) - it was reasonably efficent (we got 150M per
traditional 2400" 1/2 tape at 6250 BPI - you could get 1/3 more space when
3M created a 3600" that fit in the original 1/2" reel) .
Thus the on-tape format of 1/2" (which is parallel encoding and one pass
over the tape):
<HW HDR1><LRECL BYTES of BLK1><HW TRL2><IRG><HW
HDR2><LRECL
BYTES of BLK2><HW TRL2><IRG>......<HW HDRn><LRECL BYTES of
BLKn><HW TRn>
<IRG><HW EOT HDR>[if the last last 'file' on the tape a
second<IRG><HW EOT
HDR>]
Note: LRECL BYTES of BLK1 did not have to be the same as <LRECL BYTES of
BLK2> much less <LRECL BYTES of BLKn>
Thus concept (and term) of 'tape blocks' was born. Also note be careful
the term 'file' has specific meaning to a tape. DEC started to use the
term 'save set' to disamiguated it BTW. A tape 'file' N tape
blocks,
followed by an a EOT mark. Thus, two adjacent tape marks actually
delinated end of recorded data in the tape. Thus in 7/9 track formats when
a new file is written the last <IRG><HW EOT HDR> is backed up over and data
frame writing starts over writing the second <HW EOT HDR> after the last
<IRG>
So ... what this all means is that from the OS side, you start a DMA on X
blocks and then let the tape controller read or write it. No matter the
number of blocks you write on a streamer, it will always write it as 512
byte blocks (similar to how a disk works when set up in 'fixed' formatting).
One more thing to be careful about... people also talk about 'ANSI tape'
format. This usually refered to the *SW format of the data blocks on the
tape*. UNIX's native tape formats were tp/stp, tar, cpio and dump. VMS
uses the ANSI tape format as its native format under the covers (and if
IIRC, so does RT11) for how to write and exchange data - which BTW, originally
using those variable LRECL blocks on the tape.
So the undustry first had a define a set if physical encoding for the tapes
and these are also ANSI specs. But you need need to define how the data
itself is written (which byte encoding ASCII vs EBCIDIC) and how to
understand the 'files' on the tape itself (this is usually what is being
tape about when people talk about 'ANSI tapes.' My old housemate at UCB
(Tom Quarles, also known as the author of SPICE3) wrote the UNIX Ansitape
program that went out with BSD (he wrote so we could exchnage tapes with
the DEC CAD team which used VMS).
Clem
* Just to confuse you more, TK50 and the DLT family actually use a 1/2"
media in the closed tape cartridge. But when DEC developed it (with 3M),
there were also 3rd party 1/2" tape controllers that wrote bit serial
(streamer) format on the traditonal 1/2" (9-track parallel) media. For
instance the USAF/AWACS planes used to use a traditonal 3M 1/2" tape
>media<<, but those tapes can only be read on
a special streamer drive
[long story - I can make a couple of HW & SW guys
shutter when I just say
the word 'Grumman' ****].
** One other thing to confuse the world is that 'streaming' was a trick
performance trick that originated with 1/2" tape. You will see many 1/2"
drives from the period such as ones from Cipher and Kenndy that took a
parallel byte stream and wrote/read them - although they obey the 1/2"
format rules on the tape itself.
*** Another thing that was undefined in the ANSI tape specs and you can
sometimes see, but certain HW will toss cookies and not read if you try it,
it mix encoding within a tape (i.e. write 800 BPI, 1600 BPI or even 6250
BPI on the same tape). This was sometimes done on things like boot tapes
because the pre-boot system might only know about 800 BPI tapes and it
simplified the boot process particularly in the days when you had to toggle
in the boot (or in IBM terms -- IPL -- initial program load -- code).
**** An airman on the AWAC used to spent his entire time on the flight
keeping the 3 drives loaded - it the time it took to write one tape,
another is being rewound and the airman put a new tape on the 3rd - making
that all work at full speed with no data loss was 'interesting'