Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: paramucho@hotmail.com (paramucho)
Subject: Re: Access to RSTS/E IOPAGE Registers
Date: Mon, 04 Feb 2013 12:03:04 GMT	[thread overview]
Message-ID: <510fa014.171203983@nntp.aioe.org> (raw)
In-Reply-To: keje2o$d81$1@Iltempo.Update.UU.SE

On Sat, 02 Feb 2013 17:15:19 +0100, Johnny Billquist <bqt@softjar.se>
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.

<snip>

>> 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


  parent reply	other threads:[~2013-02-04 12:03 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-26 13:22 Access to RSTS/E IOPAGE Registers Jerome H. Fine
2012-12-26 15:35 ` Bill Gunshannon
2012-12-27  0:10   ` glen herrmannsfeldt
2012-12-27 21:13     ` Johnny Billquist
2012-12-27 21:25       ` glen herrmannsfeldt
2012-12-27 21:37         ` Johnny Billquist
2012-12-27 13:38   ` Jerome H. Fine
2012-12-27 21:16 ` Johnny Billquist
2012-12-28  6:32   ` paramucho
2012-12-28 15:01     ` Johnny Billquist
2012-12-30  2:04       ` paramucho
2012-12-30  3:25         ` Johnny Billquist
2012-12-30 18:25 ` jgharston
2012-12-30 21:44   ` Johnny Billquist
2012-12-31  0:34   ` Jerome H. Fine
2012-12-31  0:52     ` Johnny Billquist
2012-12-31 16:04     ` paramucho
2012-12-31 16:23       ` Bob Eager
2012-12-31 16:33         ` Johnny Billquist
2013-01-01  3:28         ` paramucho
2012-12-31 16:30       ` Johnny Billquist
2013-01-01  4:55         ` paramucho
2013-01-01 18:37           ` Johnny Billquist
2013-01-13  8:01             ` paramucho
2013-01-13 14:13               ` Johnny Billquist
2013-01-14  6:30                 ` paramucho
2013-01-14 11:50                   ` Johnny Billquist
2013-01-15 14:20                     ` paramucho
2013-01-15 21:10                       ` Johnny Billquist
2013-01-16  3:25                         ` Jerome H. Fine
2013-01-16  4:39                           ` Johnny Billquist
2013-01-16 13:43                         ` paramucho
2013-01-16 18:59                           ` Johnny Billquist
2013-01-17 11:56                             ` paramucho
2013-01-22  9:53                       ` Hartmut Brandt
2013-01-22 13:52                         ` Johnny Billquist
2013-01-23 14:11                           ` paramucho
2013-01-23 19:53                             ` Johnny Billquist
2013-01-25 13:43                               ` paramucho
2013-01-25 23:39                                 ` Johnny Billquist
2013-01-28  7:47                                   ` paramucho
2013-01-28 18:06                                     ` Johnny Billquist
2013-01-30 12:16                                       ` paramucho
2013-01-30 18:50                                         ` Johnny Billquist
2013-02-02 12:51                                           ` paramucho
2013-02-02 16:15                                             ` Johnny Billquist
2013-02-03 16:16                                               ` Jerome H. Fine
2013-02-04 12:03                                               ` paramucho [this message]
2013-02-04 16:58                                                 ` Johnny Billquist
2013-02-15 12:34                                                   ` paramucho
2013-02-15 13:08                                                     ` Johnny Billquist
2013-02-15 15:15                                                       ` paramucho
2013-02-15 16:04                                                         ` Johnny Billquist
2013-02-17 13:02                                                           ` paramucho
2013-02-17 13:43                                                             ` Johnny Billquist
2013-02-19 14:09                                                               ` paramucho
2013-02-20 11:18                                                                 ` paramucho
2013-02-21  0:23                                                                   ` Johnny Billquist
2013-02-21  0:22                                                                 ` Johnny Billquist
2013-02-24 14:10                                                                   ` paramucho
2013-02-24 15:00                                                                     ` Johnny Billquist
2013-03-06 15:33                                                                       ` paramucho
2013-03-06 23:51                                                                         ` Johnny Billquist
2013-03-20 10:15                                                                           ` paramucho
2013-03-20 13:01                                                                             ` Johnny Billquist
2013-03-20 21:42                                                                               ` Johnny Billquist
2013-04-14 16:48                                                                                 ` paramucho
2013-04-14 18:28                                                                                   ` Johnny Billquist
2013-04-15 10:30                                                                                     ` Johnny Billquist
2013-03-20 17:33                                                                             ` Jerome H. Fine
2013-03-25 15:55                                                                             ` paramucho
2013-03-06 15:33                                                                       ` paramucho
2013-02-24 14:12                                                                   ` paramucho
2013-01-23 14:10                         ` paramucho
2013-01-14  9:13                 ` Hartmut Brandt
2013-01-14  8:08 ` John Santos
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox