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

Asked

Viewed 65 times

-1

Well, my teacher asked me to do an algorithm IN C-LANGUAGE that receives a value N which is the number of processes to be evaluated. Then it receives N pairs of values, each pair in a row. Each row will have a value C and other value P, representing the computational cost, and the period of each process.

Input example:

2
3 5
2 5

Example of Saida

OK

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

The problem is, I don’t understand how the EDF algorithm works. Could someone explain to me how to solve this problem ?

  • What is your question? What have you tried? What do these costs and periods mean? Is there an example you can provide that will return the failure?

1 answer

0


Well, they say that if a set of tasks with processing time and computational cost is not scaled by the algorithm EDF will not be scaled by any other algorithm, as this is the best that is in operation so far.

Answering my own question to others who have that same doubt.

Given a set of tasks with their respective computational cost and processing time it will only be possible to perform the staging if, the sum of all pairs of cost and time, where the sum of cost divided by time is <= 1.0 !!

Remembering that you should remove the repeated pairs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.