When additional workers stop helping

An image-processing batch contains NN independent, indivisible tasks. Each task takes exactly 0.80 ms on one worker. The original serial implementation executes tasks consecutively and has no additional costs.


A proposed parallel implementation uses pp identical workers and has these measured costs:

  • Before any worker starts, the main thread schedules all tasks, taking 0.05 ms per task.
  • Starting the workers takes a fixed 1.20 ms plus 0.15 ms per worker.
  • Tasks are assigned as evenly as possible by task count, and each worker executes its tasks consecutively.
  • After every worker finishes, shutting down the workers takes 0.10 ms per worker.

These phases do not overlap. Assume enough processor cores, unchanged task execution times, and no other costs. Worker counts may exceed the number of tasks, but all pp workers still incur their starting and shutdown costs.


For a batch of 10 tasks, calculate the elapsed time with four workers in milliseconds, to one decimal place. Also determine the fastest worker count among 2, 4, and 8 workers for that batch. Finally, find the smallest positive integer NN for which eight workers are strictly faster than the original serial implementation. Enter worker and task counts as exact integers.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Parallel Programming Questions: