public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel kernel <unix.hacker@gmail.com>
To: Robin Doer <robin@robind.de>
Cc: newbie <linux-newbie@vger.kernel.org>
Subject: Re: Mutual Exclusion in Kernel
Date: Thu, 7 Oct 2004 10:48:09 +0530	[thread overview]
Message-ID: <104ee7a504100622183f3ad1a5@mail.gmail.com> (raw)
In-Reply-To: <20041006.Yzh.28379000@192.168.0.6>

Hi All,

Spin lock is a mutual exclusion strategy which is used in
Multiprocessor machanies.

When  i resource is not available for a  particular thread, it wont be
removed from TASK_RUNNING status and put into the corresponding event
Q. Instead it will loop around the processor, in closed cycles until
the resource is available.

So when the thread which currently owns the resource in other
processor leaves the resource, the loop thread can access the
resource.  This can avoid the Thundering Herd problem as well as the
overhead of pushing the thread  into the Event Q..

Thanks
Amrith


On Wed, 06 Oct 2004 10:43:20 +0200, Robin Doer <robin@robind.de> wrote:
> Good morning!
> 
> Ankit Jain (ankitjain1580@yahoo.com) schrieb:
> >
> > hi
> >
> > what is spin lock?
> 
> http://en.wikipedia.org/wiki/Spin_lock
> 
> aka "busy waiting". A thread is polling <something> until <something> says
> "ok" and the thread continues working.
> 
> >
> > thanks
> >
> > ankit
> 
> Have fun,
> Robin
> 
> 
> 
> -
> 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
>
-
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

  reply	other threads:[~2004-10-07  5:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <577528CFDFEFA643B3324B88812B57FE2D9B67@inhyms21.ca.com>
2004-10-06  5:50 ` Mutual Exclusion in Kernel Ankit Jain
2004-10-06  8:43   ` Robin Doer
2004-10-07  5:18     ` kernel kernel [this message]
     [not found] <20041006085523.35414.qmail@web52903.mail.yahoo.com>
2004-10-06 14:04 ` Robin Doer

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=104ee7a504100622183f3ad1a5@mail.gmail.com \
    --to=unix.hacker@gmail.com \
    --cc=linux-newbie@vger.kernel.org \
    --cc=robin@robind.de \
    /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