Answered step by step
Verified Expert Solution
Question
1 Approved Answer
There are m jobs to schedule on n processors. A schedule is balanced if the difference between the number of jobs scheduled on any two
There are m jobs to schedule on n processors. A schedule is balanced if the difference between the number of jobs scheduled on any two neighboring processors does not exceed
The kth processor is the most efficient, and thus, the maximum number of jobs should be scheduled on that processor. Find the maximum number of jobs that can be scheduled on the kth processor, such that the overall schedule remains balanced.
Note: Each processor must have at least one job scheduled
Example
Consider n m k
Explanation:
In each schedule, there are jobs across processors. k assumes based indexing.
The t schedule is not balanced because the Sth processor has job scheduled, while the th processor has jobs scheduled, their difference is which exceeds
The th schedule is not balanced because the difference between the nd and rd and between rd
rd and th processors is more than
Amongst all balanced schedules, the maximum number of jobs that can be scheduled on the rd processor is So the answer is
Example :
Explanation
Given in n m k
One optimal schedule is
so th process executes jobs maximum. so output is
Example :
Explanation
Given in n m k
One optimal schedule is
so th process executes jobs maximum. so output is
write a program in java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started