l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: self-paging


From: Mike Small
Subject: Re: self-paging
Date: Tue, 29 Nov 2005 12:44:46 -0500
User-agent: Mutt/1.5.9i

On Tue, Nov 29, 2005 at 05:15:26PM +0100, Bas Wijnen wrote:

> And now the interesting part: how to determine when to swap out pages?
> 
> Effectively, this system gives every process a quota on physical memory, N -
> P.  The quota can change at run-time, but not fast.  A process may request
> what its current quota is.  My idea is to let the quota change according to
> use, but usually not abruptly.  If a process suddenly needs a lot of memory,
> and it is available, it gets it.  If then there is memory pressure, it keeps
> it for some time.  If it suddenly drops most of it, it still keeps the quota
> for some time.  This may cost a bit of performance in very unusual situations
> (where multiple processes are mallocing and freeing huge chunks of memory),
> but closes (or at least severely limits) a high-bandwidth covert channel.
> 
> So to make things clear:  In case of memory pressure (that is, the sum of
> quota is equal to the amount of physical memory), when a process requests a
> new page (either really new, or from swap), an other page of itself will be
> paged out.  This is done by rearranging the list of owned pages.  When a
> process frees a page, and thus uses less than its quota, the quota will slowly

What if a process waits for a slow period (maliciously or because a
user knows a certain time of night is a good time to start big jobs) and
starts up a process that takes a huge amount of memory right away but
never asks for any more or releases any voluntarily?  Say a large
matrix calculation that starts with "double values[VERY_LARGE_N];".

Is there anything in this design that gets that process out of the way
for other processes when they start needing memory, say the next
morning when people show up for work and start logging in.  Or for
that matter, is there anything that does appropriate paging out if the
algorithm only really visits a certain part of the matrix most of the
time - ie an appropriate working set for the process should be much
smaller than the huge set it initially asked for.

My question, I guess, is how do you handle fairness among processes?
If I've understood you correctly, I think this way degrades to a game
of King of the Castle.

-- 
Mike Small
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]