Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Johnny Billquist <bqt@softjar.se>
Subject: Re: Access to RSTS/E IOPAGE Registers
Date: Mon, 04 Feb 2013 17:58:12 +0100	[thread overview]
Message-ID: <keopdm$fan$1@Iltempo.Update.UU.SE> (raw)
In-Reply-To: <510fa014.171203983@nntp.aioe.org>

On 2013-02-04 13:03, paramucho wrote:
> 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.

Ok. Cool.

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

Pretty much what I had understood. It makes it dangerous for me to 
comment on RT-11, because I know OS/8 and sometimes jumps to conclusions 
about RT-11, but occasionally I'm totally wrong. :-)

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

Right. However, technically, an ACP is unique (or could be) per device. 
And an ACP can implement other operations/things than directory operations.
Actually, in theory, the ACP is involved in every operation done on a 
file, even each read or write, since it is the ACP that understands 
files. And the ACP provides the mapping between the file virtual blocks 
and the device physical blocks. (But see more below.)

But for the common case, I guess it's fair to compare USR with an ACP.

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

Actually, if I remember right, VMS moved the ACP into the kernel to 
avoid having the context switches of a separate process, but 
functionality-wise it didn't change.
This is called an XQP. However, ACPs can, and still do exist as well.

I don't know all details of VMS here, but for RSX, the F11ACP is sortof 
a hybrid. Complex operations like file opening, or directory enters and 
so on, are done within the context of the ACP, which then force a 
serialization of these operations. However, file reads/writes, which 
technically also needs to go through the ACP are actually caught in the 
kernel, and completed without really going through the ACP most of the 
time. All the data needed to block remapping are available, so the 
kernel can do this with the help of those data structures, and still 
remain within the context of the process doing the I/O operations.

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

Sounds like OS/8 in that case. Unless you lock it in memory, it does not 
occupy any of your address space, but gets swapped in and out 
transparently to the program.

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

Probably, one way or another. Don't make sense to try and emulate things 
at a low level. Device driver level seems the most efficient, and then a 
corresponding side in RTEM that ends up in RSX files.

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

Ah. You meant that way.
Yes, inasmuch the flow of execution can be interrupted, you need a way 
to block it in some places.
I guess timers would be a typical example of this, as you probably can't 
accept timers to trigger at any random point in the code.

Blocking ASTs in RTEM would probably be what you want/need to do instead 
of raising the IPL.

	Johnny



  reply	other threads:[~2013-02-04 16:58 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
2013-02-04 16:58                                                 ` Johnny Billquist [this message]
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