ZFOD before COW

John Chambers jc at minya.UUCP
Mon May 2 03:49:27 AEST 1988


In article <57900012 at urbsdc>, aglew at urbsdc.Urbana.Gould.COM writes:
> Does anyone know of systems that implement zero-fill-on-demand
> copy-on-write between pages belonging to the same process?
> 
> Background: ZFOD pages are pages that, when referenced, are 
> allocated and then filled with zeroes. 

Yeah, Burroughs large systems do this.  They have hardware that
uses a hardware pointer (with base-address and size fields).  
In fact, when a program starts up, such pointers (or descriptors,
in Burroughs parlance) are initialized to have an address of zero,
and the 'presence' flag bit is off, causing a page fault when you
attempt to reference the array.  The paging system notes that the
array hasn't been allocated, allocates it, fills it with zeroes,
modifies the descriptor, and returns to repeat the operation.

One nice effect of this is that arrays don't even exist until you
reference them.  For multiply-dimensioned arrays, each row is a
separately-allocated block.  Thus you might declare a 1000-by-1000
array, and not have the memory.  But if you only used rows 1, 3, 
and 17, then only those three rows (plus a row of descriptors for
the first subscript) would be allocated.

This technique isn't usable on most machines, as it sort of requires
some special hardware to make it work.  Well, you actually could
use their array representation on most machines with hardware MMUs,
but I've never heard of anyone doing it.  I'd be interested in being
proved ignorant....


-- 
John Chambers <{adelie,ima,maynard,mit-eddie}!minya!{jc,root}> (617/484-6393)

You can't make a turtle come out.
	-- Malvina Reynolds



More information about the Comp.unix.wizards mailing list