From: sounak chakraborty <sounakrin@yahoo.co.in>
To: linux kernel <linux-kernel@vger.kernel.org>
Subject: problem with process and threads
Date: Fri, 18 Mar 2005 10:49:37 +0000 (GMT) [thread overview]
Message-ID: <20050318104937.67083.qmail@web53309.mail.yahoo.com> (raw)
dear sir
The number of processes that are being created in
fork.c() in function do_fork are less than the number
of processes are being terminated in exit.c in
function do_exit().
I am placing a printk() in both the above
functions do_fork() and do_exit() and thus after
compiling and then restarting i am getting exit
messages of many process ids that have not yet been
formed.
Another question is that while we are using an AND
operation to distinguish between a process and a
thread (
if(p->flags & CLONE_VM)
in fork.c in function do_fork() in linux kernel 2.6.8
).
But if i use the above check in do_exit() , will
it be able to distinguish between a thread and a
process in the same manner as do_fork().
If this is not the case , then plz tell where i am
wrong and rectify my mistake.
One more problem is while p->active_mm is equal to
NULL in case of kernel threads and not NULL in case of
user level threads ; through this check we can
identify kernel and user level threads in fork.c but
in exit.c the same p->active_mm value is not NULL for
kernel and user level threads.
Hence i want to know how can i make a distinction
between kernel and user threads . Is there any other
way?
Eagerly waiting for a reply,
Thanks in advance,
Sounak
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/
reply other threads:[~2005-03-18 10:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050318104937.67083.qmail@web53309.mail.yahoo.com \
--to=sounakrin@yahoo.co.in \
--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®