Discussion:
[Simh] vax idle for NetBSD
Paul Koning
2018-11-15 14:32:12 UTC
Permalink
I just installed NetBSD/VAX V8 on SIMH. The documentation mentions "set cpu idle=netbsd", but it doesn't work -- I'm stuck at 100% CPU.

I'm running it on the microvax3900 simulator, if that makes a difference. Any ideas?

paul
Mark Pizzolato
2018-11-15 15:21:42 UTC
Permalink
Hi Paul,
Post by Paul Koning
I just installed NetBSD/VAX V8 on SIMH. The documentation mentions "set
cpu idle=netbsd", but it doesn't work -- I'm stuck at 100% CPU.
I'm running it on the microvax3900 simulator, if that makes a difference. Any ideas?
I thought this had gotten settled a long time ago.

At one point, the BSD code that implemented what the OS does when there is nothing else to do got changed from how things were done in earlier BSD kernels. The big change seemed to align with when SMP support was added to the kernel to support other (non VAX) architectures. This restructuring created some platform specific routine which existed to do what was good on that platform while idling. As it turned out, what was initially implemented in the VAX specific code that did that was operationally indistinguishable from other code running elsewhere in the OS, and given that on those kernel versions idling wasn't possible under simh. Someone (I don't recall who) had come along and complained about this and after explaining the issue, I suggested that if the VAX specific routine were changed to do something that wasn't done anywhere else in the OS simh idling support could once again work. When I was poking around, I observed that nothing in any BSD kernel used IPL 1 for anything, so I suggested that the kernel idle routine could set IPL to 1 could be an indicator that simh could detect and properly idle. The party who had complained passed this suggestion back as a VAX platform specific patch and it ultimately was included in the kernel and it worked for subsequent versions.

Maybe this change has gotten removed from the VAX specific BSD code in recent versions, or maybe something else is going on with your simh configuration that is interfering with idling.

I can't find a VAX platform NetBSD 8.0 ISO image, or I'd have checked out what is happening before writing this. If you can make the disk image and your configuration file available for me. I'll explore the details and let you know what is happening.

- Mark
Paul Koning
2018-11-15 17:51:20 UTC
Permalink
Post by Mark Pizzolato
Hi Paul,
Post by Paul Koning
I just installed NetBSD/VAX V8 on SIMH. The documentation mentions "set
cpu idle=netbsd", but it doesn't work -- I'm stuck at 100% CPU.
I'm running it on the microvax3900 simulator, if that makes a difference. Any ideas?
I thought this had gotten settled a long time ago.
At one point, the BSD code that implemented what the OS does when there is nothing else to do got changed from how things were done in earlier BSD kernels. The big change seemed to align with when SMP support was added to the kernel to support other (non VAX) architectures. This restructuring created some platform specific routine which existed to do what was good on that platform while idling. As it turned out, what was initially implemented in the VAX specific code that did that was operationally indistinguishable from other code running elsewhere in the OS, and given that on those kernel versions idling wasn't possible under simh. Someone (I don't recall who) had come along and complained about this and after explaining the issue, I suggested that if the VAX specific routine were changed to do something that wasn't done anywhere else in the OS simh idling support could once again work. When I was poking around, I observed that nothing in any BSD kernel used IPL 1 for anything, so I suggested that the kernel idle routine could set IPL to 1 could be an indicator that simh could detect and properly idle. The party who had complained passed this suggestion back as a VAX platform specific patch and it ultimately was included in the kernel and it worked for subsequent versions.
Maybe this change has gotten removed from the VAX specific BSD code in recent versions, or maybe something else is going on with your simh configuration that is interfering with idling.
I can't find a VAX platform NetBSD 8.0 ISO image, or I'd have checked out what is happening before writing this. If you can make the disk image and your configuration file available for me. I'll explore the details and let you know what is happening.
I just followed these instructions: http://www.netbsd.org/ports/vax/emulator-howto.html using the 8.0 image found via the link on that page.

paul
Paul Koning
2018-11-27 20:09:05 UTC
Permalink
Post by Paul Koning
I just installed NetBSD/VAX V8 on SIMH. The documentation mentions "set cpu idle=netbsd", but it doesn't work -- I'm stuck at 100% CPU.
I'm running it on the microvax3900 simulator, if that makes a difference. Any ideas?
Update: it's working now. I had some configuration issues before with networking etc. but I don't see how that explains idle failure. I know sometimes, in some simulators, it takes a while to get to idle, but I thought I had waited long enough.

In any case, this appears to be a false alarm and it does work correctly.

paul
Mark Pizzolato
2018-12-09 09:42:15 UTC
Permalink
Post by Paul Koning
Post by Paul Koning
I just installed NetBSD/VAX V8 on SIMH. The documentation mentions "set
cpu idle=netbsd", but it doesn't work -- I'm stuck at 100% CPU.
Post by Paul Koning
I'm running it on the microvax3900 simulator, if that makes a difference. Any ideas?
Update: it's working now. I had some configuration issues before with
networking etc. but I don't see how that explains idle failure. I know
sometimes, in some simulators, it takes a while to get to idle, but I thought I
had waited long enough.
In any case, this appears to be a false alarm and it does work correctly.
Well, when I followed the directions you pointed out, I did see what you
had reported. A little deeper observation strongly suggested that the
OS execution flow that happens on NetBSD/VAX during idling had changed
from how things were working when I had worked through how to get things
well behaved idling under simh.

I haven't yet had the time to look closely at the OS code to determine
what exactly was happening. If you're seeing things OK now, maybe, there
is some sort of garbage collection activity going on, which runs for a while
and then somehow eventually stabilizes to the known idle execution
pattern.

NetBSD is the fundamental exception for operating systems running under
simh due to the fact that it is still an actively developed and evolving
operating system. As a result, the idle detection pattern will always have
to evolve along with the evolving OS.

- Mark

Loading...