From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: 1164f8,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidd180ab3bd8,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.238.198 with SMTP id vm6mr9245992pbc.3.1329566136129; Sat, 18 Feb 2012 03:55:36 -0800 (PST) Path: wr5ni39429pbc.0!nntp.google.com!news2.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: paramucho@hotmail.com (paramucho) Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: PDP11 Values from MFPT Date: Sat, 18 Feb 2012 11:55:21 GMT Organization: Aioe.org NNTP Server Message-ID: <4f3f6194.19510701@nntp.aioe.org> References: <4f37ec05.63303162@nntp.aioe.org> <4f3a87d9.14307647@nntp.aioe.org> <4f3ca414.21534066@nntp.aioe.org> <4f3dab02.35785786@nntp.aioe.org> <4f3d06f0.6951576@nntp.aioe.org> <4f3f4ae9.40953632@nntp.aioe.org> Reply-To: paramucho@hotmail.com NNTP-Posting-Host: CmgvwL3sOlojnxUjt8znzA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 1.5/32.451 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Fri, 17 Feb 2012 18:13:44 +0100, Johnny Billquist wrote: >> 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. >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. >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? >> 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. >In more recent versions of VMS, they moved much of the ACP code into the >kernel, to improve performance by avoiding the context switching, so you >have something called an XQP doing the ACP work, but the interface did >not change. >And you still have the ACP around, for some operations. >You'll see it if you look at what processes are running. Yes, I remember when they put XQP in. I spent a few years working with VMS. I remembed thinking that XDP was a bit more like the RUST/XM ACP concept. >I can possibly buy that RT-11 works like windows, but mostly because I >don't know how windows works, so I can buy any claims for it. :-) > >> 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. >> 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 >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. (And, of course, the system/fork state exit path must also raise IPL, but you know that.) >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. >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. >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. >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. > 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. 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. >>>> 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." > >I said "does *not* complete immediately", which means they will block. >For scheduling to be relevant in the middle of a system call, the system >call will have to be stalled for some significant time for it to be >relevant. My claims were that VMS system calls are not wrapped in system state as they are in RSX and that VMS system calls could themselves issue system calls (where RSX clearly cannot). I didn't make a statement about whether VMS system calls return immediately or not. That's a separate issue and not necessary for my claim. >>> 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. > >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) Ian