22.8k views
25 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

1 Answer

12 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 Okera
by
8.3k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.