mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick LeRoy <nleroy@cs.wisc.edu>
To: "Albert D. Cahalan" <acahalan@cs.uml.edu>, linux-kernel@vger.kernel.org
Cc: acahalan@cs.uml.edu
Subject: Re: Detecting threads vs processes with ps or /proc
Date: Sun, 8 Dec 2002 21:18:44 -0600	[thread overview]
Message-ID: <200212090319.gB93J7p20606@schroeder.cs.wisc.edu> (raw)
In-Reply-To: <200212090024.gB90OTN25818@saturn.cs.uml.edu>

On Sunday 08 December 2002 06:24 pm, Albert D. Cahalan wrote:
> Robert Love writes:
> > On Fri, 2002-12-06 at 14:56, Nick LeRoy wrote:
> >> I was considerring doing something like this as well.  From your
> >> experience,  does it work reliably?
> >
> > It never fails to detect threads (no false negatives).
>
> Testing the algorithm on idle test processes won't show
> this damn-obvious race condition:
>
> 1. you read the first thread's info
> 2. the second thread calls mmap() and/or takes a page fault
> 3. you read the second thread's info

Yeah, I thought of that, too.  Probably not too likely, of course, but it 
still there.  Murphy rules.

Robert:  Any thoughts on this?

-Nick

  reply	other threads:[~2002-12-09  3:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-09  0:24 Albert D. Cahalan
2002-12-09  3:18 ` Nick LeRoy [this message]
2002-12-09  3:47   ` Robert Love
  -- strict thread matches above, loose matches on Subject: below --
2002-12-06 15:24 Nick LeRoy
2002-12-06 19:48 ` Robert Love
2002-12-06 19:56   ` Nick LeRoy
2002-12-06 20:09     ` Robert Love
2002-12-09 16:27       ` Jeremy Fitzhardinge
2002-12-08 12:24 ` Gilad Ben-Yossef

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=200212090319.gB93J7p20606@schroeder.cs.wisc.edu \
    --to=nleroy@cs.wisc.edu \
    --cc=acahalan@cs.uml.edu \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®