From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: f7344,ff7071ebb62b149f X-Google-NewGroupId: yes X-Google-Thread: fdd80,20cce773a38e2849 X-Google-NewGroupId: yes X-Google-Thread: 1164f8,20cce773a38e2849 X-Google-NewGroupId: yes X-Google-Attributes: gid3717dac89a,gide311f70d09,gidd180ab3bd8,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!2a01:348:65::2.MISMATCH!news-transit.tcx.org.uk!news.stack.nl!newsfeed.Update.UU.SE!news.Update.UU.SE!not-for-mail From: Johnny Billquist Newsgroups: comp.os.vms,alt.sys.pdp11,comp.sys.dec,vmsnet.pdp-11 Subject: Re: Y3K for PDP-11 Operating Systems Date: Mon, 09 May 2011 19:36:58 -0600 Organization: Update Computer Club Message-ID: References: <4d99c3b6$0$23756$14726298@news.sunsite.dk> <4dc032d4$0$313$14726298@news.sunsite.dk> <7d287cc3-4605-49a0-826e-fb92fc14e98d@j28g2000vbp.googlegroups.com> <92bjl8F19sU1@mid.individual.net> <92d114Fhm7U1@mid.individual.net> <92ddfkF764U1@mid.individual.net> <4DC4390F.9040401@eisner.decus.org> <92r5ntFf3hU1@mid.individual.net> <92raajFe87U1@mid.individual.net> <92re7gF8btU1@mid.individual.net> NNTP-Posting-Host: 74.125.59.49 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: Iltempo.Update.UU.SE 1304991420 14709 74.125.59.49 (10 May 2011 01:37:00 GMT) X-Complaints-To: newsmaster@Update.UU.SE NNTP-Posting-Date: Tue, 10 May 2011 01:37:00 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <92re7gF8btU1@mid.individual.net> Xref: g2news2.google.com comp.os.vms:42885 alt.sys.pdp11:2163 comp.sys.dec:3486 vmsnet.pdp-11:591 On 2011-05-09 18.12, vandys@vsta.org wrote: > In alt.sys.pdp11 Johnny Billquist wrote: >> I know that for some things, actually coding using more primitive >> instructions on the (older) VAXen turned out to be faster than to use >> the fancy instructions, but I would not have thought that was true for >> things like MOVC or LOCC, but I might very well be wrong. > > I'm pretty sure we ended up with a hand coded bcopy() back in the day. > It might've been that we could do optional initial odd, and then move > as words. I think I heard that later Vaxen microcode would do that too. Hmm. Memory alignment issues... Good point. Otherwise, I'm also pretty sure that a function like strcpy() is much better to do on your own, as the VAX really don't have a good way of implementing that. Doing first a LOCC to get the length, and then a MOVC to move the string will surely be less efficient than just doing a MOV followed by a conditional branch to loop... Obviously, for C stuff, anything dealing with strings is opposed to how a VAX wants things. :-) >> (The big win, however, was >> obviously the loads of actual code needed to do a context switch which >> was reduced to just a few bytes on a VAX. :-) ) > > I'm pretty sure I remember that BSD on the Vax never ended up using > the high level task instructions. I can remember trying to make it > line up, and ending up deciding it cost more than it saved. I know that NetBSD/VAX use those, and I'm almost sure you cannot do a context switch without them. > No doubt VMS did, as otherwise, well, what was the point? :-> :-) > This all dribbles back to that old RISC versus CISC argument. I think the > MIPS context switching I coded was faster than anything comparable on a x86 > or Vax. OTOH, MIPS was never able to beat the TLB miss performance of the > x86. The ultimate (implied) instruction! Indeed. But context switching goes a bit beyond the RISC/CISC as well. It's also a question of how much is held in a context (admittedly, I suspect this sortof follows hand in hand with CISC vs. RISC, but anyway), if you have lots of context, saving it will take more time than if you have just a little. And that means both processor state, as well as MMU state, and what else there might be in things like cache invalidations. Johnny