brk's zero-fill behavior on VAXen

Chris Torek chris at mimsy.UUCP
Mon Dec 8 19:22:38 AEST 1986


>In article <7208 at elsie.UUCP>, ado at elsie.UUCP (Arthur David Olson) writes:
>>Can system performance be improved by avoiding zero filling ... ?
 
In article <544 at mcgill-vision.UUCP> mouse at mcgill-vision.UUCP (der Mouse)
writes:
>Probably.  But probably not measurably.  The VAX has a pte type known
>as "zero-fill on demand" which means that the page is created full of
>zeros when it is first referenced.

Not quite.  There are various bits per page stored in a PTE,
including five bits that are unused in invalid pages.  In 4BSD Vax
kernels, two special values may be stored in those bits to mean
`fill on demand from text inode' and `zero fill on demand'.  The
zero fill is done by code in the page fault handler, not by the
hardware.  But it is still quite fast.

The other 30 possible values for that five-bit field were used to
implement `vread' in 4.1 and 4.2.  The vread system call was dropped
from 4.3BSD, removing a major stumbling block that limited the
maximum number of open files per process to 30.  vread, like vfork,
was an implementation hack.  Unlike vfork, vread proved not terribly
useful.  (vfork is still faster than fork, even in systems implementing
copy-on-write forks.  Sigh.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	seismo!mimsy!chris	ARPA/CSNet:	chris at mimsy.umd.edu



More information about the Comp.unix.wizards mailing list