• 1 Post
  • 86 Comments
Joined 1 year ago
cake
Cake day: June 21st, 2023

help-circle







  • Wikpedia puts it nicely:

    "The concept of concurrent computing is frequently confused with the related but distinct concept of parallel computing,[3][4] although both can be described as “multiple processes executing during the same period of time”. In parallel computing, execution occurs at the same physical instant: for example, on separate processors of a multi-processor machine, with the goal of speeding up computations—parallel computing is impossible on a (one-core) single processor, as only one computation can occur at any instant (during any single clock cycle).[a] By contrast, concurrent computing consists of process lifetimes overlapping, but execution does not happen at the same instant. "


  • A cpu (core) can only do one thing at a time. When you have multiple cores you can do multiple things at the same time. Multitasking in programming sense is a bad term, it’s a term more for the masses.

    Bit simplified:

    • concurrency: you seem to be doing multiple things at the same time. In reality they are run little by little one after another. Doesn’t really speed things up.
    • parallelism: you actually run multiple things at the same time (multiple cpus/cpu cores required). If the code scales properly or is designed to truly run in parallel the speed up is relative to the number of cpus available.

    Edit: It’s much more complex subject then I’ve presented here.