10.07.2015 Views

CprE 458/558: Real-Time Systems - Iowa State University

CprE 458/558: Real-Time Systems - Iowa State University

CprE 458/558: Real-Time Systems - Iowa State University

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>: <strong>Real</strong>-<strong>Time</strong> <strong>Systems</strong>Lecture 18Imprecise Computations<strong>CprE</strong> 545<strong>Iowa</strong> <strong>State</strong> <strong>University</strong>


Imprecise Computational ModelA way to avoid timing faults during transient overloads anda way to introduce fault-tolerance by graceful degradationis the use of Imprecise Computation (IC) technique.The IC model provides scheduling flexibility by trading offresult quality to meet task deadlines. A task is divided intoa mandatory and an optional part.The mandatory part must be completed before the task'sdeadline for an acceptable quality of result.<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)2


Precise vs Imprecise resultsThe optional part, which can be skipped in order toconserve system resources, refines the result.A task is said to have produced a precise result if it hasexecuted its mandatory as well as optional parts before itsdeadline;otherwise it is said to have produced imprecise (i.e.,approximate) result when it executes the mandatory partalone.<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)3


Monotone vs 0/1 constraint tasksThere are two types of imprecise computational tasks,namely, monotone tasks and 0/1 constraint tasks.A task is monotone if the quality of its intermediate resultdoes not decrease as it executes longer.An imprecise task with 0/1 constraint requires the optionalpart to be either fully executed or not at all.<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)4


Applications of Imprecise ComputationsApplications are where one may prefer timely impreciseresults to late precise results.In image processing, it is often better to have frames offuzzy images in time than perfect images.In radar tracking, it is often better to have estimates oftarget locations in time than accurate location data too late.<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)5


Applications (Contd’)For example, in a tracking and control system, a transientfault may cause tracking computation to terminateprematurely and produce an approximate result. Norecovery action is needed if the result still allows thesystem to maintain a track of its targets.Similarly, as long as the approximate result produced by acontrol law computation is sufficiently accurate for thecontrolled system to remain stable, the fault that causesthe computation to terminate prematurely can be tolerated.<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)6


Error Function & Objective FunctionsMonotone task, Ti: (mi, oi, di)Mandatory comp. <strong>Time</strong> (mi), optional comp time (oi), deadline (di)Error ei = F(oi – ki)where ei: Error incurred by task Tiki: optional portion completedMinimize the total errorMinimize the number of optional tasks discardedShortest processing time first strategyMinimize the number of tardy tasks<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)7


Algo F (Min Total Error, monotone task,identical weights, optimal, O(n logn)) Treat all mandatory tasks as optional. Use ED policy to schedule all the tasks. (St) If a feasible schedule is found, precise schedule isobtained, stop. Else use ED to schedule mandatory tasks. (Sm) If feasible schedule is not found, infeasible schedule, stop. Else use Sm as a template, transform St into an optimalschedule that is feasible and minimizes the total error. (ED policy is a variation of EDF -- stops at deadline) (Example: Refer to textbook, page 118)<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)8


Scheduling to Minimize Total Error (for ICtasks with 0/1 constraints)The general problem of optimal scheduling of IC tasks with0/1 constraints is NP-complete.Optimal schedule: A schedule in which the number ofdiscarded optional tasks is minimum.Special case: Optional tasks have equal computation timeLDF algorithmSame ready timeO(n logn) complexityDFS algorithmArbitrary ready timeO(n^2) complexity<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)9


Algorithm LDFUse ED to find a schedule Sm of the mandatory tasks.If Sm is not feasible, then task set is not feasible.Else do the followingUse Sm as the template to obtain So (So: optimal schedule)Use latest deadline first fashion to adjust the scheduleDetails of the algorithm & example: Refer to pages 119-120in the book.<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)10


Scheduling periodic tasksError-cumulativeTracking and control applicationsErron-non-cumulativeImage enhancement and speech processing applications<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)11


(m,k)-firm deadline modelA periodic task is said to have an (m,k)-firm guarantee if it is adequateto meet the deadlines of m out of k consecutive instances of the task,where m


References J.W.S. Liu, K.J. Lin, W.K. Shih, A.C. Yu, J.Y.Chung, and W.Zhao, “Algorithms for scheduling imprecise computations,”IEEE Computer, vol.24, no.5, pp.58-68, May 1991.P. Ramanathan, “Graceful degradation in real-time controlapplications using (m,k)-firm guarantee,” In Proc. of Fault-Tolerant Computing Symposium, pp.132-141, 1997.<strong>CprE</strong> <strong>458</strong>/<strong>558</strong>G. Manimaran (ISU)13

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

Saved successfully!

Ooh no, something went wrong!