EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: legacy on December 19, 2015, 05:25:50 pm

Title: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 19, 2015, 05:25:50 pm
so xmas is coming, I have a more free time and my hobby(1) gets involved in Symmetric multiprocessing (also known as SMP), which involves a symmetric multiprocessor system hardware and software architecture where two or more identical processors and I'd like to learn something about from a good book as currently I am learning from the linux sources, which is the worst way ever  :palm: :palm: :palm:

Feel free to suggest me an idea, suggestion, a book title (or its ISBN) to be filled in the end corner of my wishlist in Santa Claus's letter, hopefully we are still in time  :D

thank you

(1) I am dealing with two R12K MIPS4 64 bit, trying to fix a few troubles with linux
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 20, 2015, 12:42:35 pm
the wiki only provide jurassic references, such as:
Also, I do not understand the detailed difference between multi processors and multi core  :-//


Linux and symmetric multiprocessing (http://www.ibm.com/developerworks/library/l-linux-smp/)
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 20, 2015, 12:46:46 pm
(http://ecx.images-amazon.com/images/I/51Z04V844NL._SX358_BO1,204,203,200_.jpg)

Unix Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers
1994, by Curt Schimmel



found on amazon, what do you think about the above book ?
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: andersm on December 20, 2015, 01:15:11 pm
You're going to have to be more specific about what you're looking for. Parallel algorithm design? Implementing SMP primitives? Something else?

Is Parallel Programming Hard, And, If So, What Can You Do About It? (https://www.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html) is pretty low-level, The Art of Multiprocessor Programming (http://www.amazon.com/The-Multiprocessor-Programming-Revised-Reprint/dp/0123973376) is more concerned with design and correctness of parallel algorithms.

Also, I do not understand the detailed difference between multi processors and multi core
Multicore is a form of multiprocessing. A multicore processor has multiple cores(!) in the same processor (same die, or same module). This means they usually share L3 and L2 cache, and are more tightly coupled than processors in different sockets.
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 20, 2015, 02:14:05 pm
Parallel algorithm design? Implementing SMP primitives? Something else?

everything! I do not know anything about SMP, nor hw, nor sw  :D
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 20, 2015, 02:31:01 pm
Multicore is a form of multiprocessing. A multicore processor has multiple cores(!) in the same processor (same die, or same module). This means they usually share L3 and L2 cache, and are more tightly coupled than processors in different sockets.

I am playing with an SMP dual cpu module, 2xR12K processors (MIPS4, 64bit, they are not cores, they are physical chips, two R12K chips), and it uses a completely different method to "pass" commands between CPU0 and CPU1, it's different from e500 quadri-core.

I do not know which kind of atomic instructions are used, e.g. 68000 uses TaS, Test and Set, as read-modify cpu-cycle, I do not know about the cache coherency algorithm. Snoop protocol ? just heard in my computer science course, 4 years ago, what else is used?

and what about coherency algorithms ? I have found the following list in my R12K handbook, while linux implements and uses the 5th, cacheable, coherent, write-back, exclusive on write, sharable (even if … on my board it's not working at all :palm: :palm: :palm: )

Code: [Select]
        /*
         * MIPS3_TLB_ATTR (CCA) values - coherency algorithm:
         * 0: cacheable, noncoherent, write-through, no write allocate
         * 1: cacheable, noncoherent, write-through, write allocate
         * 2: uncached
         * 3: cacheable, noncoherent, write-back (noncoherent)
         * 4: cacheable, coherent, write-back, exclusive (exclusive)
         * 5: cacheable, coherent, write-back, exclusive on write (sharable)
         * 6: cacheable, coherent, write-back, update on write (update)
         * 7: uncached, accelerated (gather STORE operations)
         */
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: helius on December 20, 2015, 03:26:56 pm
MIPS uses LL/SC for atomic sections (Load Locked/Store Conditionally). A basic hardware mutex.
algorithm #5 looks like a "MOSI"/"MESI" scheme, this is the most common for quite a while.
I expect this stuff is covered in "See MIPS Run".
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: andersm on December 20, 2015, 03:39:11 pm
Any decent college-level computer architecture textbook should explain the concepts. Hennessy & Patterson's (http://booksite.elsevier.com/9780123838728/index.php) is one of the best-known.

Like eg. ARM and POWER, MIPS implements atomic operations using load-linked/store-conditional pairs. An easy way to see them in action is to use GCC's built-in atomics and looking at the disassembly.
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 20, 2015, 05:38:39 pm
and what about the above coherency algorithms ?
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: andersm on December 20, 2015, 10:32:38 pm
They will also be explained, or at least you will be better able to understand the documentation. Note that the meaning of the field is implementation-defined, and eg. the R10K manual has a substantially different list (the manual also has descriptions of the different caching algorithms.)
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 20, 2015, 11:21:10 pm
@andersm
which is your practical personal experience with MIPS?
SGI ? Atheros ?
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 21, 2015, 08:45:36 pm
implementing smp properly on mips platform (http://stackoverflow.com/questions/27099008/implementing-smp-properly-on-a-linux-mips-platform)  :-+
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: legacy on December 21, 2015, 09:38:52 pm
books (https://www.linux-mips.org/wiki/Books#General_computer_architecture)
caches (https://www.linux-mips.org/wiki/Caches)
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: rsjsouza on December 21, 2015, 10:05:19 pm
Years ago I learned something about SMP from one of Tom Shanley's books: Pentium Pro Processor System Architecture (http://www.amazon.com/Pentium-Processor-System-Architecture-Series/dp/0201479532%3FSubscriptionId%3DAKIAILSHYYTFIVPWUY6Q%26tag%3Dduckduckgo-ffsb-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0201479532). I am not sure if it is really good or not, I just got the information I wanted at the time.
Title: Re: SMP, Symmetric Multiprocessing, looking for a good book
Post by: daybyter on December 21, 2015, 10:19:15 pm
Maybe read some OpenCL tutorial?