[pdp7-unix] system data block...

Phil Budne phil at ultimate.com
Wed Oct 30 12:40:47 AEST 2019


It looks like if a system call hasn't done any disk I/O,
the "system data" gets written to the first (ie "super")
block of the disk:

sysexit:                        " common system call exit code
   ion                          " enable interrupts
   lac .savblk                  " load "save" flag
   sza                          " is zero (cleared by disk I/O)?
   jmp 1f                       " no: no disk I/O done?
   jms copy; sysdata; dskbuf; 64 " copy system data to disk buffer
   cla
   jms dskio; 07000             " save to disk?
1:

And here's the definition of the system data, which looks to me to be
one word too long to fit in a block -- 65 words (15 words, plus ten
four word user/process table entries) -- the last word doesn't get
saved to disk)?!  Since system memory is core, the word isn't exactly
volatile (would survive power failure, not that I've noticed a
power-failure restart feature on the PDP-7, or use of it in UNIX-7).

    sysdata:                        " system data 64 words saved to disk
       s.nxfblk: .=.+1              " pointer to next free block??
       s.nfblks: .=.+1              " number of free blocks (in fblks?)
       s.fblks: .=.+10              " cached free block numbers
       s.uniq: .=.+1                " next unique value
       s.tim: .=.+2                 " (up?)time in 60Hz ticks (low, high)
	    " user (process) table
	    " first word
	    "   bits 0:2 -- status
	    "       0: free slot
	    "       1: in/ready
	    "       2: in/notready
	    "       3: out/ready
	    "       4: out/notready??
	    "   bits 3:17 -- disk swap address/8
	    " second word: process pid
	    " third word:  smes/rmes status:
	    "        0: not waiting
	    "       rmes: -1 (waiting for message)
	    "       smes: pid of process we're waiting to send to
	    "             complement sender pid in dest process
	    " fourth word: smes message
    ulist:
       0131000;1;0;0
       0031040;0;0;0
       0031100;0;0;0
       0031140;0;0;0
       0031200;0;0;0
       0031240;0;0;0
       0031300;0;0;0
       0031340;0;0;0
       0031400;0;0;0
       0031440;0;0;0


More information about the pdp7-unix mailing list