Question: 37m left H ALL O 1 2 3 4 5 7 8 5. Minimum Processing Time A computing cluster has multiple processors, each with


37m left H ALL O 1 2 3 4 5 7 8 5. Minimum Processing Time A computing cluster has multiple processors, each with 4 cores. The number of tasks to handle is equal to the total number of cores in the cluster. Each task has a predicted execution time, and each processor has a specified time when its cores become available. Assuming that exactly 4 tasks are assigned to each processor and that those tasks run independently (asynchronously) on the cores of the chosen processor, what is the earliest time that all tasks can be processed. Example n = 2 processorTime=[8, 10] taskTime [2, 2, 3, 1, 8, 7, 4, 5) = One optimal solution is as follows: Assign the tasks with the execution times 2, 3, 7, and 8 to processor 0 that start at time 8. Assign the tasks with the execution times 4, 2, 5, and 1 to processor 1 that start at time 10. The first processor's cores finish at times (8+2), (8+3), (8+7), and (8+8), which are 10, 11, 15, and 16 respectively. The second processor's cores finish at times (10+4), (10+2), (10+5), and (10+1), which are 14, 12, 15, and 11 respectively. The maximum among those finishing times is 16, This is the earliest possible finish time. Function Description Complete the function minTime in the editor below. minTime has the following parameter(s): int processorTime[n]: each processor Timefi] denotes the time at which all 4 cores of the processor become available int taskTime[4*n]: each taskTime[i] denotes the 1 14 15 16 17 18 19. 20 21 22 23 24 25 26 27 28 88818 29 36 31 > import java. class Result /* Comple * The fu The fu * 1. IN * 2. IN */ public st. Colle Test Results return 32> public class S C * Complete the 'minTime' function below. * The function is expected to return an INTEGER. * The function accepts following parameters: * * 2. INTEGER_ARRAY taskTime */ 1. INTEGER_ARRAY processor Time public static int minTime (List processor Time, List taskTime) { Collections.sort (taskTime); } return 0; } > public class Solution {- I
Step by Step Solution
3.48 Rating (155 Votes )
There are 3 Steps involved in it
To find the earliest time that all tasks can be processed in a computing cluster with multiple proce... View full answer
Get step-by-step solutions from verified subject matter experts
