Re: Memory intensive processes

William Burrow (
Wed, 11 Dec 1996 17:42:04 -0400 (AST)

On Wed, 11 Dec 1996, Richard B. Johnson wrote:

> It is apparent that you didn't understand the well-proven concept. The
> idea is that, unless actually written, the zero-filled memory doesn't have
> to exist at all! This is called "demand-zero" paging and has been used
> in VAXen forever.

System Kennunglinux (whatever) wrote me and stated that mmap()ing
/dev/zero does cause Linux to use a zero page. This answer is not
portable, however (ie algorithms from other systems that do not have
/dev/zero will not have this feature, and software from Linux won't port
easily to other systems that don't have /dev/zero).

> Note that I don't advocate copying Digital's mistakes. However we can
> learn a lot about performance by understanding how these things work. One
> of the problems with "Digital security" is that if you extend a file, the
> data is written to zero before you are allowed to access that file. That
> takes a lot of CPU cycles and hurts performance.

Hmm, I thought I read in a DEC system manual that files could contain
junk from previous files. Perhaps this zeroing a file was a paranoia option?

> page. On VAXen, it knows that it doesn't even have to be written to the swap
> device because it can always re-read the program file!

Linux can do this as well. Executables are never written to swap from
what I understand. eg Turn off swap (swapoff -a) and fill RAM. Sleeping
processes will show up as swapped and activating them will cause disk

William Burrow  --  Fredericton Area Network, New Brunswick, Canada
Copyright 1996 William Burrow  
Canada's federal regulator says it may regulate content on the Internet to
provide for more Canadian content.   (Ottawa Citizen 15 Nov 96 D15)