Understanding Concurrent Thinking
Scenario: for each passing car, record number plate and colour.
| Approach | What happens | Typical outcome |
|---|---|---|
| Sequential | Record all plates first, then try colours later | Missing/mismatched data likely |
| Concurrent thinking | Capture plate + colour together per car event | More complete and accurate records |
• Better data consistency (plate matches colour)
• More efficient handling of each event
• Less risk of missing information
| Concept | Meaning | Example |
|---|---|---|
| Concurrent processing | Several tasks are in progress at the same time: one starts before another has finished | A browser, a music player and an update all running |
| On a single core | The processor gives each task a slice of time in turn, so they appear to run together | Three tasks sharing one core |
| On several cores | Different tasks run on different cores at the same instant (parallel processing) | One task on each core |
| Everyday concurrency pattern | Multiple active activities with shared resources/time | Cooking multiple dishes, supermarket checkout lanes |
Identifying the Parts of a Problem That Can Run at the Same Time
| Task | Depends on | Can it run concurrently? |
|---|---|---|
| Download the HTML file | Nothing | It must come first, because it lists the other files needed |
| Download image 1 | The HTML file | Yes, alongside the other downloads |
| Download image 2 | The HTML file | Yes, alongside the other downloads |
| Download the style sheet | The HTML file | Yes, alongside the images |
| Display the finished page | All of the downloads | No: it must wait until the others have finished |