4.1/4.2BSD expand, vrelvm

lcc.dave%ucla-locus at sri-unix.UUCP lcc.dave%ucla-locus at sri-unix.UUCP
Tue Feb 7 15:23:01 AEST 1984


From:            David Butterfield <lcc.dave at ucla-locus>

I sent this out last week, but got no response, so I am trying again.

This is a question concerning processes which are shrinking.  Sometimes
a process shrinks by calling expand, sometimes by calling vrelvm.

Expand calls vmemfree, which ANDs off all but the protection and vreadm
bits in the pte being freed.  (4.2 doesn't deal with the vreadm bit,
since it has no vread.)  After vmemfree returns to expand, expand
adjusts the p0br and p1br registers, and then zaps the pte's protection
to PG_UW.

Vrelvm, on the other hand, calls vmemfree, but then waits for p_poip to
go to zero before proceding to release swap space and zero the
[up]_[tds]size'es.

I have the following questions:
Why does vrelvm wait for p_poip==0, when expand doesn't?
Under what conditions could p_poip not be zero when vrelvm is called?
Why don't these conditions apply to expand as well?
Why doesn't expand completely zero the pte?
Why doesn't vrelvm adjust p0br and p1br?

Answers Greatly Appreciated.

Dave (lcc!dave at ucla-locus)



More information about the Comp.unix mailing list