From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,9d5e1d36489fe2af X-Google-Attributes: gidf7344,public X-Google-Thread: fd705,8dea03f3432f9a82 X-Google-Attributes: gidfd705,public X-Google-Thread: 1164f8,8dea03f3432f9a82 X-Google-Attributes: gid1164f8,public From: greg@indiana.edu (Gregory Travis) Subject: Re: CDC-6600 (was: A Microsoft Future?) Date: 1997/01/17 Message-ID: X-Deja-AN: 210478951 references: <1E061566A2E@orchid.le.ac.uk> <32CBACD3.2AC0@videotron.ca> <5bjd8q$gs2@tst.hk.super.net> <5blac1$bnq@news-central.tiac.net> <32DF9B86.3526@sensor.com> <5bocf4$d4s@h1.uw.edu.pl> organization: Indiana University, Bloomington newsgroups: comp.os.vms,comp.sys.dec,alt.folklore.computers nntp-posting-user: greg And who can forget CDC's file concept? For the curious, there were two basic types of disk files under KRONOS. One was called a "direct-access" file. You got access to a direct access file by "attaching" it to your process or batch session. With a direct access file you had a pointer to the file itself and you had to specify, at attach time, how to attach the file (read-only or read/write). I think only one program could have the file read/write at a time - you got a "file busy" if you tried to get a file that another job had. I can't remember, but you may have had to give the size of the file when you created it. The other type of file was a "local" file. You used the "get" command to retrieve a permanent file as a local file. This made a copy of the permanent file on a special "local file" disk. Your program could then read-write the file to its heart's content but all the actions took place on the local copy, not the permanent copy (i.e. other's didn't see any changes you made). Your changes to the file didn't become permanent until you performed an explicit "save" of the file. Local files could also exist without any permanent component. In that way they were very much like UNIX /tmp files. Compilers, editors, etc. would work on local files as their temporaries. Local files were automatically discarded by the system when your job ended. Let's say you had a Fortran program that started out: PROGRAM FOOBAR(TAPE6=MYOUTPUT) . . . WRITE(6,100) BLAHBLAH BLAH And your job control language looked like: RUN FOOBAR REWIND MYOUTPUT COPY MYOUTPUT,AFILE Yes, the "REWIND" was important because the "file pointer" in local files persisted across job steps. Without the REWIND the COPY command would result in AFILE being empty (because COPY would sense the EOF in MYOUTPUT) Then both "MYOUTPUT" and "AFILE" were local files and would be lost when the job finished unless you said something like: SAVE MYOUTPUT (or SAVE AFILE) I don't think you could do random-access to a "local file" - all I/O had to be sequential. You could do random-access to an "attached" file. But direct-access attached files were really pretty funky to deal with. I don't think I've seen the "local file" concept on any other OS. As for file I/O, KRONOS was pretty nifty in this respect. Each file that a program had open had an associated File Environment Table (FET). The FET was nothing more than a few words of memory that described the file and its state. When doing I/O on a file, you passed the address of the associated FET to the PPU program (CIO usually). The FET was thus analogous to UNIX's file descriptor. However, whereas the UNIX file descriptor is just an integer index into a Unix kernel structure (much like the FET), the KRONOS equivalent was kept in the process' address space. KRONOS used circular buffering for all I/O. Basically, in the FET for a file there was a pointer to a buffer to be used for file I/O. There was also a field describing the size of the buffer. There were two more pointers as well. One was the processes pointer into the buffer and the other was the system's pointer. The two pointers chased each other around the buffer whenever I/O was performed. When a program wanted to do I/O it placed data in the buffer starting at the program's pointer and continuing until the buffer was "full" or the data was exhausted. The buffer was full when the program's equalled the system's pointer - not just at the top of the buffer memory. Thus the buffer "wrapped around". Once the application had written the data to the buffer, it called CIO which started writing the data out. At this point, the system's pointer started moving as the data was going out. As soon as it did, the program could start writing MORE data into the buffer so long as it did not "catch up" to the system - in which case it had to pause. If the program's computational and I/O overlap was such that the I/O demands exactly matched the system's I/O capacity then processing and I/O would go on in parallel with the pointers forever chasing each other around the buffer. You actually had to do something special if you really wanted to wait for the physical I/O to complete. Otherwise, the standard COMPASS read/write macros made all I/O async by default and the circular buffer made it so that you didn't have to worry about overwriting data that hadn't yet been written out. This architecture contributed to the fantastic processor and I/O overlap that we associate with mainframe-class machines and I've always wondered why I never saw the circular buffer I/O concept adopted more widely on smaller machines/operating systems. UNIX would have really benefitted from it I think. But it's too late now. greg -- greg greg@indiana.edu http://gtravis.ucs.indiana.edu/