From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: d180ab3bd8,5e74e0b23842db90 X-Google-Attributes: gidd180ab3bd8,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.106.73 with SMTP id gs9mr1821928wib.2.1360478789981; Sat, 09 Feb 2013 22:46:29 -0800 (PST) Path: bp2ni28201wib.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!216.40.29.245.MISMATCH!novia!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: paramucho@hotmail.com (paramucho) Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: Access to RSTS/E IOPAGE Registers Date: Mon, 04 Feb 2013 12:03:04 GMT Organization: Aioe.org NNTP Server Message-ID: <510fa014.171203983@nntp.aioe.org> References: <5103ed41.658822127@nntp.aioe.org> <51028a73.830126357@nntp.aioe.org> <51062c31.1068125772@nntp.aioe.org> <51090db1.102143963@nntp.aioe.org> <510d05c3.633956@nntp.aioe.org> Reply-To: paramucho@hotmail.com NNTP-Posting-Host: yPe0Vz9rK3epnEf2vEo6yg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 1.5/32.451 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Sat, 02 Feb 2013 17:15:19 +0100, Johnny Billquist wrote: >> Actually, I forgot that one of my staff did write a read-only ACP for >> Files-11A (based on an emergency import app I wrote when my VAX-11/730 >> crashed because all the sources were on VMS disks). > >For what? I mean, both VMS and RSX already have a Files-11A ACP. RT-11 >then? But it wouldn't be an ACP, actually... But anyway, nice if you >could read Files-11A. The ACP was for RUST/XM and was implemented as a separate process with a request queue for directory operations and special handling for virtual-to-logical block mapping etc. It was a project that the staff member wanted to do for his own edification and enjoyment. >> Regarding RT-11 and FILES11A, I heard a very curious story many years >> ago that during the initial design for RT-11 they looked at using a >> subset of FILES11A but rejected it because it would have required an >> additional 30 words of memory. >> >> Now, that might seem wierd to you (and it still does to me), but you >> have to remember that the original RT-11 developers came from the >> PDP-8 OS-8 team (the original sources had macros which emulated some >> PDP-8 instructions), and they counted every byte. > >Not at all that surprised, more than the fact that it would only have >been 30 words overweight. > >I've used OS/8 for so long, and so much, that I at one time knew it >about as intimately as RSX. I've forgotten a lot, but every time I peek >at RT-11 I'm still amazed at how many things are so much like OS/8. :-) RT-11 was designed to provide the same kind of environment that OS-8 provided for the PDP-8. Using some of the OS-8 developers on the initial system probably sped up the design time and brought their practical experience to the initial implementation. >Let me just point out that an ACP is nothing like USR. But yeah, I don't >really see how they could squeeze any Files-11 support into the space >the USR takes. The implementationa are different, as you note, but the USR is functionally similar to an ACP in that it fields directory operations. RT-11 has a contiguous file structure so the the USR does not have to deal with mapping virtual blocks. It's the functionality that is similar, not the implementation. Early versions of VMS had separate FILES11B ACP processes just as RSX does. I think that later versions moved to more of an RT-11 model where FILES11B ACP operations take place in the context of the calling process. >Is the USR resident in RT-11, or is it invisible to the application, >like in OS/8? Both. The USR can be made permanent with SET USR NOSWAP and a program can lock/unlock the USR in memory. Otherwise it is loaded into a 2kw area of memory to handle directory system calls and some other stuff. The operation is largely transparent to programs. RUST/SJ used to have a sort-of swapping USR but I merged the code with the monitor more recently, so it's permanent. RUST/XM extends the RT-11 model giving each process essentially it's own "USR". Processes only queue for directory access when a directory modification is in progress. Otherwise, directory operations for a given volume can be fully overlapped. RUST/XM also supports ACP-like processes for other file structures, but it's a bit cumbersome. >(Just for the sake of terminology, an ACP is an extension to a device >driver. It can implement just about anything, extending the >functionality of the device driver, such as different file systems, >communication protocols, or anything else. The ACP itself is a "normal" >privileged program that is scheduled just like any other program by the >kernel. It does, however, get passed some I/O operations that programs >queue to the device driver. The programs, as well as the device driver, >is unaware that the I/O requests actually end up at another program >instead. The ACP can then do I/O, do networking, IPC, or just >computations, as much as it wants, and eventually indicate that the I/O >request is done.) That's why they're called "ancilliary control processes" and that's how the FILES11A functionality was implemented under RUST/XM. In RT-11 (and RUST systems) "special directory" drivers are sometimes used to implement similar kinds of functionality. They pick up a driver call, preprocess it and may then requeue to a separate driver. That's how networks are implemented under RUST/XM. >> I did a bit of work on the RUST/SJ monitor sources yesterday. It turns >> out that the monitor itself requires only a few modifications, mostly >> for PSW access and for the terminal. The secondary bootstrap needs to >> be almost fully rewritten and along with the media drivers. > >RT-11 have special code for RTEM, unless I remember wrong. Yes, the resident monitor (RMON) has a relatively small number of conditionals for RTEM. There's nothing in the USR or KMON except for the conditions controlling the MACRO title of the module. It's the bootstrap which has a lot of changes. Then there's all the code in RTEM.TSK itself. I guess the drivers are completely rewritten for RTEM and would send calls to the RSX native code in RTEM.TSK. >>> Still curious how FIP actually works, though. But we'll take that offline. >> >> The thing I'm curious about at the moment is how RTEM emulates the >> operation of the PSW as the basis of blocking mechanisms to avoid race >> conditions in the RTEM system code executing in user mode. The only >> mechanism which I can think of is enable/disable AST recognition >> (since only ASTs would interrupt RTEM system code). > >ASTs (if we talk just RSX) never modify the PSW anyway. > >But I don't know exactly what you are thinking of here, so I can't >really comment. In a real, native version of RT-11 or RSX the PSW is used in the implementation of queueing for various resources and in entering and leaving system state (such as ENSYS/FORK). We've discussed this topic previously. Under RTEM the PSW is not available because the RTEM monitor runs in user mode, not kernel mode. Asynchronous hardware interrupts do not occur in user mode, of course, but ASTs (for the clock, terminal or other I/O) can interrupt user mode monitor operations. The RTEM user mode monitor needs to be able to block such ASTS if it is to maintain the integrity of its queue structures etc. I had a more detailed look today. All accesses to the PSW in the RTEM conditional assembly of the RT-11 monitor are converted to calls to special RTEM routines. I guess it's those routines which manage ASTs. Ian