From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: pthread_lock
Date: Tue, 05 Mar 2013 01:02:51 -0500 [thread overview]
Message-ID: <21589.1362463371@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Tue, 05 Mar 2013 11:02:45 +0530." <CAC+QLdSaL0cc+uNmYSrvRCbh9tZfirqS0dTcYbC_V0PDejRMYw@mail.gmail.com>
On Tue, 05 Mar 2013 11:02:45 +0530, Mandeep Sandhu said:
> next schedule. I think the waiting threads (processes) will moved from
> the wait queue to the run queue from where they will be scheduled to
> run.
For bonus points, read source code and/or comments and figure out what
Linux does to prevent the 'thundering herd' problem (consider 100 threads
all waiting on the same mutex - if you blindly wake all 100 up, you'll schedule
them all, the first will find the mutex available and then re-take it, and
then the next 99 will get run only to find it contended and go back to
sleep. So figure out what Linux does in that case. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130305/9bdeb5af/attachment.bin
next prev parent reply other threads:[~2013-03-05 6:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 4:44 pthread_lock ishare
2013-03-05 5:32 ` pthread_lock Mandeep Sandhu
2013-03-05 6:02 ` Valdis.Kletnieks at vt.edu [this message]
2013-03-05 8:09 ` pthread_lock Mandeep Sandhu
2013-03-05 10:05 ` pthread_lock ishare
2013-03-12 12:48 ` pthread_lock Prabhu nath
2013-03-13 4:10 ` pthread_lock ishare
2013-03-13 5:20 ` pthread_lock Prabhu nath
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=21589.1362463371@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@lists.kernelnewbies.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).