atomic ps [was: vm locking question]

From: Borislav Deianov (borislav@lix.polytechnique.fr)
Date: Thu Apr 13 2000 - 06:42:44 EST


On Wed, Apr 12, 2000 at 11:51:25PM +0100, Alan Cox wrote:
> Why do you want an atomic ps - nobody else has one

That sounds like a reason by itself ;)

Seriously, the main reason is to try out that type of interface. It
solves the following problem: there currently is no way to atomically
get more than 3K out of /proc, even if it's all in the same file. I
have that problem with the fair scheduler. Rusty Russell once
complained that firewall counters in 2.2 also suffer from this.

Atomic ps also seems possible to implement with zero impact to the
rest of the kernel, so why not?

> If you are about to answer 'for a consistent view of the machine' then
> remember you broke the true view of the machine firstly by running ps
> and secondly by taking locks and thus changing the synchronization or
> lack thereof between events

I don't claim that it gives you "the true view" of the machine, I know
that's impossible. However, a "consistent view" is a different beast -
it's something that _might_ have occurred even if you didn't run ps.
That may not be perfect but it certainly makes more sense as a whole
than the random collection of process data that the normal ps gives
you.

Regards,
Borislav

-
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.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:20 EST