Search code examples
operating-systemmultiprocessingjob-schedulingsmp

What are the differences between Symmetric Multiprocessing (SMP) and Multiprocessing (MP)?


I know MP is the manage of multiple processes within multiple processors, but is there any difference between that and SMP? Is it that in SMP you can execute multiple threads from the same process simultaniously, and MP you can only have one process occupy one processor?

example of what i think the differences are:

SMP

P1 has 3 threads: P1T1, P1T2 and P1T3 P2 has 2 threads: P2T1 and P2T2.

on a computer with 3 processors, you can assign P1T1 to processor 1, P1T2 to processor 2 and P1T3 to processor 3 simultaneously if all are available, or P2T1 to processor 1, and P2T2 to processor 2 and P1T1 to processor 3.

MP

P1 has 3 threads: P1T1, P1T2 and P1T3 P2 has 2 threads: P2T1 and P2T2.

on a computer with 3 processors, you can assign P1T1 to processor 1 and - P1 has 3 threads: P1T1, P1T2 and P1T3 P2 has 2 threads: P2T1 and P2T2.

on a computer with 3 processors, you can assign P1T1 to processor 1, but P1T2 and P1T3 have to wait until P1T1 is done in order to execute, while P2T1 can go to processor 2, and, again, P2T2 would have to wait until P2T1 is done executing before it ca execute.

Does this make sence? If it does, am I on the right track? Thx, I got an OS exam today and I'm studying. Thank you for any help you guys can provide.

Also, how are threads scheaduled? I know that is a very broad question, but is there any specific way? or is it based on the scheaduling the system has implemented? I know there is round robin scheaduling, higher priority, time slicing, time sharing, shortest amount of time... If this question doesnt make sence, no worries, I appreciate any help you guys can give.


Solution

  • Actually,SMP is a division of MP. SO, the question of difference doesn't make much sense. Any MP can be either of the two---either Symmetric MP or Parallel(Asymmetric) MP.

    In your case,examples can't be taken into account to differentiate these two because of the mentioned above reason.

    Also, in SMP, the two CPU's or processors reside on different machines or are separate processors or are different cores which work on the same shared memory to achieve the work done!

    As mentioned in Wikipedia about Symmetric Multiprocessing :-

    Symmetric multiprocessing (SMP) involves a symmetric multiprocessor system hardware and software architecture where two or more identical processors connect to a single, shared main memory, have full access to all I/O devices, and are controlled by a single operating system instance that treats all processors equally, reserving none for special purposes. Most multiprocessor systems today use an SMP architecture. In the case of multi-core processors, the SMP architecture applies to the cores, treating them as separate processors.