Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] How to handle Missed Deadline Jobs

Status
Not open for further replies.

TuAtAu

Advanced Member level 4
Full Member level 1
Joined
May 22, 2011
Messages
119
Helped
9
Reputation
18
Reaction score
9
Trophy points
1,298
Location
Jupiital
Activity points
2,149
Hi,

I am learning the REAL TIME OS currently.

While I am studying the Rate-Monotonic Algorithm, I realize some problem.

What if the JOB is missed the deadline, does the scheduler continue to schedule it after the JOB's deadline?

Example, a Job A deadline at time 5, and execution time is 3, and it's turn is at time 4.

Means, time
0 ----> 4 execute other job
4 -> 5 execute Job A (3 execution time)

BUT JOB A's deadline at time 5! execution will complete at time 7!!

If the algorithm is preemptive, does the scheduler will preempt to other JOB x and destroy the JOB A at time 5[deadline]? or at time 7[finish execute]?
 

It won't (shouldn't) destroy the job. It will either continue to run, or the OS will pre-empt if the waiting job has a higher priority
(and then later continue to run the job that was pre-empted).
Rate monotonic isn't perfect. Scheduling algorithms have their strengths and weaknesses.
In fact, without a lot of apriori knowledge concerned with the tasks that are to be run, you can't even
pick the ideal algorithm.
By the way, even when people say a particular algorithm is implemented, the implementation
may have variations to the textbook definition, to make it easier to implement for example, or for
other reasons. So, you can have 'flavors' of particular algorithms. For example, some algorithms (I'm not
talking about rate monotonic) may not immediately pre-empt, but will rather allow a lower pri task
to run for a bit longer, even though a high pri task is now ready to run - sometimes the slightly extra time
allowed for a process can help in situations where the lower pri may never get a chance to complete
otherwise, and in fact may be causing the high pri one trouble, if the lower pri one is using a resource.
In that case, sometimes it is better to let the low pri task finish using the resource.

The best that the OS-developer can do is provide sufficient features in the OS, and to provide enough information to
the developer so that they can make best use of the algorithm(s) that are implemented.
 
  • Like
Reactions: TuAtAu

    TuAtAu

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top