HOMANN SOFTWARE · JAVA & SPRING LEARNING LAB

Concurrency and parallelism, one slot at a time

The same two tasks need six work units each. All three panels share a clock. There is no I/O waiting in this model; it isolates scheduling and CPU execution.

A: 6 work unitsB: 6 work unitsOutline = most recently executed slot
0 / 12

1. Sequential · one core

Finish all of A, then start B.

2. Concurrent · one core

Alternate between unfinished A and B. One work unit executes per slot.

3. Concurrent and parallel · two cores

Execute A and B at the same time. Two work units can execute per slot.

Observe slot 6: sequential execution has finished A; interleaving has finished half of each task; two-core execution has finished both. At slot 12 all three have completed the same total work.