How to determine if it is possible to stagger processes using the EDF (Earliest Deadline First) algorithm?

-1

Well, my teacher asked me to do a IN C LANGUAGE algorithm that gets a N value which is the number of processes to evaluate. Next it gets N pairs of values, each pair in a row. Each line will have a C value and another P value, representing the computational cost, and the period of each process.

Example input:

2
3 5
2 5

Example Output

OK

For the entries, the program should print OK , if it is possible to scale through the EDF algorithm, or FAIL if it is not possible to perform the scheduling through the algorithm EDF.

The problem is, I'm not understanding how the EDF algorithm works. Could someone explain to me how to solve this problem?

    
asked by anonymous 02.08.2018 / 04:32

1 answer

0

Well, they say that if a set of tasks with processing time and computational cost is not staggered by the EDF algorithm, it will not be staged by any other algorithm, as this is the best one that is in operation until now.

Answering my own question for those who have the same doubt.

Given a set of tasks with their computational cost and processing time , scaling can only be performed if the sum of all cost pairs and time , where the sum of cost divided by time is < = 1.0 !!

Reminding you to remove the repeated pairs.

    
11.08.2018 / 16:40