0
$\begingroup$

After researching concurrency I am unable to discern if it is either of these specifically or it encapsulates both?

I was also wondering if someone could provide some programming applications/real world examples I am struggling to grasp the concepts entirely and it feels like every where I look people have different understandings.

Just two re-define the two concepts I believe it to be:

  1. Order independent: There is 3 Tasks A, B and C they need to be completed for the application to finalize, and are able to be completed in any order.

  2. Interruptible: Tasks are able to be halted mid processing in order to complete part of one of the other tasks.

Point 2 I am most uncertain about how is this advantageous for a serial application? I am guessing it would be to do with user input/bypassing locks or waits caused by requiring further information so other tasks can be completed.

NOTE: I am trying to apply these in a context outside of parallelism.

$\endgroup$
2
$\begingroup$

Concurrency is working with tasks that may run simultaneously. In my experience, when this term is used, the main focus is on correctness: making sure a system works as intended.

One way of doing that is to impose additional constraints on the system and ensure that they are always met. Order independence and interruptability are examples of two such constraints. You may want them to hold for your concurrent system. But they are not required properties of concurrent systems in general: for many concurrent systems, they do not hold and do not need to hold.

For instance, in MySQL, you can configure to what extent you want your transactions to be isolated, with full serializability (order independence) as the highest level.

$\endgroup$
  • $\begingroup$ So what is the application of concurrency outside of parallelism? (it seems parallelism is the only use) $\endgroup$ – Oliver Giess May 25 '16 at 8:44
  • $\begingroup$ It depends on whom you ask. In my experience, the term parallellism usually refers to concurrent processes sharing memory (as opposed to e.g. distributed processes) and usually refers to the performance improvements (speedups) you can gain rather than the complexities of getting all the data manipulation / information exchange / deadlock issues resolved correctly. So I would consider concurrency to be a broader term. Be aware that IT terms are used in widely different ways by different people or in different contexts. $\endgroup$ – reinierpost May 25 '16 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.