[Simh] VAX 8200/8250

Johnny Billquist bqt at softjar.se
Sat Apr 6 19:19:59 EDT 2019


On 2019-04-07 01:14, Matt Burke wrote:
> On 06/04/2019 23:50, Timothy Stark wrote:
>> Does simh use threads to handle MP processors?  I have other SIMH versions (vaxmp and turbovax) that uses threads to take advantage of CPU cores.
>>
>> I looked through your 782 code and did not see any threads handle that vaxmp and turbovax uses.
>>
> For the VAX 8300/8350 I just run both processors in the same thread and
> alternate between them on each instruction cycle. Things get a lot more
> complicated when threads are involved because you have to think about
> locking and synchronisation.
> 
> The VAX-11/782 is quite different as you actually run two separate
> copies of the VAX-11/780 simulator and they communicate with each other
> using a shared memory interconnect (simulated by shared memory on the
> host operating system). One VAX-11/780 runs as the master and this is
> the one that you interact with. It has access to all the I/O devices
> such as disks/tapes. The other VAX-11/780 is non-interactive and can
> only process workloads which are handed over from the master. This is
> asymmetric multiprocessing.

Unless you also have some synchronization mechanisms in there, this 
might not actually work right, but it can take time for issues to show 
up. Some VAX instructions can be rather complex, and are guaranteed to 
be atomic to memory. I believe that holds true also on the 11/782, which 
means that instructions like the interlocked queue instructions will not 
naturally be interlocked if you just have two threads with shared memory 
for a simulation. And so, you run the risk that if both CPUs would want 
to modify the same data interlocked, the simulation will actually end up 
corrupting memory. But this is probably a rare occurrence, so chances 
are that you have gotten away with it, even if you don't do proper 
interlocking.

   Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt at softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


More information about the Simh mailing list