> On Tue, 14 Jul 1998, Gerard Roudier wrote:
> >
> > If your program seems to demonstrate that having even up to 5% memory
> > free does not help a lot and that the ratio of pages you will throw away
>
> No, read the math again.
>
> The only reason I wrote a program to do the calculations was that I was
> too lazy (and possibly too inept) to symbolically solve the value of
>
> x * (x-2) * (x-4) * .. (y times)
> -----------------------------
> x ^ y
>
> so I just wrote a program to iterate and do the calculations for me.
>
> Having 5% memory free almost guarantees that you'll have consecutive pages
> for an 8MB machine. It also showed very clearly that on a 4MB machine it
> was getting painful - you needed to keep a fair amount of your memory free
> to give the same kinds of guarantees.
This perhaps _almost_ guarantees that you will succeed the allocation
_once_, but the problem is to _almost_ guarantee that you will succeed
_most_ of the time.
Basically, if a probability of 0.99 _almost_ guarantees you will succeed
_once_, it also _almost_ guarantee you will _fail_ _once_ for 100 tries.
At a raw approximate, if P is the probability to succeed once, the
probability to succeed N times consecutivevely is P at the power of N.
Note that my simulation was broken this way too.
Regards,
Gerard.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html