[TUHS] user struct on SYSIII / V7

Ronald Natalie ron at ronnatalie.com
Sat Nov 14 06:16:34 AEST 2015


I can’t say how the Z8000 wants to implement it.   On the PDP11, the _u variable is set to the absolute 140000.   This isn’t really an “allocation.”  It’s just the base of one of the kernel address segments.   The kernel maps the per process data area (essentially the user structure and the kernel stack) there.    It’s just allocated as a hunk of usize memory (usize is in 64 byte chunks on the PDP).   The code one is “not expected to understand” handles this context switch.   In fact, the user structure is only ever “initialized” for the first process (init).   After that fork just copies it from the parent to the child and then all the other system calls, etc… change it as required.

Gosh it’s been a long time since I was this deep into a UNIX kernel (especially on a primitive machine).   
Hope this helps.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2284 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20151113/6b045248/attachment.bin>


More information about the TUHS mailing list