On 2018-07-24 06:27, Mark Pizzolato wrote:
Hi Hans,
Notice: “Time taken by msleep(1): 20ms”
Well, the simulator framework implements idling with sleeps. Meanwhile
the simulated VAX has a clock which is architecturally defined to tick
at 10ms intervals. If any call to sleep for 1 millisecond actually
sleeps for 20 milliseconds, then whenever the system idles the clock is
going to get far behind. Older simh versions would simply refuse to
idle when the sleep granularity was too large. The current
implementation tries to actually allow idling when the host system’s
sleep is large and also tries hard to schedule catchup clock ticks so
that simulated time tracks pretty closely with wall clock time.
This attempt to run with catchup clock ticks, hasn’t been extensively
tested since only a few BSD systems actually have large scheduling clock
ticks built into the kernel by default. Therefore, there may be
problems. Most other systems (Windows, Linux, and OS X) have host
system clock ticks on the order of 1-2ms so these systems don’t have
this problem.
Note that the time resolution is not necessarily the same as the minimum
sleep time. This has to do with how many ticks take place between
context switches, and it is quite common for there to be several ticks
before a context switch takes place.
And as shown by Hans response, the clock resolution is 1ms, but minimum
sleep time (and thus probably context switches) are at 20ms.
Johnny
You can build a kernel for your BSD system by specifying or changing the
value of HZ somewhere in the kernel configuration information, or you
could try running on a different host platform.
-Mark
*From:*Hans Hübner [mailto:hans.hueb...@gmail.com]
*Sent:* Friday, July 20, 2018 10:57 PM
*To:* Mark Pizzolato <m...@infocomm.com>
*Cc:* Matt Burke <m...@9track.net>; Simh <simh@trailing-edge.com>
*Subject:* Re: [Simh] DECwindows issues
Hi Matt,
2018-07-20 20:26 GMT-04:00 Mark Pizzolato <m...@infocomm.com
<mailto:m...@infocomm.com>>:
On Friday, July 20, 2018 3:45 PM, Hans Hübner wrote:
> 2018-07-20 18:28 GMT-04:00 Matt Burke <m...@9track.net
<mailto:m...@9track.net>>:
> > On 19/07/2018 06:41, Hans Hübner wrote:
> > > I see either one of the DECwindows processes (window or session
> > > manager) use more than 50% of the VAX CPU or, if I kill both
> > > processes, the emulator taking up 100% of its host CPU with no VAX
> > > process showing up in MONITOR PROC/TOPCPU. The emulated system is too
> > > slow to be used, effectively.
> >
> > I don't seem to be able to reproduce this (on Debian 9.5).
>
> I'm running SIMH on FreeBSD, but I can switch if the problem is related
to that.
It might be related to the host OS.
Please let it get to the state you're complaining about and then:
^E
sim> SHOW VERSION
sim> CLOCK
sim> SHOW CPU
and send the output produced back here.
Here you go:
sim> show version
VAXStation 3900 (KA655) simulator V4.0-0 Current
Simulator Framework Capabilities:
64b data
64b addresses
Threaded Ethernet Packet transports:PCAP:TAP:NAT:UDP
Idle/Throttling support is available
Virtual Hard Disk (VHD) support
Asynchronous I/O support (Lock free asynchronous event queue)
Asynchronous Clock support
FrontPanel API Version 12
Host Platform:
Compiler: GCC 6.4.0
Simulator Compiled as C arch: x64 (Release Build) on Jul 18
2018 at 07:32:15
Memory Access: Little Endian
Memory Pointer Size: 64 bits
Large File (>2GB) support
SDL Video support: SDL Version 2.0.7
PCRE RegEx (Version 8.42 2018-03-20) support for EXPECT commands
OS clock resolution: 1ms
Time taken by msleep(1): 20ms
OS: FreeBSD vaxhost 11.2-RELEASE FreeBSD 11.2-RELEASE #0
r335510: Fri Jun 22 04:32:14 UTC 2018
r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC
<mailto:r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC> amd64
git commit id: 15fd71b9
git commit time: 2018-07-17T22:05:05-0700
sim> show clock
Minimum Host Sleep Time: 20 ms (50Hz)
Host Clock Resolution: 1 ms
Execution Rate: 1,358,783,530 cycles/sec
Idling: Enabled
Time before Idling starts: 20 seconds
Calibrated Timer: Internal Timer
Catchup Ticks: Enabled for clocks ticking faster than 50 Hz
Calibration: Always
VAXStation 3900 (KA655) clock device is CLK
Calibrated Timer 0:
Running at: 100 Hz
Tick Size: 10 msecs
Ticks in current second: 82
Seconds Running: 80 (1:20 minutes)
Real Time: 3144059812
Virtual Time: 3144059812
Next Interval: 1,000
Base Tick Delay: 5,000
Initial Insts Per Tick: 5,000
Current Insts Per Tick: 13,587,835
Initializations: 5
Ticks: 6,795
Total Ticks: 8,082
Peak Clock Skew: 825.867 msecs slow
Ticks Acked: 6,795
Tick Time: 1:07.95 minutes
Total Tick Time: 1:20.81 minutes
Catchup Ticks Sched: 6,065
Initialize Base Time: 07:53:37.188
Tick Start Time: 07:53:37.196
Wall Clock Time Now: 07:55:35.790
Catchup Tick Time: 07:54:56.606
Catchup Base Time: 07:53:48.656
Total Time Idled: 2.439 seconds
VAXStation 3900 (KA655) clock device is Internal Calibrated Timer(INT-TIMER)
Calibrated Timer 8:
Running at: 10 Hz
Tick Size: 100 msecs
Ticks in current second: 6
Seconds Running: 23 (23 seconds)
Calibration Opportunities: 23
Instruction Time: 1570864774
Real Time: 3144081177
Virtual Time: 3144082804
Next Interval: 1,500
Base Tick Delay: 90,585,569
Initial Insts Per Tick: 50,000
Current Insts Per Tick: 135,878,353
Initializations: 3
Ticks: 235
Tick Time: 23.5 seconds
Initialize Base Time: 07:53:37.180
Tick Start Time: 07:53:37.180
Wall Clock Time Now: 07:55:35.790
sim> show cpu
CPU idle=VMS, idle enabled, model=MicroVAX 3900 (KA655), NOAUTOBOOT
64MB, HALT to SIMH
Thanks!
Hans
_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh