How do you find the user structure?
Malaclypse the Elder
dwc at homxc.UUCP
Tue Dec 13 03:53:21 AEST 1988
In article <13232 at ncoast.UUCP>, allbery at ncoast.UUCP (Brandon S. Allbery) writes:
> As quoted from <214 at fesk.UUCP> by sverre at fesk.UUCP (Sverre Froyen):
> +---------------
> | I have tried to get Brandon's sysV version of w to work on my
> | National Semiconductor ICM3216 running SysV.2.2. This is a
> | demand paged system and, as Brandon points out in the documentation,
> | w is unable to locate the user structure. I have looked through
> | the system documentation and various include files but I am unable
> | to find the solution (I have no source). I suspect I must start
> +---------------
>
> I've been trying to find it myself, via trial-and-error; I want to use it on
> a few demand-paged System V-based machines myself. Anyone know what V.2.2
> and V.3.1 do with the ublock?
>
> Thanks in advance, all.
>
it will all depend on the architecture of the machine
that it is running on. but in the proc structure for
each process (look in /usr/include/sys/proc.h), there
should be entries for copies of the page table entries
for the u_area. look in the comments for any hints.
once you get the entry, just look for the physical page
frame that the pages of the u_area is in (they are not
necessarily contiguous). you can take it from there.
another alternative, if the system also uses segments,
is to look at the segment table for the page table of
the u_area. this too, should be kept in the proc structure.
danny chen
att!homxc!dwc
More information about the Comp.unix.questions
mailing list