Skip to main content
AP CSP course

C57 · Topic 4.3 · 40 minutes · CSN-2.A, CSN-2.B

Schedule independent work

By the end you can:

  • Construct an explicit schedule for independent tasks.
  • Compute finishing time from worker loads and overhead.
  • Calculate speedup for equivalent work.

Before this lesson: topics 3.17, 4.1.

Sequential
Tasks run one after another.
Parallel
Multiple processing units perform work at the same time.
Distributed
Multiple networked computing devices work on parts of a task.
Speedup
Sequential time divided by the parallel time for the same task under stated assumptions.

Understand

Sequential computing processes work one step after another. Parallel computing uses multiple processors simultaneously. Distributed computing uses multiple networked devices; a system can be both distributed and parallel. Sending data, coordinating workers and dependencies add costs.

For independent indivisible tasks with known durations, sequential time is their sum. Given a fixed assignment to parallel workers, completion time is the largest worker load, plus any stated overhead. Use an explicit schedule instead of simply dividing total time by the worker count.

Worked example

Independent tasksA 6,B 4,C 3,D 3 seconds; two identical workers, no overhead, tasks indivisible.

  1. Sequential time 6+4+3+3=16 seconds.
  2. Schedule 1:worker 1 A+B=10;worker 2 C+D=6;finish 10.
  3. Schedule 2:worker 1 A=6;worker 2 B+C+D=10;also 10.
  4. A better schedule:worker 1 A+C=9;worker 2 B+D=7;finish 9. It is optimal: a finish 8 would require a subset summing 8, which these tasks cannot form.

Explore each concept

Choose a concept, change its inputs and follow the explanation. Each example models the stated rule or scenario; completing it is practice rather than evidence of mastery.

  • Sequential, parallel and distributed
  • Unavoidable serial portion
  • Communication overhead and capacity
Open this example on its own

Change it · step through · explain

Change an input, predict what will happen, then advance one step. Read why the state changes, reset and experiment. This fixed teaching model does not save progress or award XP.

Ready · Make a prediction

Ready to explore: Serial work limits parallel speedup
  1. Serial seconds (0–100)4Waiting
  2. Divisible parallel-work seconds (0–100)12Waiting
  3. Workers (1–8)4Waiting
  4. Communication overhead seconds (0–10)0Waiting

Ready to explore: Serial work limits parallel speedup

Why: Change an input, predict the first effect, then advance one step.

Try this: Change one input or choose another listed case. Predict the effect, reset and compare the states and governing rule.

Step through and experiment

Change it · step through · explain

Change an input, predict what will happen, then advance one step. Read why the state changes, reset and experiment. This fixed teaching model does not save progress or award XP.

Ready · Make a prediction

Ready to experiment
  1. Input 16,4,3,3Waiting
  2. Input 20,1,0,1Waiting
  3. Input 30Waiting

Ready to experiment

Why: Predict the first change, then advance one step.

Try this: Put every task on one worker, then balance the loads and add overhead.

Check a misconception

Claim: Two processors always halve runtime.

Task sizes, indivisibility, dependencies and coordination can prevent equal loads and ideal speedup.

Guided practice

Schedule tasks[5,5,2,2]on two workers with no overhead to minimize finishing time. Show loads.

Work with a partner. Make a prediction, compare your reasoning, then identify the rule that supports your answer.

Independent transfer

For tasks[6,4,3,3] and schedule loads 9 and 7, compute speedup relative to sequential 16. What if total overhead 2 seconds is added after the work?

Exit check

Why must a speedup comparison use the same task and equivalent results?

Write your reasoning before comparing with a classmate. If your teacher assigned this task, submit it through My classes to save your work and receive feedback.

Check yourself

  1. Question 1 of 2Two workers have assigned loads 8 and 5 seconds. Overhead is 2 seconds after both finish. What is total time?

    Select one answer.

  2. Question 2 of 2Which TWO factors can limit speedup?

    Select exactly two answers (0 of 2 selected).

Your practice so far

Check an answer to see its rationale.

Teacher guidance and scoring