Why do ps, uptime (& probably others) check vmunix version?

Jack Jansen jack at boring.uucp
Fri Feb 14 23:56:01 AEST 1986


In article <457 at ur-helheim.UUCP> badri at ur-helheim.UUCP (Badri Lokanathan) writes:
>Since /vmunix was linked to the old version of vmunix, naturally it barfed.
>So, here is my question. Why should ps (and any other program) examine the
>name of vmunix? This is particularly aggravating if a new kernel is being
>tested - I do not want to make too many changes, just in case.
It has to check. It gets the addresses of kernel variables by looking
in the namelist of /vmunix, and those variables are likely to be on
different addresses if you run another kernel. V7 didn't check anything,
which meant that 'ps' gave you lots of garbage when you ran it if you had
booted from a different kernel (it tried to interpret random junk as,
for instance, the process table. This is likely to produce dissapointing
results).

Something I was thinking of is teaching the boot program about symbolic
links. That way, you can have /vmunix.1, /vmunix.2, etc.
Now, as soon as the system comes up, some program, probably /etc/init,
will setup a symbolic link from the currently running unix to /vmunix.

So, besides the fact that 'ps' works as expected, you will automatically
have the effect that a reboot will automatically reboot the currently
running kernel. To get a different kernel running, you just ask for a
reboot by name.
-- 
	Jack Jansen, jack at mcvax.UUCP
	The shell is my oyster.



More information about the Comp.unix.wizards mailing list