From: paramucho@hotmail.com (paramucho)
Subject: Re: PDP11 Values from MFPT
Date: Thu, 16 Feb 2012 13:54:22 GMT [thread overview]
Message-ID: <4f3d06f0.6951576@nntp.aioe.org> (raw)
In-Reply-To: jhgp22$lh6$1@Iltempo.Update.UU.SE
On Wed, 15 Feb 2012 18:12:33 +0100, Johnny Billquist <bqt@softjar.se>
wrote:
<snip>
>It is only a problem in kernel mode. And I've not yet seen anything that
>convinces me that allowing page faults in kernel mode gains you
>anything, but can cost you a lot.
<snip>
>What do you expect do to if you get a page fault in kernel mode?
>Suspend the execution of something in kernel mode while the page is
>being read in, in order to be able to restart the execution. This
>becomes very messy, since this means you need to be able to suspend
>execution at random places in the kernel.
Nothing random about it at all. There are key points of contact with
processes, each having it's own specific reason. At present I manage
some of these contact points with MFPx/MFTx, in other places by
mapping a kernel window. In either situation I will be able to choose
if I want to lock a page in advance or not. It's not much more
complicated than the current situation (where each point of contact is
expected to care of unexpected errors anyway).
>I simply does not think that is a good idea.
<snip>
>Instead having page faults possible in the kernel comes with other
>costs, which are much higher, I think.
We simply disagree on the issue of kernel page faults.
>>> And as for "across the access", I'm not really fond of the Unix way of
>>> having user processed get bogged down in the kernel and being preempted
>>> and suspended in kernel mode. I prefer having all the service by the
>>> kernel be finished immediately, and get back out to userland, and wait
>>> there. So you need to be sure that what you are going to access is
>>> available in the beginning, and after that, it will stay around until
>>> your piece of service is finished. No additional checks.
<snip>
>Yes, system calls are handled in the kernel in RSX, and are run to
>completion before normal scheduling can continue. However, all system
>calls are really just performing one thing, which always is known to be
>able to run from start to finish without blocking or having other
>issues, so system calls never really block anything. System calls are at
>the same level as forks, and of course you cannot allow two system
>calls, or fork processes to run simultaneously, since that would mean
>you get data corruption in the kernel.
It was a great idea when RSX was very young and a simple multi-tasking
system. As a grown-up general-purpose O/S I think the approach
involves some serious limitations. While I'm certain that the earlier
systm calls were in and out of the kernel pretty quickly I'm not sure
that that's the case for a lot of the later directives.
>> RT-11, RUST/XM and VMS control preemption entirely through
>> mutexs/semaphores etc and system state. The kernel code which
>> implements system calls for processes is just as preemptable as user
>> mode code (and is reentrant). Anything less than that would seem
>> pretty antiquated to me.
>
>RT-11 does no such thing. I remember having this discussion in the past
>(with you?). Whenever any one program enters USR, all other calls will
>be blocking until the first called exits USR again, and then one other
>process can enter that whole thing. So only one program at a time can
>for example create a file, or use the command line parser.
I don't think your previous "discussion" was with me, or least I hope
it wasn't, because the view you present is completely inaccurate.
The "USR" is to RT-11 what the "F11ACP" is to RSX. You can't describe
the scheduling dynamics of the RSX kernel on the basis of the F11ACP
behavior and you can't describe RT-11's scheduling dynamics on the
basis of the USR behavior. They're quite different things.
The RT-11 USR is a sub-system which handles ACP-like services, driver
fetch and the like. Access to the USR (ACP) is queued on a system-wide
basis. I am not sure whether the RSX F11ACP is single-threaded for all
devices or not.
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.
>But to be clear, RSX protects the whole kernel through a lock, and does
>not depend on system state or processor priority levels (apart from the
>actual lock operations, which are using the IPL itself to protect them).
>Which is why adding MP to RSX was also a rather simple operation.
By "system state" I mean basically the same state as "fork state". In
RSX that also involves a switch to the "system stack". System state
runs at IPL 0. $DIRSV switches to system state.
>RT-11 plays with the IPL at various places to protect code which is
>sensitive.
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
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 ;;;
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.
The idea that RT-11 manages system synchronisation via IPL is simply
wrong. System state and queues are used to manage synchronisation.
>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.
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.
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.
Ian
next prev parent reply other threads:[~2012-02-16 13:54 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 [this message]
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
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