Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the schedule procedure of the scheduling algorithm with deadlines ( Algorithm 4 . 4 ) . Let d be the maximum deadline among the

Consider the schedule procedure of the scheduling algorithm with deadlines (Algorithm 4.4). Let d be the maximum deadline among the 7 tasks. Modify the algorithm to schedule the tasks as late as possible without exceeding their deadlines.
First, initialize disjoint sets for integers from 0 to d+1. Let Small(S) represent the smallest member in the set S. When scheduling a task, find the set S that includes the smallest deadline and the task itself. If Small(S)=0, remove the task. Otherwise, schedule the task at time Small(S) and combine sets S and the set that includes Small(S)-1.
Assuming the use of the disjoint set data structure described in Appendix C, show that this algorithm has a time complexity of O(mlgm), where m is the minimum of d and n.
(Agorithm 4.4) void schedule(int n, constint deadline|],eqsuence_of _integer& J)
{
index i;
sequence_of_integer ;K
J =[1] ;
for (i=2; i <= n, i++){
K = J and add i in increasing order of deadline[i];
if (K is feasible)
J = K;
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4. How do you learn best?

Answered: 1 week ago

Question

this in excel

Answered: 1 week ago

Question

7. Define cultural space.

Answered: 1 week ago

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago