Swap questions

Stuart Levy slevy at poincare.geom.umn.edu
Sun Nov 18 09:51:59 AEST 1990


In article <1990Nov16.155730.2670 at odin.corp.sgi.com> jmb at patton.wpd.sgi.com (Doctor Software) writes:
>In article <9011150232.AA00704 at koko.pdi.com>, shoshana at koko.UUCP
>(Shoshana Abrass) writes:
>> ...In a kernel class I took, the instructor claimed that whenever a process
>>   was read into memory, swap space was reserved/allocated for it, before 
>>   it ever got paged out. Is this true under Irix? (is it ever true, for 
>>   that matter). If this is true, it implies that one must have at least
>>   as much swap as real memory...
>
>Swap space is allocated (it's cheap - just a counter) whenever a new
>page of program memory is created. This means that when a program is
>started, the text, initial stack and data segments have backing store
>allocated in swap. ...

I'm still puzzled.  Doesn't that mean that the answer to Shoshana's question
is "yes" -- if you have more main memory than disk-based swap space,
you could never use all the main memory for user programs, because a disk-based
swap page would need to be allocated for each user page?

I know other UNIX implementations behave this way but thought SGI
was among those who had fixed this.  The answer actually affects us -- our main
Iris has 64MB RAM but only about 50 MB swap area, yet we certainly seem to be
able to get > 50MB and in fact > 64MB virtual space allocated to running
processes (even accounting for sharable stuff).   I haven't checked that we
can reach 50 + 64 - size of kernel data before the kernel starts killing
processes, but it seems plausible.
So like Shoshana I ask, what *is* the real scoop here?

    Stuart Levy, Geometry Group, University of Minnesota
    slevy at geom.umn.edu



More information about the Comp.sys.sgi mailing list