On 2023-09-25 20:17, Paul Koning wrote:
On Sep 25, 2023, at 2:06 PM, Andrew Ball <asbatwrk%gmail.com@localhost> wrote: Hello Paul, M> I have not. I grabbed a copy of simh some time ago, but I nevergot around to convincing it to build.ASB> It built and runs on my amd64 machine. It's not fast and ofcourse even when the simulated VAX isn't busy the host machine is kept busy emulating the idle VAX. It's one of the few things I do that make me want a faster desktop computer.PK> SIMH can handle idling and does so very well, provided it knowsthe idling scheme used. On some machines, like the PDP-11, the ISA has a WAIT instruction. On VAX, there isn't one, so there the code uses various schemes to recognize the idle loop of the OS. It needs to know what OS you're running, and of course it needs to have sufficiently accurate logic matching what your OS actually does.I wonder why VAX lacked that when the PDP-11 had it. My emulated VAX runs NetBSD/vax 9.3.The VAX architects apparently didn't see the need for WAIT, or they felt it was too much trouble to implement. In any case, it isn't part of the instruction set. Instead, when there is nothing else to do, you tend to be in a loop in the scheduler looking for action. What that looks like depends on the OS.
At the time, a WAIT didn't seem like it would add any value on the VAX. I think they just simply thought that WAIT on the PDP-11 wasn't really that useful for anything more than making pretty patterns on the front panel, and the VAX don't have a front panel anyway...
Of course, as soon as you started talking about virtual machines, it did make sense again. So I think there is something in VARM about this, but I don't think anything implemented, or used it. Hindsight and all that...
However, long time ago we (well, not me I think) added a little hack to allow simh to detect if the CPU is idle by playing with the IPL, if I remember right.
There's precedent for that; even on the PDP-11, the SJ variant of RT-11 does the same sort of thing, spinning waiting for work rather than executing a WAIT instruction. So every other PDP-11 OS will idle well in SIMH but RT-11/SJ will not.
Yeah... Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt%softjar.se@localhost || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol