From: Warner Losh
2.11BSD used a mode between kernel and user for the
TCP stack to get
more effective address space...
Is there a document for 2.11 which explains in detail why they did that? I
suspect it's actually a little more complicated than just "more address
space".
The thing is that PDP-11 Unix had been using overlays in the kernel for quite
a while to provide more address space. I forget where they first came in (I
suspect there were a number of local hacks, before everyone started using the
BSD approach), but by 2.9 BSD they were a standard part of the system. (See:
https://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/sys/conf/Ovmak…
for some clues about how this works. There is unfortunately no documentation
that I know of which explains clearly how it works; if anyone knows of any,
can you please let me know? Otherwise you'll have to read the sources.)
I can think of two possible reasons they started using supervisor mode: i)
There were a limited number of the 2.9-type overlays, and they were not
large; trying to support all the networking code with the existing overlay
system may have been too hard. ii) I think this one is unlikely, but I'll
list it as a possibility. Switching overlays took a certain amount of
overhead (since mapping registers had to be re-loaded); if all the networking
code ran in supervisor mode, the supervisor mode mapping registers could be
loaded with the right thing and just left.
Noel