#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    21
    Rep Power
    0

    Multithreading, Parallelism..etc


    Hello.
    I would like to ask first a general question (I will get specific I suppose later since I am planning to work with C or C++) about the following issues:

    • Multithreading
    • Parallelism


    Theoretically are they the same? I am asking from a general point of view since what confuses me is that there can be multithreading in a single processor system, right? Is that consider parallelism?

    Or are those concepts independent of the number of processors the system has?

    I am planning to implement multiple processes in a single processor system and I would like to learn and find good resources (books) for this. Should I look for multithreading? or for parallel programming?

    Thanks a lot in advance
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    Look up multithreading if you're interested in the implementation details. Also note that threads and processes are not the same thing. Implementing multiple processes is significantly different from implement multiple threads.

    "parallel programming" generally refers to techniques and algorithms for splitting work across multiple cores or processors and then recombining it to get a meaningful result faster than if only one core had been used to do the work. If your concern is primarily on the algorithm then look this up.

    Due to the nature of modern processor design you can run into parallel processing type problems even on a single core processor. This is because your threads share some resources (memory) and you cannot predict or guarantee the order in which instructions from different threads execute.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    London
    Posts
    40
    Rep Power
    15
    Originally Posted by KansaiRobot
    • Multithreading
    • Parallelism

    Parallelism is a "Concept/Methodology", and it simply deals with "doing something simultaneously (i.e. in parallel)"

    Multithreading are hardware/OS implementation.

    see this Threads
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    Bonn, Germany
    Posts
    35
    Rep Power
    3
    Parallelism can be on many levels:
    - Multiple separate computers working together over a network
    - Multiple processors in a single computer
    - Multiple threads in the same process
    - Instructions being executed in parallel by the CPU by itself
    - Techniques like SSE

    _____________
    Visit my project: Derivative Calculator

IMN logo majestic logo threadwatch logo seochat tools logo