April 3rd, 2012, 01:40 AM
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:
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
April 11th, 2012, 12:07 AM
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.
April 11th, 2012, 12:33 PM
Originally Posted by KansaiRobot
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
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