public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Erik Mouw <mouw@nl.linux.org>
To: Rick Brown <rick.brown.3@gmail.com>
Cc: kernelnewbies <kernelnewbies@nl.linux.org>, linux-newbie@vger.kernel.org
Subject: Re: Threading in linux
Date: Tue, 24 Apr 2007 11:54:49 +0200	[thread overview]
Message-ID: <20070424095449.GC20230@gateway.home> (raw)
In-Reply-To: <7783925d0704232338h52bc1180i435a880b267ca0f3@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Apr 24, 2007 at 12:08:40PM +0530, Rick Brown wrote:
> I read that the kernel does not differentiate between threads and
> processes.

Correct.

>  That means, we can say that on a Linux system, the
> threading is purely provided by user level thread libraries, right?

No. User level thread libraries are usually things like LWP (light
weight processes), that's not what the Linux kernel uses. The Linux
clone() system call is a superset of the standard Unix fork() system
call. With clone() you can tell what parent and child have to share. A
thread is just an execution context that shares the protection context
with its parent.

> So as long as relevant system calls do not change, it should be
> possible to run any threading library on any kernel? NPTL on 2.4?
> pthreads on 2.6?

Not sure about that. There were certainly issues, though I can't
remember exactly what.


Erik

- -- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGLdPp/PlVHJtIto0RAoV4AJ9+NUu6wSCAniqHGebFcryzJ4pt1ACffRFC
062W3+mce5yHafv4Ryjc/G4=
=LAWy
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  parent reply	other threads:[~2007-04-24  9:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24  6:38 Threading in linux Rick Brown
2007-04-24  7:03 ` pradeep singh
2007-04-24  7:17 ` Amol Lad
2007-04-24  8:29   ` Rick Brown
2007-04-24  9:54 ` Erik Mouw [this message]
2007-04-24 10:08 ` Mike Frysinger
2007-04-24 10:36   ` Rick Brown
2007-04-24 10:51     ` Mike Frysinger
2007-04-25  0:48     ` John Aspinall

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=20070424095449.GC20230@gateway.home \
    --to=mouw@nl.linux.org \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-newbie@vger.kernel.org \
    --cc=rick.brown.3@gmail.com \
    /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