Skip to content

2.1.5 Thinking Concurrently Exam Questions

Paper 2 · Algorithms & Programming · 5 past paper questions · 3 practice questions · 36 marks

Exam questions for 2.1.5 Thinking concurrently

5 OCR past paper questions and 3 practice questions (36 marks) with mark schemes

Answer each question, reveal the mark scheme, then award yourself marks. Scores and answers are saved in this browser so you can see which topics need more work.

Download Questions & Mark Scheme (PDF)

Past paper questions

  1. Question 1H446/02 · June 20212 marks

    Describe what is meant by the term 'concurrent processing'.

    Show mark scheme
    Processes happen at the same time / processes overlap / One process can start before another one finishes / Each process is given a slice of processor time / Different processes can be executed in parallel by different processors/cores (2 marks)
    Mark yourself: how many marks did you get?
    / 2
  2. Question 2H446/02 · June 20232 marks

    Give two benefits of using concurrent processing.

    Show mark scheme
    More efficient processor use / Less idle time for processor / Greater throughput / Long running tasks do not delay short running tasks / Tasks requiring preconditions can wait and then resume execution / User is able to interact while other tasks are running (2 marks)
    Mark yourself: how many marks did you get?
    / 2
  3. Question 3H446/02 · June 20213 marks

    Explain why concurrent processing is needed to allow multiple users to log in and interact with game elements at the same time.

    Show mark scheme
    Game could have large number of requests to the server at a time / Server needs to respond in reasonable time / Having multiple processors handling different requests increases response time / Users could override each other's changes / Need record locking to stop edits if someone else has access / Different users have different response times (3 marks)
    Mark yourself: how many marks did you get?
    / 3
  4. Question 4H446/02 · June 20209 marks

    OCR-Tickets wants to sell tickets online. Discuss the need for concurrent processing in OCR-Ticket's system and the benefits and drawbacks of using this.

    Show mark scheme
    Levels of response (9 marks). Need: Multiple users accessing simultaneously / High demand periods for popular events / Database reads and writes happening concurrently. Benefits: Better response times / More efficient resource use / Better user experience / Can handle more users. Drawbacks: Race conditions possible / Need for locking mechanisms / More complex to program / Possible deadlocks / Higher resource overhead
    Mark yourself: how many marks did you get?
    / 9
  5. Question 5H446/02 · June 20179 marks

    A programmer is developing an ordering system for a fast food restaurant. Discuss how concurrent programming can be applied to the food ordering system and the benefits and limitations of doing so.

    Show mark scheme
    Levels of response (9 marks). Application: Multiple orders processed simultaneously / Different stations preparing different items / Orders added while others are being prepared. Benefits: Faster service / Better resource utilization / Can handle peak times. Limitations: Need to manage order of completion / Complexity of coordination / Potential for errors if not properly synchronized
    Mark yourself: how many marks did you get?
    / 9
  6. Question 6Practice question · H446/02 style4 marks

    A photo-editing program applies a filter to an image, then saves the image, then uploads it to a website. Identify which of these tasks could be carried out at the same time and which must be carried out in sequence, giving reasons.

    Show mark scheme
    • The filter must be completed before the image is saved • ...because saving needs the finished image • Saving and uploading could overlap / the upload can begin as soon as the file exists • Parts of the filter itself could be applied to different regions of the image concurrently (4 marks – 1 per point)
    Mark yourself: how many marks did you get?
    / 4
  7. Question 7Practice question · H446/02 style3 marks

    Two threads in a banking program both update the balance of the same account. Explain a problem that could occur and how it can be prevented.

    Show mark scheme
    • A race condition: both threads read the old balance before either has written its new value • One update is lost / the final balance is wrong • Prevented by using a lock / mutex / semaphore so only one thread can update the balance at a time (or by making the update atomic) (3 marks – 1 per point)
    Mark yourself: how many marks did you get?
    / 3
  8. Question 8Practice question · H446/02 style4 marks

    A weather service calculates a forecast for each of 1000 towns. Explain the benefits and trade-offs of using concurrent processing to produce the forecasts.

    Show mark scheme
    Benefits: • Each town's forecast is independent, so many can be calculated at the same time • Uses all available cores / processors, so the full set of results is ready sooner Trade-offs: • Overhead of creating and managing threads and combining the results • More complex to write, test and debug • Any shared data (e.g. the national weather map) must be synchronised • Speed-up is limited by the number of cores available (4 marks – max 2 benefits, max 2 trade-offs)
    Mark yourself: how many marks did you get?
    / 4
Key Exam Tips for 2.1.5
  • 1Concurrent: Single processor, time-slicing, illusion of simultaneity
  • 2Parallel: Multiple processors/cores, true simultaneity
  • 3Benefits: Efficiency, resource use; Drawbacks: Overhead, complexity
General Exam Advice
  • •Practice answering questions under timed conditions
  • •Check your answers against the mark scheme carefully
  • •Focus on understanding the marking points, not just memorising answers
  • •Review past paper questions from multiple years to spot patterns