Answer the question
In order to leave comments, you need to log in
What is the difference between parallel and multithreaded programming?
Parallel and multithreaded programming are often seen as two separate items. Can you clearly explain what is the essential difference between these approaches. Maybe there are some good materials on this topic? Thank you.
UPD. found an interesting article that left even more questions.
Answer the question
In order to leave comments, you need to log in
In multi-threaded programming, there are several threads that execute different "programs" that interact with each other. For example, a user interface thread, a computation thread, an I/O processing thread. Multithreaded programming allows you to simplify (with an adequate approach) the architecture of the program, but requires separate skills in designing and debugging.
Parallel programming is used for numerical calculations, or, for example, in computer graphics. In this case, the "program" is one, the data is different. The use of pipelining and a large number of computing cores allows you to get a significant increase in the speed of calculations.
in my opinion, it’s quite a clear article, the difference is indicated there,
just correctly translate cancarancy and parallelism, as competitive execution and parallel, competitive execution can be performed on 1 nuclear machine using thread switching, where different threads compete for processor time, and this time is not necessary should be distributed equally, parallelism means that tasks are executed in parallel, for example, on different cores (although they can also use parallelism based on concurrent execution of threads)
, while:
Parallelism requires concurrency, but concurrency does not guarantee parallelism.
IMHO - the difference is philosophical. Either solve different tasks in parallel, or split long typical calculations into separate threads.
Parallel programming is the calculation of something on several computing cores.
Multi-threaded programming is writing programs that run on multiple threads.
Parallel, but not multi-threaded: [email protected] and other distributed systems.
Multi-threaded, but not parallel: chess AI works regardless of the interface: while the person is thinking, the program is counting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question