Concurrency in Problem Solving (OCR A Level Computer Science)

Revision Note

Determine the Parts of a Problem That Can Be Tackled at the Same Time

What is Concurrent Computing?

  • Concurrent computing is usually confused with parallel computing, especially when both terms are often used interchangeably. While both are related, they are distinct

  • Concurrent computing allows multiple processes/tasks to run on a single processor by giving each process a fraction of time and control over the processor before swapping to another process 

  • Parallel computing is where multiple processes are run at the same time over multiple processor cores to enable faster computations

  • To fully understand concurrent processing, it is important to imagine a world where time slices are not allocated to processes. Each process finishes to completion before another process can be run. Practically, if someone wishes to play a game while a virus scan is running, they will have to wait until the scan is complete before they can play

  • In a world with concurrent processing the virus scan is allocated a few microseconds of execution time. The game is then allocated a few microseconds of execution time, before swapping back to the virus scanner. As human brains have very slow information processing speeds, the effect looks simultaneous but in actuality is sequential

  • Modern programs, such as photo and video editing software and more commonly AAA games, make use of parallel computing to complete multiple tasks at the same time to improve running speed and maximise resource usage and efficiency

parallel-vs-concurent
  • In order to determine parts of a problem that can be tackled at the same time, developers must consider dependencies

  • Dependencies are tasks that rely on other tasks in order to either start or complete

    • Example 1 -  A roofer cannot put a roof on a house if the walls aren't fully built, and walls cannot be built unless the foundation is in place

    • Example 2 - A persons taxes cannot be calculated until all of their income has been input and all deductibles taken into account

  • When running a batch program on a set of data, such as an analysis of climate data or a companies departmental finances, if data sets do not relate, rely or interact with each other they can be run in parallel on multiple cores

  • Running such programs on multiple cores increases time efficiency while also maximising resource usage

  • If multiple different batch programs need to be run they can be interchanged and pipelined using concurrent processing on the same processor. This will allow multiple programs to make progress in a shorter time frame

You've read 0 of your 0 free revision notes

Get unlimited access

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?