From: Johnny Billquist <bqt@softjar.se>
Subject: Re: PDP11 Values from MFPT
Date: Sat, 18 Feb 2012 21:58:28 +0100 [thread overview]
Message-ID: <jhp3dk$rnu$1@Iltempo.Update.UU.SE> (raw)
In-Reply-To: <4f3f6194.19510701@nntp.aioe.org>
On 2012-02-18 12:55, paramucho wrote:
> On Fri, 17 Feb 2012 18:13:44 +0100, Johnny Billquist<bqt@softjar.se>
> wrote:
>
> <snip>
>>> The opening section of code is more or less duplicated in RMONFB.MAC
>>> (later RMON.MAC). Look for the "C$SIGN:". The code in the USR is only
>>> used for the single-threaded single-user RT-11/SJ (and later for
>>> RT-11/SB).
>>
>> I was looking in RMONFB.MAC.
>> C$SIGN almost immediately do an EMT 374, which ends up in USR.
>> What am I missing?
>
> .CSIGEN (C$SIGN:) purges all channels before prompting for a new
> command and opening files. Thus, it begins with a loop to purge
> channels. Control is passed to the USR only if a *new* file is open on
> a "special device", such as magtape or cassette. (In fact, "special
> devices" have their own built-in ACPs and can be called without using
> the USR, but that's a complication I've been avoiding introducing
> here.)
>
> Note, .CSISPC (C$SISP:) does not purge or open files.
Must be looking at different versions of something, this is C$SIGN: from
RMONFB:
.SBTTL .CSIGEN AND .CSISPC - CSI CALL EMTS
.ENABL LSB
C$SIGN: CLR R4
MOV (PC)+,R0
.BYTE 8.,3
10$: EMT 374
DECB R0
BGE 10$
BR 11$
C$SISP: MOV #100000,R4
11$: BIS #CSIRN$,@R5
MOV #CSI.$,R2
MOVB JOBNUM,R3
BEQ 15$
BIS #GTLIN$,@#JSW
15$: TST @R1
BEQ 20$
JMP EMTUSR
20$: INCB R4
CMPB USROWN,R3
BNE 30$
INCB USRLVL
CSIERR::CLRB R4
BISB USRLVL,R4
CALL RIDUSR
30$:
If I remember right, this is from RT-11 V5.5, so it might be that things
got changed after that?
>
> <snip>
>> I think we should split things up if we are to continue this discussion.
>> RSX and RT-11 works very differently, so it don't help if you try using
>> RSX concepts and terms to describe RT-11 behavior.
>> RT-11 have file operations as a part of USR. There is only one USR, and
>> all processes wanting to do any file operations have to go through USR,
>> which is protected so that only a single process can enter it at a time.
>> Correct me if I'm wrong here.
>
> The USR is only responsible for directory-oriented operations. Read
> and Write operations happen outside the USR.
Ok. Gotcha. Same in RSX actually. Once the file have been opened, the
ACP does not necessarily need to be invoked for reads/writes.
>> RSX is doing things in a very different way. We can talk about the RSX
>> way as well, separately, if you want to.
>
> Except for the asynchronous opportunities, an RSX system with a single
> F11ACP is pretty much equivalent to RT-11 with its single USR is it
> not?
No, since even a single F11ACP can service several disks, and does not
block access to one disk just because an operation is currently under
way on another disk.
>>> The RT-11 approach to ACP operations is more like VMS or Windows.
>>
>> Nonsense. VMS works exactly the same way as RSX in this aspect. You have
>> one or more ACPs in VMS, just like RSX. And you queue I/O operations to
>> it, and your program can continue doing whatever while the I/O operation
>> is being completed. This I *know*.
>
> And I know you know. I didn't say that VMS had done away with the QIO
> interface to the ACPs--that would be ridiculous. What I meant was that
> most VMS programmers use the $OPEN, %CLOSE interface. Many wouldn't
> have any knowledge of the ACP QIO interface.
Right. Almost all use the RMS calls, which in turn do the QIOs for them.
Exactly like in RSX. The main difference being that RMS is always
present in a separate part of memory, and don't need to be linked in as
in RSX.
But you can actually use the interface all the way through RMS
asynchronously. RMS do not need to do things in a synchronous way. It's
just the default. You set a bit in the FAB to make your calls
asynchronous instead.
>>> The need to open files asynchronously occurs fairly rarely. All
>>> systems have their little advantages here and there. In RUST/XM each
>>> process effectively has it's own private generic ACP. Multiple
>>> processes can perform overlapping file opens on the same volume.
>>> Processes only queue when they want to modify the directory structure
>>> of the same volume. Now, that's probably something you can't do on
>>> RSX, but I wouldn't use the difference to characterize RSX as doing
>>> "way more locking than" RUST/XM does. It's a nice feature. I seem to
>>> recall that later versions of VMS did something similar.
>>
>> For pure read-only operations it is an optimization you might want to
>> do, but it is not possible in either VMS or RSX.
>> When you open a file in those operating systems, you can specify if
>> others are allowed to open the file or not, and thus you must have a
>> clear concept of one process opening the file completely before another
>> can, so you can enforce protections like that.
>> So it is doing more locking that RUST/XM does. And it provides more
>> services, by doing this.
>
> I could extend the functionality to handle access control fairly
> easily. It would just be a matter of having a queue for open
> operations with potential sharing conflicts.
Right. But then you need to figure out if an open request is for a file
that is already open or not, and then do two different paths, depending
on that. And the paths are pretty much the same, except without the
shared access checks on one of them. And if you have lots of open files,
then the checking can become a noticeable part of the operation. But
yes, there are possibly some optimization that could be done here. I
have not looked deep enough at it to tell for sure if they would be
enough to be worth the code.
>>> That's clear--I quote from above:
>>>
>>> By "system state" I mean basically the same state as "fork state"...
>>> System state runs at IPL 0. $DIRSV switches to system state.
>>
>> Curious question: what do you call the state an interrupt handler gets
>> in to?
>
> Interrupt State kernel
> Fork state/System state kernel
> AST state kernel user
> Process state kernel user
Ok. Good to know so that I can (hopefully) adapt my terminology here.
>> And please note that nothing after this point in RSX ever needs to raise
>> the IPL.
>
> But that's a bad thing because it's put everything into fork/system
> and that increases AST and scheduling latencies. RT-11 and VMS can
> perform most of their system call tasks with no impact at all on AST
> delivery or scheduling latencies. That's the real issue we're talking
> about.
Instead potentially affecting interrupt latencies... :-)
As you are not expected to spend large amounts of time in forks in RSX,
this is not really a big issue. But yes, forks do affect AST delivery
and task execution (let's take the big picture here, scheduling is just
a subset of task execution, which is really what is being delayed by forks).
But since you only have one CPU, it can either be running a user
process, or run the fork. The fork needs to be completed sooner or
later, especially since the device related to the fork cannot issue
another fork until the previous is completed. Is there a point in
delaying the fork?
> (And, of course, the system/fork state exit path must also raise IPL,
> but you know that.)
Yes. Since at the completion of a fork process you need to check if
there are any more fork processes to be run, and that means checking the
structure that must be protected.
>> FCS is not a part of the kernel. It's a user level library.
>> The FCS sources are in [50,10], but I'm not sure how interesting you'll
>> find them. But they should be there unless your distribution was mangled.
>
> Well, I just take what I can find on-line. I don't recall [50,10], and
> I went through what I have a couple of times.
> I would find FCS interesting. I've always wanted to do something to
> FCS so that I could process stream_xx files and not have to convert
> everything to RSX text format. In particular, I'd like to patch the
> RSX Pro MACRO app.
Ah. Yes, that would probably not be too hard. However, unless the MACRO
app is linked with a shared library, you then need to relink it again,
with your fixed FCS library. Do the PRO software comes with the object
files?
I've once or twice thought about stream format files in RSX as well. RMS
supports them, but FCS does not.
>> RT-11 is (in my eyes) to convoluted and tricky to follow. You have to
>> read the code many times, and go back and forth, and trying to remember
>> exactly what state you are in at every point, to understand what it is
>> doing.
>
> It's like a jigsaw puzzle. Space was always tight--programmers would
> be given the job of "saving two more words". RMONFB.MAC and RMON.MAC
> received a lot of dedicated attention--nothing was ever easy.
Indeed.
RSX-11M was also designed for a minimal footprint, but done with another
approach. However, I usually prefer fooling around in M+, where space is
generous in comparison. 11M can live in pretty small machines, however.
And without an MMU.
>> Hmm, if I read things right, RT-11 work the same way as Unix, in that
>> you are running with the user context, while in the kernel, part of the
>> time.
>
> And like VMS.
I had not realized that VMS had strayed like that. If it really do have
user processes running in their own context while in kernel mode. Which
is not where RMS and DCL routines live...
>> So, sometimes you protect shared data through raising the IPL, sometimes
>> through mutexes
>
> My original list had RT-11, RUST/XM and VMS. It's RUST/XM and VMS
> which use mutexes.
I seem to remember seeing something that looked like mutexes in RT-11 as
well, but I might have been confused.
Hmm, I think I was thinking of the "blocking conditions" bits you have
for jobs in RT-11. They smelled somewhat like mutexes in RT-11, but I
bet I read them wrong.
>> and sometimes through going through ENSYS. ENSYS will
>> protect your code from interrupt handles which create forks to do work.
>> IPL (obviously) protects you from even getting interrupts (and thus also
>> protects you against interrupt handlers), while mutexes basically
>> protect you against other processes.
>>
>> But I'm not trying to argue that SPL would be more expensive than
>> creating a fork. But I am arguing that having your priority changed all
>> over the place makes it harder if you write code to make sure it is
>> properly protected, since you need to know where and how you come into
>> that piece of code so you can protect it right, and also not
>> accidentally drop the IPL at the wrong place.
>
> I was looking at the VMS fiches tonight and noticed that VMS uses
> SETIPL all over the place, using all the different IPL levels.
>
> RT-11 shares the the ";;;" convention with RSX, but also has a ";;"
> convention for code in system state. In fact, RT-11 often raises IPL
> to protect a queue header or whatever even though it's in system state
> and not, theoretically, necessary. I can only guess at the rationale,
> but my own experience with RT-11 uses was pretty extensive. New users
> would often start writing RT-11 realtime code within a day or so of
> reading the manuals. They'd forget to save registers and do all kinds
> of horrible things, so system code tended to get a bit paranoid.
:-)
RSX also use the ;; convention for code running in system state.
It's even suggested in appendix E of the Macro-11 Language reference manual.
> But regarding the management issue, it's remarkable that over it's
> long development period the RT-11 monitor was built from only a half
> dozen source modules with almost all the critical code concentrated
> into two or three modules. Accidents were rare.
Impressive. But I guess discipline was necessary, or else it would never
have survived. Just like all OSes.
>> DCL and RMS are not on the same level as the kernel. However, it is
>> sometimes hard to tell the difference when looking in from the outside.
>> A service like $QIO cannot make another system call, that is my claim.
>
> These are some of the calls I looked at tonight.
>
> SYSASSIGN: $ASSIGN, $QIO, $DEASSIGN
> SYSSETTIM: $ASSIGN, $QIO, $DEASSIGN
> SYSSNDJBC: $PARSE, $SEARCH,
> $ASSIGN, $QIO, $DEASSIGN
> SYSSNDMSG: $ASSIGN, $QIO, $DEASSIGN
>
> (but it's still a separate issue)
Yeah, drifting into VMS questions. How did we get that low? :-)
(I can't find anything about any SYSASSIGN, by the way. SYS$ASSIGN is
the $ASSIGN you have, which is the same as ALUN$ in RSX, but I'm not
clear what SYSASSIGN is.)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
next prev parent reply other threads:[~2012-02-18 20:59 UTC|newest]
Thread overview: 222+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-15 14:37 PDP11 Values from MFPT Jerome H. Fine
2012-01-18 6:03 ` paramucho
2012-01-18 11:28 ` Johnny Billquist
2012-01-18 13:05 ` glen herrmannsfeldt
2012-01-18 13:26 ` Johnny Billquist
2012-01-26 3:24 ` Jerome H. Fine
2012-01-26 13:38 ` Johnny Billquist
2012-01-29 1:32 ` Jerome H. Fine
2012-01-29 1:43 ` Johnny Billquist
2012-01-26 3:23 ` Jerome H. Fine
2012-01-18 16:02 ` paramucho
2012-01-18 18:12 ` Johnny Billquist
2012-01-19 14:30 ` paramucho
2012-01-19 16:42 ` Johnny Billquist
2012-01-19 20:32 ` glen herrmannsfeldt
2012-01-20 13:32 ` paramucho
2012-01-20 13:29 ` paramucho
2012-01-20 16:48 ` Johnny Billquist
2012-01-21 12:25 ` paramucho
2012-01-21 20:15 ` Johnny Billquist
2012-01-26 3:25 ` Jerome H. Fine
2012-01-26 6:09 ` paramucho
2012-01-26 6:30 ` paramucho
2012-01-26 13:50 ` Johnny Billquist
2012-01-29 1:52 ` Jerome H. Fine
2012-01-29 2:08 ` Johnny Billquist
2012-01-26 13:48 ` Johnny Billquist
2012-01-26 13:46 ` Johnny Billquist
2012-01-29 1:35 ` Jerome H. Fine
2012-01-18 12:41 ` glen herrmannsfeldt
2012-01-18 13:18 ` Johnny Billquist
2012-01-18 14:28 ` glen herrmannsfeldt
2012-01-18 15:14 ` Johnny Billquist
2012-01-18 21:54 ` glen herrmannsfeldt
2012-01-18 22:32 ` Al Kossow
2012-01-19 0:22 ` Johnny Billquist
2012-01-19 1:30 ` glen herrmannsfeldt
2012-01-19 14:32 ` Bob Koehler
2012-01-19 16:45 ` Johnny Billquist
2012-01-20 17:55 ` Bob Koehler
2012-01-20 18:38 ` Bill Gunshannon
2012-01-18 16:25 ` paramucho
2012-01-18 18:00 ` Johnny Billquist
2012-01-19 14:25 ` paramucho
2012-01-19 16:50 ` Johnny Billquist
2012-01-20 13:32 ` paramucho
2012-01-20 16:54 ` Johnny Billquist
2012-01-21 13:16 ` paramucho
2012-01-21 13:58 ` Bob Eager
2012-01-21 20:02 ` Johnny Billquist
2012-01-22 11:59 ` Johnny Billquist
2012-01-22 14:03 ` paramucho
2012-01-22 16:15 ` Johnny Billquist
2012-01-23 4:14 ` paramucho
2012-01-18 13:20 ` Bob Eager
2012-01-19 14:29 ` Bob Koehler
2012-01-21 12:44 ` Tim Shoppa
2012-01-21 13:50 ` paramucho
2012-01-22 16:56 ` Tim Shoppa
2012-01-22 18:11 ` glen herrmannsfeldt
2012-01-23 3:52 ` paramucho
2012-01-21 14:25 ` glen herrmannsfeldt
2012-01-21 16:46 ` Bob Eager
2012-01-25 22:12 ` Tim Shoppa
2012-01-26 3:22 ` Jerome H. Fine
2012-01-26 13:46 ` paramucho
2012-01-29 1:34 ` Jerome H. Fine
2012-01-29 15:46 ` paramucho
2012-02-01 3:53 ` Jerome H. Fine
2012-02-01 11:22 ` paramucho
2012-02-01 11:48 ` Johnny Billquist
2012-02-01 13:48 ` paramucho
2012-02-01 14:43 ` stan
2012-02-01 16:37 ` paramucho
2012-02-01 18:05 ` stan
2012-02-02 2:24 ` Jerome H. Fine
2012-02-02 0:14 ` Johnny Billquist
2012-02-02 2:25 ` Jerome H. Fine
2012-02-02 9:29 ` Johnny Billquist
2012-02-02 18:52 ` glen herrmannsfeldt
2012-02-03 0:12 ` Johnny Billquist
2012-02-03 4:07 ` Jerome H. Fine
2012-02-03 14:15 ` Johnny Billquist
2012-02-03 15:00 ` paramucho
2012-02-02 13:31 ` paramucho
2012-02-02 19:07 ` glen herrmannsfeldt
2012-02-03 0:16 ` Johnny Billquist
2012-02-03 4:23 ` glen herrmannsfeldt
2012-02-03 12:01 ` Johnny Billquist
2012-02-03 15:36 ` Joe Oswald
2012-02-07 10:46 ` Johnny Billquist
2012-02-03 4:29 ` Jerome H. Fine
2012-02-03 12:50 ` Bill Gunshannon
2012-02-04 8:42 ` Charles Richmond
2012-02-04 13:38 ` paramucho
2012-02-04 16:03 ` Bill Gunshannon
2012-02-04 16:39 ` paramucho
2012-02-03 10:48 ` paramucho
2012-02-03 11:24 ` Johnny Billquist
2012-02-04 17:06 ` paramucho
2012-02-04 18:22 ` paramucho
2012-02-04 18:55 ` Johnny Billquist
2012-02-04 19:13 ` Bill Gunshannon
2012-02-05 13:28 ` Johnny Billquist
2012-02-05 18:15 ` glen herrmannsfeldt
2012-02-04 18:51 ` Johnny Billquist
2012-02-04 23:09 ` glen herrmannsfeldt
2012-02-05 14:01 ` paramucho
2012-02-05 15:31 ` Johnny Billquist
2012-02-06 13:50 ` paramucho
2012-02-06 14:45 ` Johnny Billquist
2012-02-06 14:58 ` paramucho
2012-02-06 16:25 ` Johnny Billquist
2012-02-05 14:27 ` Johnny Billquist
2012-02-05 13:57 ` paramucho
2012-02-05 15:44 ` Johnny Billquist
2012-02-06 13:51 ` paramucho
2012-02-06 14:56 ` Johnny Billquist
2012-02-06 16:40 ` Johnny Billquist
2012-02-07 14:50 ` paramucho
2012-02-07 16:20 ` Johnny Billquist
2012-02-08 13:34 ` paramucho
2012-02-08 16:03 ` Johnny Billquist
2012-02-08 16:58 ` paramucho
2012-02-08 22:29 ` Johnny Billquist
2012-02-10 13:12 ` paramucho
2012-02-10 19:20 ` glen herrmannsfeldt
2012-02-11 13:12 ` paramucho
2012-02-11 20:06 ` glen herrmannsfeldt
2012-02-11 20:23 ` Johnny Billquist
2012-02-10 19:29 ` Johnny Billquist
2012-02-11 13:15 ` paramucho
2012-02-11 21:09 ` Johnny Billquist
2012-02-12 17:23 ` paramucho
2012-02-12 18:35 ` paramucho
2012-02-13 17:30 ` paramucho
2012-02-14 13:14 ` Johnny Billquist
2012-02-14 16:20 ` paramucho
2012-02-14 17:30 ` Johnny Billquist
2012-02-13 23:18 ` Johnny Billquist
2012-02-14 16:20 ` paramucho
2012-02-14 17:47 ` Johnny Billquist
2012-02-14 18:17 ` paramucho
2012-02-14 19:54 ` Johnny Billquist
2012-02-15 12:58 ` paramucho
2012-02-15 17:12 ` Johnny Billquist
2012-02-16 13:54 ` paramucho
2012-02-16 20:15 ` Johnny Billquist
2012-02-17 12:41 ` paramucho
2012-02-17 17:13 ` Johnny Billquist
2012-02-18 11:24 ` Johnny Billquist
2012-02-18 14:28 ` paramucho
2012-02-18 20:07 ` Johnny Billquist
2012-02-18 11:55 ` paramucho
2012-02-18 20:58 ` Johnny Billquist [this message]
2012-02-20 2:29 ` Jerome H. Fine
2012-02-20 5:54 ` paramucho
2012-02-20 17:14 ` Jerome H. Fine
2012-02-20 18:05 ` Johnny Billquist
2012-02-21 6:16 ` paramucho
2012-02-21 17:38 ` Jerome H. Fine
2012-02-21 19:31 ` Johnny Billquist
2012-02-20 5:53 ` paramucho
2012-02-20 10:28 ` Johnny Billquist
2012-02-21 3:33 ` Jerome H. Fine
2012-02-21 6:17 ` paramucho
2012-02-21 10:23 ` Johnny Billquist
2012-02-21 11:37 ` paramucho
2012-02-21 14:16 ` Johnny Billquist
2012-02-21 16:42 ` paramucho
2012-02-21 19:43 ` Johnny Billquist
2012-02-22 12:21 ` paramucho
2012-02-22 14:12 ` paramucho
2012-02-22 15:26 ` Johnny Billquist
2012-02-22 14:33 ` paramucho
2012-02-22 15:53 ` Johnny Billquist
2012-02-22 16:48 ` paramucho
2012-02-22 21:17 ` Johnny Billquist
2012-02-23 12:42 ` paramucho
2012-02-23 13:51 ` paramucho
2012-02-23 15:17 ` Johnny Billquist
2012-02-20 2:22 ` Jerome H. Fine
2012-02-20 6:07 ` paramucho
2012-02-21 3:29 ` Jerome H. Fine
2012-02-21 8:06 ` paramucho
2012-02-21 10:38 ` Johnny Billquist
2012-02-21 11:54 ` paramucho
2012-02-21 14:20 ` Johnny Billquist
2012-02-21 15:13 ` paramucho
2012-02-21 15:20 ` Johnny Billquist
2012-02-22 2:51 ` Jerome H. Fine
2012-02-22 6:37 ` paramucho
2012-01-18 11:20 ` Johnny Billquist
2012-01-26 3:21 ` Jerome H. Fine
2012-01-26 14:12 ` Johnny Billquist
2012-01-26 15:26 ` paramucho
2012-01-29 1:41 ` Jerome H. Fine
2012-01-29 2:04 ` Johnny Billquist
2012-01-29 2:31 ` Johnny Billquist
2012-01-29 1:39 ` Jerome H. Fine
2012-01-29 1:45 ` Johnny Billquist
2012-01-30 2:21 ` Bob Supnik
2012-01-31 7:14 ` paramucho
2012-01-31 9:42 ` Johnny Billquist
2012-01-31 14:24 ` Bill Gunshannon
2012-01-31 20:17 ` Johnny Billquist
2012-01-31 21:39 ` Bill Gunshannon
2012-01-31 23:43 ` glen herrmannsfeldt
2012-02-01 3:56 ` Jerome H. Fine
2012-02-01 11:53 ` Johnny Billquist
2012-02-01 13:48 ` paramucho
2012-02-02 0:20 ` Johnny Billquist
2012-02-02 2:22 ` Jerome H. Fine
2012-02-01 12:14 ` Johnny Billquist
2012-02-01 16:27 ` glen herrmannsfeldt
2012-02-01 5:28 ` Charles Richmond
2012-02-01 11:54 ` Johnny Billquist
2012-02-01 3:55 ` Jerome H. Fine
2012-02-01 11:22 ` paramucho
2012-02-01 12:03 ` Johnny Billquist
2012-02-01 3:54 ` Jerome H. Fine
2012-02-01 12:09 ` Johnny Billquist
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