James Gregory wrote:

On Wed, 2005-12-21 at 16:40 +1100, O Plameras wrote:
#define spin_lock_init(lock)    do { (void)(lock); } while(0)
#define _raw_spin_lock(lock)    do { (void)(lock); } while(0)

I am reading this cited macros. This is very very clear.

It is very very clear what it says, and, i.e., regardless of what
is the value of 'lock' the kernel should do nothing.

That's exactly right. And if you compile without CONFIG_SMP, that's what
gets built into your kernel. You can get away with it because of the
clever way in which a CPU does one thing at a time; there is no "true"
parallelism.


By the way, is it not true that 'pipelining' that's a feature of x86 CPU's starting with i586 which I have pointed out in one of my previous post is (another name) implementation of 'parallel' processing ? This means that more than one instructions may be executed in one clock cycle. This is implemented by using a bus interface unit (BIU) and an execution unit. Experts on Intel Arch may confirm the truthfullness or falsehood of this assertion. (I'm not an expert, I just know by researching).

With pipelining,  the CPU overlaps instruction fetching and decoding with
instruction execution, i.e., while one instruction is executing BIU is fetching and decoding the next instruction. So, assuming you're willing to add hardware
you can execute more and more operations in parallel.

So, in this way there is true parallelism in x86 arch.

Just a clarification.

O Plameras



--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to