10.07.2015 Views

Real-Time Scheduling - gmitWEB

Real-Time Scheduling - gmitWEB

Real-Time Scheduling - gmitWEB

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Real</strong>-<strong>Time</strong> <strong>Scheduling</strong>• Not a trivial thing.– High priority tasks can be scheduled inisolation, but may be blocked from executionby lower priority tasks.– Blocking is unavoidable in preemptivescheduling with shared resources.• It must be bounded to identify worst case blocking.April 05 <strong>Real</strong> <strong>Time</strong> <strong>Scheduling</strong> 7<strong>Real</strong>-<strong>Time</strong> <strong>Scheduling</strong>• Key priorities– ensuring that hard tasks complete or start by theirdeadline, and that as many soft tasks also complete orstart by their deadline• not fairness and minimum average response time– most contemporary real-time systems• designed to be as responsive as possible to real-time tasks• when deadline approaches, the task is scheduled– typically require deterministic response times in therange of milliseconds to sub milliseconds.April 05 <strong>Real</strong> <strong>Time</strong> <strong>Scheduling</strong> 8<strong>Real</strong>-<strong>Time</strong> <strong>Scheduling</strong>• Various alternatives to Round Robin• Using priority driven non preemptivescheduler– real-time task is added to head of queue to runafter current– if current is a slow low priority task, time isunacceptable if it is running at a critical time.• There are better approaches:-April 05 <strong>Real</strong> <strong>Time</strong> <strong>Scheduling</strong> 9<strong>Real</strong>-<strong>Time</strong> <strong>Scheduling</strong>• Combine priority with clock based interrupts– Preemption point occurs at regular intervals, lowerpriority preempted by higher.• delays of milliseconds usually, may not be adequate for moredemanding application.• For demanding applications, use an immediatepreemptive scheduler.– OS responds to interrupt almost immediately.– Unless system is in critical code lockout sectionApril 05 <strong>Real</strong> <strong>Time</strong> <strong>Scheduling</strong> 10<strong>Real</strong>-<strong>Time</strong> <strong>Scheduling</strong>• The approach taken to scheduling dependson– 1) does the system perform a schedulabilityanalysis– 2) if it does, is it done statically or dynamically– 3) does the result of the analysis produce aschedule according to which tasks aredispatched at run time.<strong>Real</strong>-<strong>Time</strong> <strong>Scheduling</strong>• The classes of algorithm available based onthis– Static table driven– Static priority driven preemtive– Dynamic planning– Dynamic best effortApril 05 <strong>Real</strong> <strong>Time</strong> <strong>Scheduling</strong> 11April 05 <strong>Real</strong> <strong>Time</strong> <strong>Scheduling</strong> 12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!