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.221.4 with SMTP id qa4mr17202425pbc.7.1329921237616; Wed, 22 Feb 2012 06:33:57 -0800 (PST) Path: wr5ni55488pbc.0!nntp.google.com!news1.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: Wed, 22 Feb 2012 14:33:49 GMT Organization: Aioe.org NNTP Server Message-ID: <4f44f914.47689786@nntp.aioe.org> References: <4f3f4ae9.40953632@nntp.aioe.org> <4f3f6194.19510701@nntp.aioe.org> <4f41dd56.1857737@nntp.aioe.org> <4f4434a7.18816544@nntp.aioe.org> <4f43806e.38215767@nntp.aioe.org> <4f45b539.51730368@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 Tue, 21 Feb 2012 20:43:34 +0100, Johnny Billquist wrote: http://bitsavers.org/pdf/dec/vax/vms/training/ EY-00014-DP_VMS_Internals_and_Data_Structures_1984.pdf >> System waits ("blocks") may terminate prematurely because of various >> conditions, including stuff that ASTs do. So, when a system wait >> returns, the routine has to make sure that it's actual condition has >> been satisfied, and if it hasn't then it reissues the system wait. The >> stack is not a problem. > >So you need to restart the system call. What if it is a system call that >have been partially completed? The wait does not happen as a unique part >of the call. The previous response was written before I actually checked the documentation. I pressed [SEND] by mistake. In fact, there are only three "regular" VMS system calls which issue "system waits": hibernate, wait-for-event-flag and wait-for- event-group (or something like that). The entire system call is nothing more than a "wait" (so partial completion does not occur). In VMS, the wait does take place in the mode that the system service was executed with the PC/PSL backed-up to reissue the Change-mode instruction for the system call. The main reason for this has more to do with the orderly handling of processor modes than it has to do with kernel context. >Oh, wait, I bet you are thinking in terms of RT-11 here, where the >distinction between user mode and kernel mode is rather blurry. I've used VMS more in the last twenty years than I have RT-11. If my thinking is blurry it's because of my hippie memory. >In Unix, as an example, there is no context around to restart in the >middle of a system call. What you have left is the context at user mode, >which is then the start of the system call again. >And this is because a signal is delivered in user mode, so the process >gets out of the kernel, in order to run the signal handler. There is no >way you can keep the kernel context for the user process around at that >point. It can not live on the kernel stack, since you exited from the >kernel. It can not live on the user stack, since that would allow you to >break the security of the kernel. This is a separate issue to the system waits above. Ast delivery is (hardware) controlled by the REI instruction which compares the mode of pending asts against the destination mode of the REI. For example, user mode asts are note delivered when the REI destination mode is kernel. Essentially, from what I can see, asts just have to wait. So, effectively, VMS is just as bad as RSX in this regard. So, I was right when I remembered that system calls are not restarted (involuntarily), but I completely forgot about the hardware mechanism. I'll have another look at this stuff on the weekend. VMS is not always obvious. >>> See http://en.wikipedia.org/wiki/PCLSRing for more details. >> >> That seems to be some other issue. > >No. It is totally the issue. See my comments above. > >RT-11 can, however, get away with some things that you cannot do in >systems where user mode and kernel mode are totally separate and >isolated from each other. RT-11/XM and RUST/XM are memory mapped PDP-11 systems where user mode and kernel mode are separate. I'm not sure what your point is. >Assuming I'm right, I can see why a lot of discussion and confusion >comes up between us. The conditions in RT-11 are rather different than >other systems, meaning you can do stuff that is totally impossible in >other OSes. I think the confusion comes more because I use VMS examples and you use Unix examples. I know nothing about the Unix kernel and you don't seem have looked VMS a lot. I don't think the techniques used in RUST or RT-11 are impossible in other OSes. In fact, I'm curious where the RT-11 techniques came from. The V2.0 team leader who implemented this stuff had previously worked on both RSTS and TOPS-something I think. Ian