483,178 views
39 votes
39 votes
Haji decides to change the program so that the computer can run each loop iteration in parallel. Assuming that he runs the program on a computer that can run 8 tasks in parallel, how long will the parallelized solution take

User McDonnellDean
by
2.3k points

1 Answer

8 votes
8 votes

Answer:

18 minutes

Step-by-step explanation:

Planet Duration

Jupiter 12 minutes

Saturn 9 minutes

Uranus 4 minutes

Neptune 4 minutes

Earth 1 minute

Venus 1 minute

Mars 1 minute

Mercury 1 minute

planets ← ["Mercury", "Venus", "Earth", "Mars", "Neptune", "Uranus", "Saturn", "Jupiter"]

model ← loadSolarSystem()

images ← []

FOR EACH planet IN planets {

image ← renderPlanet(model, planet)

APPEND(images, image)

}

If these are what the values and coding given, then the answer is 18 minutes

User Sharon
by
3.1k points