by steve-myers » Wed Dec 15, 2010 10:48 am
Back in the late 1960s interactive use of a large mainframe type system by multiple users was generically called "time sharing," which was just a reflection of reality; each user had a portion of the total system, and shared the system with other people. TSO was quite literally an option in MVT. It was an an expensive option in that it used quite a lot of storage when it was running, probably something like 200K bytes or 256K bytes (out of, typically 1024K bytes).
There were two elements in this "time sharing:" When a TSO user was using CPU and I/O resources he competed with batch, and the usual task scheduling and I/O scheduling used by MVT was done. This was quite sophisticated even in 1971. In addition, a TSO user competed with other TSO users for the use of what was called a "swap region." If I remember correctly, you could define up to 3 swap regions. There were several criteria for use of the swap region. When the TSO control task decided a TSO user had used the maximum time alloted to him the TCBs were removed from the MVT TCB chain, any I/O was allowed to complete and other tasks required to "quiesce" the region were completed. Then the storage for the swap region was written to a swap data set, the storage for the next user to use the swap region was restored to the swap region, any active I/O was restarted, the TCBs were restored to the TCB chain, and the user could then run. Other than this swap activity, there was no storage sharing or paging as we know it today.
The amazing thing about TSO for MVT is that it worked, and by the standards of the day it was pretty reliable.
The other two important elements in TSO were the command language, which hasn't changed very much since 1971. The command language was extensible in the sense that users could write "command processors" of their very own. The other important TSO element was dynamic allocation. A command processor could perform dynamic allocation using a TSO service routine called IKJDAIR, which still exists almost 40 years later. IKJDAIR dynamic allocation was much different than MVS dynamic allocation we use today. Most other TSO service functions like IKJPARS existed in the first release of TSO, though some commonly used service functions like "DAIRFAIL" were not documented for end users until the first MVS release. Command processors could do regular I/O just like batch programs, and they used standard MVT services like GETMAIN and FREEMAIN. In fact almost every MVT batch interface was available to TSO users. IBM provided the CALL command (which still exists) so that TSO users could start regular batch programs in the swap region.
Programs running in the TSO SWAP region could read and write to the TSO terminal using the TGET and TPUT macros, as well as using DD statements defined to the terminal and performing regular I/O macros like GET and PUT.