mirror of
https://github.com/PDP-10/its.git
synced 2026-03-22 09:03:20 +00:00
Update NETIME to use TCP/IP.
SYSEN1; NETIME 130 by Paul Svensson, timestamped 2017-02-04.
This commit is contained in:
159
src/sysen1/netime.127 → src/sysen1/netime.130
Executable file → Normal file
159
src/sysen1/netime.127 → src/sysen1/netime.130
Executable file → Normal file
@@ -11,9 +11,12 @@ b=:2
|
||||
c=:3
|
||||
d=:4
|
||||
e=:5
|
||||
|
||||
t=:6
|
||||
tt=:7
|
||||
|
||||
count=:10
|
||||
|
||||
p=:17
|
||||
|
||||
ttyoch==:1
|
||||
@@ -93,50 +96,51 @@ $forma: save a
|
||||
rest (p)
|
||||
return
|
||||
|
||||
; Hosts are arranged first into three groups by approximate speed and
|
||||
; reliability. Each group is in alphabetical order. Presumably there is
|
||||
; little correlation between a machine's speed and reliability, and the
|
||||
; alphabetical position of its name.
|
||||
; Hosts are arranged first into groups by approximate speed and
|
||||
; reliability. Each group is in random order. Until I can get
|
||||
; dqdev working right, I'm putting the IP#'s here. /Paul
|
||||
|
||||
hosts:
|
||||
|
||||
; Ask the reliable ITS machines first. They are all on subnet 6 and tend
|
||||
; to answer quickly.
|
||||
; Ask local machines first.
|
||||
|
||||
<(sixbit /AI/)>,,[asciz "AI"]
|
||||
<(sixbit /MC/)>,,[asciz "MC"]
|
||||
<(sixbit /ML/)>,,[asciz "ML"]
|
||||
[asciz "cloud.svensson.org"]
|
||||
[asciz "home.svensson.org"]
|
||||
[asciz "192.168.2.13"] ; korpilombolo.svensson.org
|
||||
[asciz "192.168.2.17"] ; seventeen.svensson.org
|
||||
|
||||
; File servers tend to be up. Approximately in the order that they seem
|
||||
; likely to come up after a mass shutdown.
|
||||
; Other ITSes
|
||||
[asciz "up.update.uu.se"]
|
||||
|
||||
[asciz "REAGAN"]
|
||||
[asciz "ZERMATT"]
|
||||
[asciz "GOLDILOCKS"]
|
||||
[asciz "LIVE-OAK"]
|
||||
[asciz "PYGMALION"]
|
||||
[asciz "HEPHAESTUS"]
|
||||
; Lysator machines tend to be up.
|
||||
|
||||
; Ordinary hosts. Alphabetical order.
|
||||
[asciz "130.236.254.3"] ; mail.lysator.liu.se
|
||||
[asciz "130.236.254.50"] ; ftp.lysator.liu.se
|
||||
[asciz "130.236.254.106"] ; hetzer.lysator.liu.se
|
||||
[asciz "130.236.254.167"] ; blaskan.lysator.liu.se
|
||||
[asciz "130.236.254.250"] ; nazgul.lysator.liu.se
|
||||
|
||||
[asciz "BIGBOOTE"]
|
||||
[asciz "CROSBY"]
|
||||
[asciz "DIALUP-CHAOS"]
|
||||
[asciz "GAAK"]
|
||||
[asciz "MINTAKA"]
|
||||
[asciz "OTIS"]
|
||||
[asciz "PIGPEN"]
|
||||
[asciz "SAFFRON"]
|
||||
[asciz "SINATRA"]
|
||||
; Some random hosts.
|
||||
|
||||
; Unreliable hosts start here. Putting hosts that tend to not answer at
|
||||
; the end keeps them from acting as a bottleneck. (It also gives them less
|
||||
; time to respond...)
|
||||
[asciz "158.121.106.20"] ; delysid.gnu.org
|
||||
[asciz "207.202.214.131"] ; otaku.freeshell.org
|
||||
[asciz "12.17.138.171"] ; kappa.unlambda.com
|
||||
[asciz "209.251.101.202"] ; sakura.lunar-tokyo.net
|
||||
[asciz "207.202.214.132"] ; sdf.lonestar.org
|
||||
[asciz "192.207.126.3"] ; dinky.musenki.com
|
||||
[asciz "199.232.76.164"] ; fencepost.gnu.org
|
||||
[asciz "18.24.10.26"] ; mc.lcs.mit.edu
|
||||
[asciz "63.222.128.227"] ; alembic.crystel.com
|
||||
[asciz "194.236.34.19"] ; realpanic.nocrew.org
|
||||
|
||||
<(sixbit /MD/)>,,[asciz "MD"]
|
||||
[asciz "GOLEM"]
|
||||
[asciz "LSD"]
|
||||
[asciz "EMACK-AND-BOLIOS"]
|
||||
; Keeping these at the end keeps them from acting as a bottleneck.
|
||||
; (It also gives them less time to respond...)
|
||||
|
||||
<(sixbit /SV/)>,,[asciz "SV"]
|
||||
<(sixbit /SX/)>,,[asciz "SX"]
|
||||
<(sixbit /UP/)>,,[asciz "UP"]
|
||||
<(sixbit /PI/)>,,[asciz "PI"]
|
||||
<(sixbit /DX/)>,,[asciz "DX"]
|
||||
|
||||
nhosts==:.-hosts
|
||||
|
||||
@@ -144,19 +148,19 @@ nhosts==:.-hosts
|
||||
|
||||
setp: -1 ; 0 => don't actually set the time.
|
||||
|
||||
wait: 20.*60. ; Wait 20 seconds polling other hosts.
|
||||
wait: 10.*60. ; Wait 10 seconds polling other hosts.
|
||||
0 ? 0 ? 0 ; Zeros for .REALT just in case...
|
||||
|
||||
numerq: 2 ; Ceiling of 2/3 of the hosts that respond
|
||||
denomq: 3 ; must agree on the time.
|
||||
|
||||
minq: 4 ; Insist on at least 4 hosts with times in
|
||||
minq: 2 ; Insist on at least 2 hosts with times in
|
||||
; agreement.
|
||||
|
||||
spread: 400. ; Times agree if they differ by less than
|
||||
; 400 seconds (6 mins 40 secs)
|
||||
spread: 10. ; Times agree if they differ by less than
|
||||
; 10 seconds
|
||||
|
||||
days: 3 ; If machine looks like it was down for
|
||||
days: 7 ; If machine looks like it was down for
|
||||
; this many days, then require a human to
|
||||
; set the time.
|
||||
|
||||
@@ -179,8 +183,6 @@ filen2: sixbit /HOARD/ ; thought it was.
|
||||
; his clock. In 60ths of a second since
|
||||
; system was booted.
|
||||
|
||||
.scalar count ; The number of outstanding time requests.
|
||||
|
||||
lpdl==:100.
|
||||
.vector pdl(lpdl) ; The usual.
|
||||
|
||||
@@ -245,7 +247,7 @@ termin
|
||||
dpb a,[$cpknb opkt]
|
||||
move a,[.byte 8 ? "T ? "I ? "M ? "E]
|
||||
movem a,opkt+%cpkdt
|
||||
setzm count
|
||||
setz count,
|
||||
hrloi c,-1-nhosts ; C: aobjn into hosts
|
||||
loop: tlnn netmsk\%ftime
|
||||
.hang
|
||||
@@ -283,11 +285,13 @@ timint: tlo %ftime
|
||||
slose
|
||||
|
||||
iocint: save t
|
||||
aos -1(p)
|
||||
hrrz t,-1(p)
|
||||
caie t,iocok+1
|
||||
.lose
|
||||
caie t,ioc1
|
||||
cain t,ioc2
|
||||
caia
|
||||
jrst badint
|
||||
rest t
|
||||
aos (p)
|
||||
.call dismis
|
||||
slose
|
||||
|
||||
@@ -298,22 +302,55 @@ netgo: aobjp c,nomore
|
||||
hrrz a,hosts(c)
|
||||
call look
|
||||
jrst netgo ; Must be gone or something?
|
||||
dpb a,[$cpkda opkt]
|
||||
syscall chaoso,[movei netich(b) ? movei netoch(b)]
|
||||
jrst netgo ; Chaosnet full? Broken?
|
||||
tlnn a,<-1>_14.
|
||||
tlnn a,<-1>_6.
|
||||
jrst [dpb a,[$cpkda opkt]
|
||||
syscall chaoso,[movei netich(b) ? movei netoch(b)]
|
||||
jrst netgo ; Chaosnet full? Broken?
|
||||
tdz netbit(b)
|
||||
syscall pktiot,[movei netoch(b) ? movei opkt]
|
||||
slose
|
||||
hrrzi a,netin
|
||||
jrst opnok]
|
||||
tdz netbit(b)
|
||||
syscall pktiot,[movei netoch(b) ? movei opkt]
|
||||
slose
|
||||
syscall tcpopn,[movei netich(b) ? movei netoch(b) ?
|
||||
move [-1] ? movei 37. ? move a]
|
||||
jrst netgo ; Net full? Broken?
|
||||
hrrzi a,tcpin
|
||||
opnok:: hrli a,(c)
|
||||
movem a,state(b)
|
||||
.rdtime tt,
|
||||
movem tt,atimes(c) ; Begin our wait
|
||||
hrrzi a,netin
|
||||
hrli a,(c)
|
||||
movem a,state(b)
|
||||
aos count
|
||||
jrst loop
|
||||
aoja count,loop
|
||||
|
||||
tcpin: tdz netbit(b)
|
||||
syscal whyint,[movei netich(b) ? movem a ? movem a ? movem e]
|
||||
slose
|
||||
caie a,%ntcls
|
||||
cain a,%ntclu
|
||||
soja count,netgo
|
||||
caie a,%ntinp
|
||||
cain a,%ntcli
|
||||
caia
|
||||
jrst loop
|
||||
caige e,4
|
||||
jrst loop ; Ick... busy waiting here
|
||||
caie e,4
|
||||
soja count,netgo
|
||||
setz a,
|
||||
ioc1:: syscal iot,[movei netich(b) ? t]
|
||||
soja count,netgo ; IOC ints return to here.
|
||||
lsh a,8.
|
||||
ior a,t
|
||||
sojg e,ioc1
|
||||
.rdtime tt,
|
||||
addm tt,atimes(d) ; End our wait (computes average in 60ths)
|
||||
movem a,times(d)
|
||||
aos d
|
||||
soja count,netgo
|
||||
|
||||
netin: sos count
|
||||
iocok:: syscall pktiot,[movei netich(b) ? movei ipkt]
|
||||
ioc2:: syscall pktiot,[movei netich(b) ? movei ipkt]
|
||||
jrst netgo ; IOC ints return to here.
|
||||
.rdtime tt,
|
||||
addm tt,atimes(d) ; End our wait (computes average in 60ths)
|
||||
@@ -328,7 +365,7 @@ iocok:: syscall pktiot,[movei netich(b) ? movei ipkt]
|
||||
dpb t,[201000,,times(d)]
|
||||
ldb t,[041000,,ipkt+%cpkdt]
|
||||
dpb t,[301000,,times(d)]
|
||||
jrst netgo
|
||||
aoja d,netgo
|
||||
|
||||
netbit: repeat nnetch, 1_<netich+.rpcnt>,,0
|
||||
|
||||
@@ -339,9 +376,8 @@ nomore: syscall close,[movei netich(b)]
|
||||
tdz netbit(b)
|
||||
movei a,[ jfcl ? .lose ]
|
||||
movem a,state(b)
|
||||
skipe count
|
||||
jumpe count,setime
|
||||
jrst loop
|
||||
jrst setime
|
||||
|
||||
.vector sorted(nhosts) ; Sorted indices of times.
|
||||
|
||||
@@ -567,7 +603,7 @@ table: save a
|
||||
save b
|
||||
save e
|
||||
format "~&~D host~P responded.",ntimes
|
||||
skipe count
|
||||
caie count,
|
||||
format " ~D outstanding request~P.",count
|
||||
movei b,0
|
||||
tablel: caml b,ntimes
|
||||
@@ -606,7 +642,8 @@ netwrk"$$hstmap==:1
|
||||
netwrk"$$hostnm==:1
|
||||
netwrk"$$symlook==:1
|
||||
netwrk"$$chaos==:1
|
||||
.insrt dsk:sysnet;netwrk >
|
||||
netwrk"$$arpa==:1
|
||||
.insrt dsk:syseng;netwrk >
|
||||
|
||||
;;; CALL LOOK: Look up the Chaosnet address of a host.
|
||||
;;; A (arg): address of ASCIZ string
|
||||
Reference in New Issue
Block a user