From: ruben@mrbrklyn.com (Ruben Safir)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Semaphore and Spinlock
Date: Mon, 27 Apr 2015 10:21:17 -0400 [thread overview]
Message-ID: <553E45DD.7040202@mrbrklyn.com> (raw)
In-Reply-To: <20150427131845.GA4671@localhost.localdomain>
On 04/27/2015 09:18 AM, Abhishek Bist wrote:
> [ Semaphores are a bit like spinlocks, except the holder of a semaphore is a process, not a CPU. ]
> This is a very first line that is bein written on the description of semaphore on kernel newbies.So what are the different parameter
> that could justify this statement or the way it could be justified and understood.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
That is a good question. In fact, I've been studying semaphores,
spinlocks and Mutexes now for 3 weeks and it still confuses me. Our
school is working from a text called Operating Systems Concepts 9th
Edition. It seems to avoid defining things
It should say
Definition:
Semephore
Mutex:
Spinlocks:
and then there is monitors
I have poured over a lot of sample code. I can show you coding examples
for concurrence protection from race condition, and models for mutexes,
and even describe what a wait queue might look like, but in the end, I'm
still puzzled by this most basic of definition. A lot of this is the
fault of the book. They get lost in their own words, research and
thoughts and fail to deliver understand concepts to the student.
Forget operating systems. Lets say I am writing a book about Bicycles
and the principles of Bicycle design. And we are going to study wheels.
It makes for very ineffective communication to spend 10 pages
describing that C=2piR and other facts about circle geometry, and the
mathematical calculation of force when applied to a spoke(or a rope)
under tension, et et et and forget to define that a Wheel on a bicycle
is a round hoop, usually covered on the outer rim by a rubber tire, that
makes contact to the road and allows for the bicycle to roll.
next prev parent reply other threads:[~2015-04-27 14:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 13:18 Semaphore and Spinlock Abhishek Bist
2015-04-27 14:21 ` Ruben Safir [this message]
2015-04-27 16:31 ` Jeff Haran
2015-04-27 19:09 ` Ruben
2015-04-27 20:20 ` Jeff Haran
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=553E45DD.7040202@mrbrklyn.com \
--to=ruben@mrbrklyn.com \
--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).