Question: 2 . Task SchedulingImplement a prototype service for resource estimation.Given a set of n tasks, the ith ( 0 i < n ) task runs

2. Task SchedulingImplement a prototype service for resource estimation.Given a set of n tasks, the ith (0 i < n) task runs from time startli] through end[i].Implement a task scheduler method that finds the minimum number of machines required to complete the tasks. A task can be scheduled on exactly one machine, and one machine can run only one task at a time.ExampleSuppose n=5, start =[1,8,3,9,61, end =[7,9,6,14,71.Consider the following task schedule. Times in parentheses are the inclusive start and end times for each job. Machine 1: [(1,7),(8,9)] Machine 2: [3,6),(9,14)] Machine 3: [(6,7)]Here, the number of machines required is 3.Function DescriptionComplete the function getMinMachines in the editor below.getMinMachines has the following parameters:int start[n]: the start times of tasks int end[n]: the end times of tasksReturnsint: the minimum number of machines required to run all the tasks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!