G
glen herrmannsfeldt
(snip on CPU and I/O speeds, then I wrote)
There are two ways to do sequential I/O for OS/360 (and they are
still there in z/OS), which differ in how much the OS does for you.
For BSAM, (Basic Sequential Access Method) you pretty much do it AIO
like with READ and WAIT macros. For double buffering, you start
with two READs, then loop processing one while the other is read,
and with the appropriate WAIT at the end (or start) of the loop.
For QSAM (Queued Sequential Access Method) the OS does most of
keeping track of buffers, and, I believe, properly processing
more than two. QSAM also does blocking and deblocking for you.
For OS/360, and random access, you have BDAM, and the records are
unblocked. (You can put anything in the records you want, but
they are unblocked as seen by the system.) That is, the records,
of whatever size you want from 1 byte to the size of a disk track,
are physical blocks on the disk. (For people used to unix, think
of blocks on tape.) The disk hardware can then find and supply
the appropriate disk block.
-- glen
Double (or more) buffering certainly helps on sequential accesses, and
most modern OS's do some approximation of it automatically for stream
based accesses, so long as the program's access pattern appears to be
sequential. So there's no real reason to use AIO (or any other
program visible explicit double buffering) for sequential accesses.
There are two ways to do sequential I/O for OS/360 (and they are
still there in z/OS), which differ in how much the OS does for you.
For BSAM, (Basic Sequential Access Method) you pretty much do it AIO
like with READ and WAIT macros. For double buffering, you start
with two READs, then loop processing one while the other is read,
and with the appropriate WAIT at the end (or start) of the loop.
For QSAM (Queued Sequential Access Method) the OS does most of
keeping track of buffers, and, I believe, properly processing
more than two. QSAM also does blocking and deblocking for you.
Purely random accesses can make little use of prefetching, of course,
and that's where you find the read use case for AIO.
For OS/360, and random access, you have BDAM, and the records are
unblocked. (You can put anything in the records you want, but
they are unblocked as seen by the system.) That is, the records,
of whatever size you want from 1 byte to the size of a disk track,
are physical blocks on the disk. (For people used to unix, think
of blocks on tape.) The disk hardware can then find and supply
the appropriate disk block.
-- glen