Re: Fairness in love and swapping

Stephen C. Tweedie (sct@dcs.ed.ac.uk)
Thu, 26 Feb 1998 22:33:28 GMT


Hi,

On Thu, 26 Feb 1998 09:05:55 +0100 (MET), R.E.Wolff@BitWizard.nl
(Rogier Wolff) said:

> [ Processes P1 and P2 both need the same amount of CPU time, I've noted
> the "completion percentages" at the top. ]

> If you run it like this, you'll get:

> 0 50 100
> P1 <---- in memory ---->

> 0 5 50 100
> P2 < swapping like mad ><---- in memory --->

> but if the system would be "fair" we would get:

> 0 5 10 15
> P1 <------ swapping --- like --- mad ------------------- ....

> 0 5 10 15
> P2 <------ swapping --- like --- mad ------------------- ....

> So.... In some cases, this behaviour is exactly what you want.

It's maybe not "exactly what you want", but it can certainly be better
than being purely fair, for exactly this reason. That's why it's hard
to see how we can improve much on the current scheme except to tweak
around the edges --- there are cases where being completely fair
actually reduces overall throughput substantially.

> What we really need is that some mechanism that actually determines
> in the first and last case that the system is thrashing like hell,
> and that "swapping" (as opposed to paging) is becoming a required
> strategy.

True. Any takers for this? :)

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu