From: Rik van Riel <H.H.vanRiel@fys.ruu.nl>
To: "Stephen C. Tweedie" <sct@dcs.ed.ac.uk>
Cc: Rogier Wolff <R.E.Wolff@BitWizard.nl>,
torvalds@transmeta.com, blah@kvack.org, nahshon@actcom.co.il,
alan@lxorguk.ukuu.org.uk, paubert@iram.es,
linux-kernel@vger.rutgers.edu, mingo@chiara.csoma.elte.hu,
linux-mm@kvack.org
Subject: Re: Fairness in love and swapping
Date: Fri, 27 Feb 1998 00:21:44 +0100 (MET) [thread overview]
Message-ID: <Pine.LNX.3.91.980226235834.5141B-100000@mirkwood.dummy.home> (raw)
In-Reply-To: <199802262241.WAA03911@dax.dcs.ed.ac.uk>
On Thu, 26 Feb 1998, Stephen C. Tweedie wrote:
> > We could:
> > - force-swap out processes which have slept for some time
> > - suspend & force-swap out the largest process
> > - wake it up again when there are two proceses waiting on
> > it (to prevent X from being swapped out)
>
> Define the number of processes waiting on a given process?
>
> Another way of making the distinction between batch and interactive
> processes might be to observe that interactive processes spend some of
> their time in "S" (interruptible sleep) state, whereas we expect
> compute-bound jobs to be in "R" or "D" state most of the time.
> However, that breaks down too when you consider batch jobs involving
> pipelines, such as gcc -pipe.
I think we should give programs points based on several
things:
time_in + how long has it been in-core in seconds (300 max)
data_sz + RSS + DSIZE (#pages)
fil_dsc - number of file descriptors (if it has loads of
file descriptors, it communicates a lot with the environment
and is less likely a batch process)
slp_tim + how long has it been sleeping (to force-swap, but not
suspend sleeping processes) in seconds (300 max)
run_tim + how long has it been running/blocking without 'interactive'
syscalls or state changes in seconds (300 max)
is_root - euid = 0 (500 points)
The more (+) points a process has, the more likely it is
going to be selected for swapout. Now we got to make some
nice formula to select the processes and the swapout time.
Maybe:
points= time_in + (data_sz / fil_dsc) + slp_tim + run_tim - is_root4~
or:
points= (time_in / fil_dsc) + data_sz + slp_tim + run_tim - is_root
^^^^^max 300pt total
When swapping is needed, we simply walk the process table
and swap out the process with the most points...
But we _need_ to be sure that we don't pick X for a 30 second
break ... How do we do that?
Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ). | H.H.vanRiel@fys.ruu.nl |
| ...submissions welcome... | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+
next prev parent reply other threads:[~1998-02-26 23:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-02-25 20:32 Stephen C. Tweedie
1998-02-25 21:02 ` Linus Torvalds
1998-02-25 21:44 ` Rik van Riel
1998-02-25 21:39 ` Dr. Werner Fink
1998-02-25 22:27 ` Rik van Riel
1998-02-26 11:03 ` Dr. Werner Fink
1998-02-26 11:34 ` Rik van Riel
1998-02-26 18:57 ` Dr. Werner Fink
1998-02-26 19:32 ` Rik van Riel
1998-02-26 22:44 ` Stephen C. Tweedie
1998-02-26 23:34 ` Rik van Riel
1998-02-27 19:41 ` Stephen C. Tweedie
1998-03-02 16:19 ` Rik van Riel
1998-03-02 22:35 ` Stephen C. Tweedie
1998-03-02 23:14 ` Rik van Riel
1998-03-03 22:59 ` Stephen C. Tweedie
1998-02-26 8:05 ` Rogier Wolff
1998-02-26 13:00 ` Dr. Werner Fink
1998-02-26 22:36 ` Stephen C. Tweedie
1998-02-26 23:20 ` Dr. Werner Fink
1998-02-26 14:30 ` Rik van Riel
1998-02-26 22:41 ` Stephen C. Tweedie
1998-02-26 23:21 ` Rik van Riel [this message]
1998-02-26 22:33 ` Stephen C. Tweedie
1998-02-26 22:49 ` Rik van Riel
1998-02-27 2:56 ` Michael O'Reilly
[not found] <199802270729.IAA00680@cave.BitWizard.nl>
1998-02-27 11:26 ` Rik van Riel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.3.91.980226235834.5141B-100000@mirkwood.dummy.home \
--to=h.h.vanriel@fys.ruu.nl \
--cc=R.E.Wolff@BitWizard.nl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=blah@kvack.org \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=mingo@chiara.csoma.elte.hu \
--cc=nahshon@actcom.co.il \
--cc=paubert@iram.es \
--cc=sct@dcs.ed.ac.uk \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox