Concurrency: Difference between revisions
Mr. MacKenty (talk | contribs) (Created page with "right|frame|Exceptions<ref>http://www.flaticon.com/</ref> Concurrence is simultaneous occurrence. It is two things which happen at the same time. == Exa...") |
Mr. MacKenty (talk | contribs) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[file:arrows.png|right|frame|Exceptions<ref>http://www.flaticon.com/</ref>]] | [[file:arrows.png|right|frame|Exceptions<ref>http://www.flaticon.com/</ref>]] | ||
Concurrence is simultaneous occurrence. | 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: | |||
# 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. | |||
# 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<ref>https://en.wikipedia.org/wiki/Concurrent_computing</ref>. 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 == | == Example == | ||
[[File: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 evaluate concurrency == | |||
Ask yourself: | |||
# does this solution save us money? | |||
# does this solution save us time? | |||
# does this make sense (can you concurrently eat your breakfast and ride your bike at the same time?) | |||
== Standards == | == Standards == |
Latest revision as of 06:43, 19 November 2020
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:
- 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.
- 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[edit]
How this solves problems[edit]
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 evaluate concurrency[edit]
Ask yourself:
- does this solution save us money?
- does this solution save us time?
- does this make sense (can you concurrently eat your breakfast and ride your bike at the same time?)
Standards[edit]
These standards are used from the IB Computer Science Subject Guide[3]
- Identify the parts of a solution that could be implemented concurrently
- Describe how concurrent processing can be used to solve a problem
- Evaluate the decision to use concurrent processing in solving a problem
References[edit]
- ↑ http://www.flaticon.com/
- ↑ https://en.wikipedia.org/wiki/Concurrent_computing
- ↑ IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.