[Info-vax] Y3K for PDP-11 Operating Systems
Johnny Billquist
bqt at softjar.se
Mon May 9 21:36:58 EDT 2011
On 2011-05-09 18.12, vandys at vsta.org wrote:
> In alt.sys.pdp11 Johnny Billquist<bqt at softjar.se> 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
More information about the Info-vax
mailing list