RT Reading Group Meeting RT Reading Group Meeting 06/27/2002 06/27/2002
Veljko KrunicVeljko Krunic
AgendaAgenda
IntroductionIntroduction Motivation of systemMotivation of system System componentsSystem components
– GryphonGryphon– RT-PCIP and EPART-PCIP and EPA– DQMDQM
Real-Time and OOReal-Time and OO Q&AQ&A
IntroductionIntroduction
Motivation for presenting this papersMotivation for presenting this papers– To understand integrated systemTo understand integrated system– To understand components on high levelTo understand components on high level
PapersPapers– Are survey of all individual workAre survey of all individual work– Present “Big picture”Present “Big picture”
This presentation is continuation of Sam’s This presentation is continuation of Sam’s presentationpresentation
Discussion of OO in context of Real TimeDiscussion of OO in context of Real Time
Motivation Motivation
Multiperson distributed virtual environmentMultiperson distributed virtual environment– Supports multiperson communicationSupports multiperson communication– Plus domain specific toolsPlus domain specific tools
World consists ofWorld consists of– ObjectsObjects– AvatarsAvatars
Form of telepresenceForm of telepresence
Motivation (Cont)Motivation (Cont)
Presents challengesPresents challenges– Graphics rendering Graphics rendering
– Continues mediaContinues media
– Distributed objectsDistributed objects
– Movement of large amount of dataMovement of large amount of data
– ApplicationsApplications
– Thread schedulability and resource managementThread schedulability and resource management
– Dynamic negotiationsDynamic negotiations
Integrates all previous work of all team membersIntegrates all previous work of all team members
GryphonGryphon
Distributed object managerDistributed object manager– Caching Caching – Cache coherenceCache coherence– Works in cooperation with applicationsWorks in cooperation with applications
Object typesObject types– Private-localPrivate-local– Shared-localShared-local– Shared-nonlocalShared-nonlocal– GlobalGlobal
Object LocationObject Location
Constrained by access timesConstrained by access times Caching policy Caching policy
– Refreshment frequencyRefreshment frequency– Bandwidth requirementsBandwidth requirements
Known best by applicationKnown best by application Application negotiatesApplication negotiates
– Consistency update policyConsistency update policy– Object locationObject location
Gryphon and CORBAGryphon and CORBA
CORBACORBA– Distributed object access & RPCDistributed object access & RPC– Parameter marshalling Parameter marshalling – ORB implements coordinationORB implements coordination
Gryphon compared toGryphon compared to– Centralized object managerCentralized object manager– ORB centralized CORBAORB centralized CORBA– ORB distributed CORBAORB distributed CORBA
Gryphon provides significant improvementsGryphon provides significant improvements
RT-PCIPRT-PCIP
Device-to-device pipeline architectureDevice-to-device pipeline architecture– Standardized source and sinkStandardized source and sink
– Filters could be insertedFilters could be inserted
EPA EPA – Dynamic priority computation in overloaded systemDynamic priority computation in overloaded system
EPA is based on DM testsEPA is based on DM tests– Uses expected time with probability distributionUses expected time with probability distribution
– WCET is statistical problem hereWCET is statistical problem here
Dynamic QoS ManagerDynamic QoS Manager
Framework for QoS guarantees among processesFramework for QoS guarantees among processes Process info are based on triplesProcess info are based on triples
– Execution levelExecution level
– ResourceResource
– BenefitBenefit
PlusPlus– Maximum benefitMaximum benefit
– Maximum CPU usageMaximum CPU usage
– Number of execution levelsNumber of execution levels
Resource Allocation PoliciesResource Allocation Policies
DistributedDistributed– Missing deadline changes execution level of Missing deadline changes execution level of
that processthat process FairFair
– Missing deadline reduces level of application Missing deadline reduces level of application using most of CPU (even) or that has lowest using most of CPU (even) or that has lowest benefit/CPU ratio (proportional)benefit/CPU ratio (proportional)
Resource Allocation PoliciesResource Allocation Policies
DistributedDistributed– Missing deadline changes execution level of Missing deadline changes execution level of
that processthat process FairFair
– Missing deadline reduces level ofMissing deadline reduces level of» Application using most of CPU (even)Application using most of CPU (even)
» Application that has lowest benefit/CPU ratio Application that has lowest benefit/CPU ratio (proportional)(proportional)
Resource Allocation Policies Resource Allocation Policies (Cont)(Cont)
OptimalOptimal– Maximize overall user benefitMaximize overall user benefit– Good for initial allocationsGood for initial allocations– Causes a lot of fluctuationCauses a lot of fluctuation– Artificial parameter added to tame fluctuationsArtificial parameter added to tame fluctuations
HybridHybrid– Optimal for initial allocationsOptimal for initial allocations– Different algorithms from that point onDifferent algorithms from that point on
DQM LimitationsDQM Limitations
User space implementationUser space implementation– Based on cooperation from applicationsBased on cooperation from applications– Could not control rogue applicationsCould not control rogue applications
What if application estimates are wrongWhat if application estimates are wrong– Fluctuations and resonanceFluctuations and resonance
Requires dynamic refinementRequires dynamic refinement– Based on weight factorBased on weight factor– What about more complicated models of load?What about more complicated models of load?
OO and Hard Real TimeOO and Hard Real Time
Subject of personal interestSubject of personal interest Discussion of OODiscussion of OO
– Design by contractDesign by contract– Preconditions, postconditions and invariancePreconditions, postconditions and invariance– Combination with Hard Real TimeCombination with Hard Real Time
Based on some discussions and article in Based on some discussions and article in DDJDDJ
Design by ContractDesign by Contract
OO technique invented by Bertrand MeyerOO technique invented by Bertrand Meyer EiffelEiffel Each method operates with guaranteesEach method operates with guarantees
– Precondition – this must be guranteed before I Precondition – this must be guranteed before I am calledam called
– Postcondition – if preconditions are met, this is Postcondition – if preconditions are met, this is my guaranteemy guarantee
– Invariance – object of this class always has thisInvariance – object of this class always has this
Design by Contract (Cont)Design by Contract (Cont)
Example: y = sqrt(x)Example: y = sqrt(x)– Precondition x > 0Precondition x > 0– Postcondition: x == y*yPostcondition: x == y*y
Exception is thrown if precondition or Exception is thrown if precondition or postcondition is violatedpostcondition is violated
Design by Contract and RTDesign by Contract and RT
Based on the article in DDJBased on the article in DDJ Extend preconditions and postcondition on Extend preconditions and postcondition on
timingstimings Automatic watchdog per threadAutomatic watchdog per thread Could be done in C/C++Could be done in C/C++ Similar work done by AdamSimilar work done by Adam Limited timer resolution unless on scheduler levelLimited timer resolution unless on scheduler level
– Testing paradigm, not RT conceptTesting paradigm, not RT concept– Are there benefits in allowing thread to address Are there benefits in allowing thread to address
exception in its context?exception in its context?
Some Techniques for Some Techniques for MultiprogrammingMultiprogramming
Quick summaryQuick summary Presentation I made in the JD EdwardsPresentation I made in the JD Edwards
SummarySummary
High level system descriptionHigh level system description Summary of individual worksSummary of individual works Some OO and distributed programming mixSome OO and distributed programming mix
Q&AQ&A