From: paramucho@hotmail.com (paramucho)
Subject: Re: PDP11 Values from MFPT
Date: Fri, 17 Feb 2012 12:41:20 GMT [thread overview]
Message-ID: <4f3f4ae9.40953632@nntp.aioe.org> (raw)
In-Reply-To: jhjo5s$oga$1@Iltempo.Update.UU.SE
On Thu, 16 Feb 2012 21:15:55 +0100, Johnny Billquist <bqt@softjar.se>
wrote:
<snip>
>> The RT-11 CSI (Command String Interpreter) was originally located in
>> the USR. These days, in multi-tasking RT-11, initial CSI processing is
>> handled outside the USR. Programs don't have to queue for command
>> processing.
>
>Looking at the source, it would appear that anyone calling anything
>related to USR will lock everything else out from calling USR. I can see
>CSI in there, but it might be that some additional trickery is located
>somewhere.
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).
>But it's way more locking things out than RSX ever does.
That's confusing the "ACP" with the system.
> Not to mention
>that a process doing a call to open or create a file actually is not
>blocked in RSX. It can continue running happily on for ever before that
>call completes.
I don't recall anyone *ever* requesting an asynchronous USR under
RT-11. It's just not functionality which is needed most of the time.
When I have needed it, there have been workarounds. In one instance I
was able to keep the continuous activity going in chained ASTs. In
another case I used two tasks. That was a long time ago.
The RT-11 approach to ACP operations is more like VMS or Windows.
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.
<snip>
>> RT-11 uses IPL for hardware synchonisation in just the same way that
>> RSX does. The fork routine is a good example. Here's the RSX code.
>>
>> $FORK0::MOV (SP)+,-(R4) ;SET FORK PC
>> CLR -(R4) ;CLEAR LINK TO NEXT FORK BLOCK
>> MFPS -(SP) ;SAVE CURRENT PROCESSOR PRIORITY
>> MTPS #PR7 ;;;LOCK OUT INTERRUPTS
>> MOV R4,@$FRKHD+2 ;;;LINK NEW ENTRY TO OLD LAST
>> MOV R4,$FRKHD+2 ;;;SET ADDRESS OF NEW LAST
>> MTPS (SP)+ ;;;RESTORE PROCESSOR PRIORITY
>
>The fork routine does not run with raised IPL. It's only the
>enquing/dequeing of the fork block that is protected by the IPL, just
>like I said.
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.
> And that is also the part that have to have even more
>protection if you have an MP system, since even IPL will not protect you
>enough. I suspect you looked at 11M and not MP again here, right?
>(Or else a rather old version of RSX.)
I have the sources off an 3.x distribution of RSX-11M that I found on
the web. I guess they were provided for SYSGEN. They're incomplete. In
particular, I don't have the FCS code.
>> And RT-11 implements some queue operations by blocking IPL briefly:
>>
>> MARKTM::TST (R5)+ ;Point to avail header
>> SPL 7 ;Get element at PRIO 7
>> MOV @R5,R3 ;;; Get element
>> BEQ 60$ ;;; None there, error
>> MOV @R3,@R5 ;;; Link avail queue forward
>> SPL 0 ;;;
>
>Yes. Exactly. And all of that kind of operations are in RSX done at the
>fork level, without IPL protection, because it is not needed.
It could also be handled in RT-11 by entering and then leaving system
state. But, practically speaking, there is no advantage in entering
system state to protect a mere three instructions since even more
instructions execute at IPL 7 by entering and leaving system state.
>That's what the forks are for. If RT-11 don't use forks for this, what
>do RT-11 use forks for?
Fork is used by drivers. ENSYS performs the same functionality for the
monitor code. There are about twenty tasks performed by ENSYS in the
RT-11 monitor. A later section of the MARKTM code uses ENSYS to switch
to system state to insert the mark time request in the queue. The
other system calls involving the timer queue switch to system state at
the appropriate time. I/O code switches to system state to insert I/O
elements into I/O queues and to call drivers. Extended memory is
allocated and deallocated in system state.
But on the matter of IPL and RSX, I note that RSX also raises IPL to
complete certain tasks, in the system and in drivers. Indeed, I count
about 5000! occurrences of raised IPL in the RSX sources (by searching
for ";;;").
>> However, the primary tool that RT-11 uses for system (scheduler)
>> synchronisation is ENSYS, which switches to system state (fork state).
>> There are about twenty calls to $ENSYS in the resident monitor.
>
>Yes, I can see a bunch of calls to ENSYS. And as far as I can tell,
>ENSYS raises the SPL to 7, before coming back to where it was invoked.
>Locking out all interrupts every time. Each routine can then, when it
>suitable, drop the IPL.
Incorrect. ENSYS raises IPL for exactly four instructions (in the
mapped monitor) and then lowers it back to zero. The mask in the final
instruction (BIC (R4)+,@R4) is always "PR7" for ENSYS. ENSYS code do
not choose when to drop IPL, as it has already been returned to zero.
IPL is not used for the purposes you indicate.
SPL 7 ;Enter here to switch into System State
$INTEN::MOV R4,-(SP) ;;; Save R4
INC (PC)+ ;;; Bump level pointer
INTLVL:: .WORD -1 ;;; Interrupt level
MOV #<PS>,R4 ;;; R4 -> PS
BIC (R5)+,@R4 ;;; Down to handler priority
(In fact, if you examine the routine above, the raised IPL is
completely redundant. ENSYS raises IPL to imitate the environment of a
driver ISR. $INTEN is the code which lowers priority for a driver. In
the case of a driver the (R5)+ mask can be used to lower IPL to device
IPL).
>There is also this FRK routine, which I assumed
>was how you created a fork in RT-11, but I might have missed something.
>The only thing calling FRK is SP.MAC, that I can see.
Drivers use the driver macro .FORK to fork. It usually comes within a
few instructions of .DRAST, which is the driver ISR entry point.
>> The idea that RT-11 manages system synchronisation via IPL is simply
>> wrong. System state and queues are used to manage synchronisation.
>
>I obviously find it different when looking. ENSYS uses the IPL (always
>raising it to 7). Various functions like the mark time uses the IPL to
>protect structures. I didn't say "synchronization", but "protection".
>You can find it in lots of places, like I said.
ENSYS is exactly the same as DIRSV in this regard. So, if you want to
argue that ENSYS's brief use of IPL means that ENSYS is using IPL to
protect structures then you have to accept that DIRSV's brief use of
IPL implies that DIRSV is also using IPL to protect structures. I
think that's silly. IPL is being used for a short act of hardware
protection so that a process may enter system state. It is then system
state which provides the protection, not IPL.
Indeed, I quote from an earlier statement by yourself above:
The fork routine does not run with raised IPL. It's only the
enquing/dequeing of the fork block that is protected by the IPL,
just like I said.
Likewise, ENSYS code does not run with raised IPL. It's only the entry
and exit code which is protected by IPL--the exit code has to check
for pending fork routines and the like.
>>> VMS is basically working the same way as RSX in most places, but adapted
>>> to the different memory subsystem of the VAX. Which means you don't have
>>> different address spaces for different modes. And of course, you have
>>> paging, and there are some rather more synchronous services in there in
>>> some places.
>>
>> When talking about system calls, I don't know how you can say that VMS
>> works basically like RSX unless you can assert that VMS executes
>> system calls, from start to finish, in system state (i.e. at fork
>> level), and that's just not the case. Scheduling is not blocked for
>> the duration of a VMS system calls as it is for an RSX system call.
>> That's a fundamental difference.
>
>What system calls does not complete immediately in VMS?
"I didn't say" "complete immediately" but rather "blocked for the
duration." Again, "Scheduling is not blocked for the duration of a VMS
system calls as it is for an RSX system call. That's a fundamental
difference."
>Honestly asking
>since I don't know the answer myself, and cannot think of any straight
>off my head.
I suggest you go through the list in the on-line documentation:
http://h71000.www7.hp.com/doc/73final/4527/4527pro_contents.html
$CREPRC, $MOUNT and $RMSRUNDWN are candidates--but it's been a long
time since I examined VMS system service sources. Some of the requests
for system information could take a long time to process.
>> VMS and RT-11 take the same approach. Processing of a aystem service
>> does not initially alter the process scheduling state. System state is
>> used selectively, usually for short periods, when synchronisation is
>> required. Further, both systems are reentrant: RT-11 and VMS system
>> call code can issue system calls. RSX system call code cannot.
>
>Are you sure you are not mixing up the kernel with DCL, RMS and
>libraries in VMS here?
Are you saying that VMS system services cannot themselves issue system
service calls? That was my point.
Regarding DCL, RMS etc, I think a case could be made for considering
RMS operations such as $OPEN, $CLOSE etc for being system calls under
VMS since they are the typical method by which files are opened and
closed. This functionality is certainly considered to be system
functionality under RT-11 and Windows. However, the point is not
necessary for my argument.
>> The architecture of the RUST/XM kernel was based on a mixture of VMS
>> and RT-11. There were few problems harmonising the two systems because
>> they are fundamentally similar. Indeed, the system dynamics of RT-11,
>> RUST/XM, RSX and VMS are constructed using the same building blocks.
>> The principal difference is that RSX puts a system state wrapper
>> around its system calls where the other systems do not.
>
>VMS is very closely engineered like RSX in so many ways that I would
>find it odd if you could substantiate that it works more like RT-11. But
>I have been surprised before, and am ready for it again.
I'm not saying that in general terms VMS is *more* like RSX than
RT-11. That's simply not the case. The roots of VMS are found in RSX.
I'm pointing to a particular set of behaviors where VMS dropped some
the RSX behavior and did things in a way which was more like RT-11.
I'm not saying that they were influenced by RT-11 either. I think they
did what anyone does when they write a new system: keep the good bits
and get rid of the weak points of the previous system.
Ian
next prev parent reply other threads:[~2012-02-17 12:41 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 [this message]
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
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