Concurrency

From Computer Science Wiki
Jump to: navigation, search
Exceptionsanomalous or exceptional conditions requiring special processing – often changing the normal flow of program execution[1]

Concurrence is simultaneous occurrence. We could say something is concurrent when two processes happen at the same time. Below, you can see classic example of concurrency in a gantt chart, which is used to plan a project.

A note of caution. There are two different ways of looking at concurrency:

  1. Concurrency can be used in project management and software development where multiple tasks are implemented at the same time. See the Gantt chart below for an example.
  2. Concurrent computing is a form of computing in which several computations are executed during overlapping time periods—concurrently—instead of sequentially (one completing before the next starts). We could also call this asynchronous programming[2]. In this sense, we program to take advantage of inactive CPU processing time. Rather than process one task, wait, and then process another another task, we can process a second task as we are waiting for the first task to complete.


The IB asks that you understand the first type of concurrency, and specifically states you will not be required to know about the second type of concurrency.


Example

Gantt chart.png

How this solves problems

Concurrent processing improves the speed and efficiency of solving a problem. If you can process many tasks simultaneously you will save time over processing them sequentially (one at a time).

How to evaluateAssess the implications and limitations; make judgments about the ideas, works, solutions or methods in relation to selected criteria. concurrency

Ask yourself:

  1. does this solution save us money?
  2. does this solution save us time?
  3. does this make sense (can you concurrently eat your breakfast and ride your bike at the same time?)

Do you understand this?

Standards

These standards are used from the IB Computer Science Subject Guide[3]

  • IdentifyProvide an answer from a number of possibilities. Recognize and state briefly a distinguishing fact or feature. the parts of a solution that could be implemented concurrently
  • DescribeGive a detailed account or picture of a situation, event, pattern or process. how concurrent processing can be used to solve a problem
  • EvaluateAssess the implications and limitations; make judgments about the ideas, works, solutions or methods in relation to selected criteria. the decision to use concurrent processing in solving a problem

References

  1. http://www.flaticon.com/
  2. https://en.wikipedia.org/wiki/Concurrent_computing
  3. IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.