linux-smp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Xu Yang" <risingsunxy@googlemail.com>
To: linux-smp@vger.kernel.org
Subject: mutex vs cache coherency protocol
Date: Mon, 3 Sep 2007 20:03:14 +0200	[thread overview]
Message-ID: <ab40e9c0709031103k55da2a34od17345bd1c112a68@mail.gmail.com> (raw)

Hello everyone,

Just got a rough question in my head.

don't know whether anyone interested .

mutex vs cache coherency protocol(for multiprocessor)

both of these two can be used to protect shared resource in the memory.

are both of them necessary?

for example:

in a multiprocessor system, if there is only mutex no cache coherency.
obviously this would cause problem.

what about there is no mutex mechanism, only cache coherency protocol
in multiprocessor system? after consideration, I found this also could
casue problem, when the processors are multithreading processors,
which means more than one threads can be running on one processor. in
this case if we only have cache coherency and no mutex, this would
cause problem. because all the threads running on one processor share
one cache, the cache coherency protocol can not be functioning
anymore. the shrared resource could be crashed by different threads.

then if all the processors in the multiprocessor system are sigle
thread processor, only one thread can be running one one processor. is
it ok, if we only have cache coherency protocol ,no mutex mechanism?

anyone has any idea? all the comments are welcome and appreciated,
including criticism.

regards,

             reply	other threads:[~2007-09-03 18:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-03 18:03 Xu Yang [this message]
2007-09-03 21:44 ` mutex vs cache coherency protocol Robert M. Hyatt
2007-09-03 22:56   ` cerise
2007-09-04  8:58   ` Xu Yang
2007-09-04 17:26     ` Robert M. Hyatt
2007-09-03 22:54 ` Mohamed Bamakhrama
2007-09-04  8:59   ` Xu Yang

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=ab40e9c0709031103k55da2a34od17345bd1c112a68@mail.gmail.com \
    --to=risingsunxy@googlemail.com \
    --cc=linux-smp@vger.kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).