[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how are multiple tty's implemented in the simulator



I extended the simulator so that it would simulate multiple KL-11 devices.
The simulator supported a single KL-11 for KB0:.  I took the original code
and modified it based on information I got out of an old PDP-11 Peripherals
Handbook that described the register layout and interrupt vector locations
for a block of 16 KL-11s.

When a user logs into the "delta" id it runs a tiny front-end program that
sends a message to the simulator which is running nohuped in the background.
The message contains the PID and tty name of the user's process.  The
process then goes into an indefinite sleep.  When the simulator gets the
message it opens the user's tty and puts it into raw mode.  The simulator
then polls the tty every 10000 or so simulated instructions and generates a
simulated interrupt if a key is pressed.  When the simulator sees the
Control/D it kills the process with the original PID.  This causes the
front-end to die which returns to bash which logs the user off.

The simulator basically runs compute bound at all times.  For this reason, I
block the simulator when no one is attached.  This is why the clock stops
when no one is attached.  The simulated clock also doesn't keep very
accurate time because it generates a simulated interrupt every N
instructions instead of based on real-time like a real PDP-11.

Gary


-----Original Message-----
From: Eric Thayer <eht@cs.cmu.edu>
To: rsts@mcws.net <rsts@mcws.net>
Date: Monday, July 20, 1998 7:57 AM
Subject: how are multiple tty's implemented in the simulator


>Just curious.
>
>...eric
>
>