Community resourceWorksheet

OCR H446 2.1.5 Thinking concurrently

Part 1 · H446 2.1.5 · Thinking concurrently

Concurrency in OCR H446 2.1.5 is judged by dependencies and shared state rather than by speed alone. A live youth-media broadcast lets students decide what can safely overlap, what must wait for data, and what a single shared status flag can hide.

Students will:

  • distinguish tasks that may overlap from tasks tied together by a data dependency
  • justify a pair of broadcast tasks that must stay in strict order
  • explain how two tasks writing one shared status value cause premature publishing
  • describe a separate-flag design that prevents that failure
  • evaluate concurrent processing with benefits, trade-offs and a justified conclusion

Inside: 6 explanation cells, 1 multiple-choice question, 2 fill-in-the-blanks cells and 3 written answers. 25 marks, about 25 to 35 minutes.

Series: H446 2.1.5 · Thinking concurrently, part 1 of 1.

Shared by Coding PathwayVerified teacher

  • 12 cells
  • About 30 minutes
  • CC BY-SA 4.0
  • Shared 31 Aug 2026
  • Updated 15 Sept 2026

Preview

The whole resource, exactly as a class sees it. Answers and marking are held back.

Thinking concurrently

A live broadcast captures audio and video, creates captions, encodes the recording and publishes each segment. Some of these tasks can make progress during the same period. Other tasks must wait because they need an earlier result. Thinking concurrently means deciding which parts can overlap and which must remain in order.

By the end, you will be able to

  • distinguish independent tasks from tasks with dependencies;
  • identify parts of a problem that can be tackled concurrently;
  • explain benefits of concurrency in a particular situation;
  • explain trade-offs, including coordination work and shared-data problems.

Remember: decomposition identifies separate components. A dependency exists when one component needs another component's result.

Concurrency must respect dependencies

Concurrent broadcast tasks and dependenciescapture audiocapture videosynchronise streamswaits for both chunksgenerate captionsencode combined videopublish segmentTasks may overlap only when their required inputs and shared resources make that safe.

Audio and video capture can progress during the same time period. Synchronisation needs corresponding chunks from both. Publishing must wait for the encoded media and captions.

Concurrency means two or more tasks make progress during overlapping periods. On one processor core, a scheduler can give each task short time slices. Parallel processing is the case where tasks actually execute simultaneously, for example on different cores. Therefore concurrency does not guarantee simultaneous execution, and processor pipelining is a different idea.

Worked benefit and trade-off

Audio and video capture can overlap, so neither task has to finish before the other starts. This can keep the broadcast responsive and allow more work to be completed in a given time. If one task is waiting for input, processor time may be used by another task instead. Concurrency does not increase the CPU's clock speed.

The tasks still need coordination. Audio and video chunks must be matched by timestamp before encoding; otherwise speech and images may drift apart. Scheduling, switching and sharing data also require additional processing and more complex program logic. Concurrency may therefore give little or no benefit when tasks spend most of their time waiting for one another.

Multiple choice1 mark

Which pair can most safely begin concurrently in the supplied model?

  • APublish segment and capture its video
  • BEncode combined video and capture its first frame
  • CCapture audio and capture video
  • DPublish captions before generating them
Fill in the blanks3 marks
A task that needs another task's result has a gap 1. Independent tasks may make progress gap 2. Joining matching audio and video chunks requires gap 3.
  • dependency
  • concurrently
  • synchronisation
  • cache hit
Written answer4 marks

The broadcast team must also moderate the live chat, create a preview image, add the programme title to the video and upload the finished video. Identify one pair of tasks that could overlap and one pair that must remain ordered. Justify both choices.

For the overlapping pair, explain why neither needs the other's result. For the ordered pair, state the result that the later task needs.

Students type their answer here.

Challenge: a shared-data problem

Captioning and encoding both write status = 'complete' to the same segment record. If publishing checks only this value, the first task to finish can set the status to complete even though the other task is still running. The segment may then be published too early.

A safer design stores separate caption_complete and encode_complete Boolean values. Publishing occurs only when both are True. This is an example of synchronisation: the program coordinates tasks at a point where their results must be combined. An uncontrolled result caused by the order of concurrent updates is called a race condition.

Written answer4 marks

Explain why the shared status value can cause the segment to be published too early. Then explain how the two-flag design prevents this.

State what either task can write first, why that makes the shared status misleading, and what the program must check before publishing.

Students type their answer here.

Written answer8 marks

Evaluate concurrent processing for this live broadcast. Include at least two benefits, two trade-offs and a justified conclusion.

Apply each point to capture, captions, encoding or publishing.

Students type their answer here.

Checkpoint

Complete the concurrency distinctions from memory. Your teacher will review your answers.

Fill in the blanks5 marks
Concurrent tasks make progress during checkpoint gap 1 periods. One core may alternate between them using processor-time checkpoint gap 2. Actual simultaneous execution is checkpoint gap 3 processing. A qualified benefit is less processor checkpoint gap 4 time; scheduling and synchronisation add checkpoint gap 5.

Review your understanding

Before submitting, check that you can define concurrency, distinguish it from parallel processing and pipelining, identify a dependency, and explain a qualified benefit and trade-off in context.