From: Steven Smith <sos22@cantab.net>
To: "K. Anantha Kiran" <ananth@cse.iitk.ac.in>
Cc: linux-c-programming@vger.kernel.org, sos22@srcf.ucam.org
Subject: Re: kerel level threads
Date: Wed, 25 May 2005 10:06:21 +0100 [thread overview]
Message-ID: <20050525090621.GA1453@cam.ac.uk> (raw)
In-Reply-To: <42942467.9060805@cse.iitk.ac.in>
[-- Attachment #1: Type: text/plain, Size: 939 bytes --]
> Does pthread_create() create kernel level threads?
Undefined. Whether the kernel knows about the threads is up to the
implementation of the threading library. Usually, on Linux, there is
one kernel thread for every user thread.
> My observation is that either both of the threads be Kernel level
> threads or pthread library has given wrapper functions for blocking
> calls(for example, sleep system call in our case) which stop all of
> the threads to be blocked.
Either would be an acceptable implementation. Linux pthreads takes
the former approach.
> I read in text books that pthread libray is for creating user level
> threads(threads about which kernel is not aware of).
There are (at least) two different meanings of user-level threads.
pthread_create creates a user-level thread in the sense that it runs
user-level code, but the details of who makes the scheduling decisions
are left up to the implementation.
Steven.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-05-25 9:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-24 3:47 Good book Ram S
2005-05-24 5:06 ` lk
2005-05-25 7:08 ` kerel level threads K. Anantha Kiran
2005-05-25 9:06 ` Steven Smith [this message]
2005-05-25 11:46 ` Glynn Clements
2005-05-25 11:57 ` Glynn Clements
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=20050525090621.GA1453@cam.ac.uk \
--to=sos22@cantab.net \
--cc=ananth@cse.iitk.ac.in \
--cc=linux-c-programming@vger.kernel.org \
--cc=sos22@srcf.ucam.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;
as well as URLs for NNTP newsgroup(s).