From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,13007e6f500d17dd X-Google-Attributes: gidf8c9b,public X-Google-Thread: fc89c,13007e6f500d17dd X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,13007e6f500d17dd X-Google-Attributes: gidfee84,public X-Google-Thread: 10650a,13007e6f500d17dd X-Google-Attributes: gid10650a,public From: Patrick O'Rourke USG Subject: Re: out of swap -> killing inetd Date: 1996/07/11 Message-ID: <31E524E0.41C6@zk3.dec.com>#1/1 X-Deja-AN: 167785115 references: <4rr9md$gsc@xensei3.xensei.com> <4rt691$2jl@sun.rhbnc.ac.uk> <4rui23$le@web.nmti.com> content-type: text/plain; charset=us-ascii organization: CTG mime-version: 1.0 newsgroups: comp.unix.internals,comp.unix.osf.osf1,comp.unix.questions,comp.unix.programmer x-mailer: Mozilla 2.0 (X11; I; OSF1 V4.0 alpha) Peter da Silva wrote: > > In article <4rt691$2jl@sun.rhbnc.ac.uk>, > Bob Vickers wrote: > > It is almost certainly directly related to your swap mode. In immediate swap > > mode an error occurs at malloc time if swap space is unavailable, and a well > > written process can easily recover from this. In deferred mode the malloc > > succeeds but random errors occur later on when the process tries to write to > > the memory. This is the penalty you pay for the disc space saving which > > deferred mode gives you. This is not entirely accurate, as far as Digital Unix is concerned. Processes will not get errors when attempting to write to memory. If no memory is available, the process will block until it becomes available. The only time an error will occur here is if there's a problem reading the page in off of some external media. > That's pretty broken. It should be possible to simply allocate memory pretty > close to real memory + swap without problems, and then have malloc (actually, > sbrk()) and friends generate errors at that point. I don't see why it should > ever be necessary to kill random processes. This is essentially what happens. As processes consume real memory, the pageout thread will attempt to keep memory available by paging out the oldest resident pages. If the pageout thread cannot keep up, task swapping will begin. So at the point that a process is killed, all of memory and swap space have been consumed. Pat -- Patrick O'Rourke (603) 881-0124 orourke@zk3.dec.com Office: ZK3/3S05