Yosinori Watanabe

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

SynthesisofEmbeddedSoftwareforReactiveSystemsRobertClariso1JordiCortadella1AlexKondratyev2LucianoLavagno3ClaudioPasserone3YosinoriWatanabe21UniversitatPolitecnicadeCatalunya,Barcelona,Spain2CadenceBerkeleyLabs,Berkeley,USA3PolitecnicodiTorino,Torino,ItalyFromthehandoutsoftheSecondInternationalWorkshoponIntegrationofSpecicationTechniquesforApplicationsinEngineering(INT’02)Abstract:Embeddedsystemsareusuallydeployedinenvi-ronmentswithtighttimingconstraints.Increasingrun-timeperformanceisoftenacriticalissue.Thispaperaddressestheproblemofsynthesizingecientsoftwareforembeddedsystemsspeciedasasetofcommunicicatingsequentialpro-cesses.TheQuasi-StaticSchedulingalgorithmispresented,alongwithresultsfromanindustrialexample.Openprob-lemsinthiseld,suchasincorporatingdata-owanalysisintotheschedulingalgorithm,arediscussed.1Introduction1.1EmbeddedsystemsEmbeddedsystemsaredrivingresearchfromtheelectroniccommunityduetotheirwidespreaduse.Inourdailyroundweinteractwithmultipleem-beddedsystems:aVCR,acellularphone,anelectronicorganizer,adigitalcamera,etc.Thedesignofsuchdevicesrequiresamultidisciplinarknowl-edgeofsoftwareandhardwaresystems.Italsorequiresapreciseknowledgeofhowthesysteminteractswiththeenvironment.Moreformally,anembeddedsystemisaspecializedcomputationunitthatperformsasetoftaskswithinalargersystemcalledenvironment.Theinteractionwiththeenvironmentistypicallyreactive,i.e.theembeddedsystemmustprocessinputsfromtheenvironmentundersometimingcon-straintssuchasthespeed(throughput)orthedelay(latency).ThisworkhasbeenpartiallyfundedbyCICYT98-0410andbyagrantfromCadenceDesignSystemsAsembeddedsystemsarehighlyconcurrentbynature,specicationsoftenemployformalmodels[6,5]thatexposeparallelismexplicitly.Someexamplesofformalmodelsaredataownetworks[15],PetriNetbasedmod-els[7],CommunicatingSequentialProcesses[13]andKahnprocessnetworks[14].Theimplementationofthesespecicationsisgenerallyasoftwarecom-ponentrunningontopofahardwarearchitecturethatmightincludesev-eralCPUs,DSPs,co-processors,andsoon.Thesynthesisofthissoftware-hardwaremixedimplementationdenesthreeproblems:(a)amappingfromelementsofthespecicationtohardwareandsoftwarecomponents,(b)anal-locationofsoftwarecomponentstohardwarecomputationunits(e.g.CPUs)oftheembeddedsystem,and(c)aschedulingofthesoftwarecomponentsineachofthehardwarecomputationunits.Technologymappingandallocationaredependentonseveralfactors,includingcostandtechnologyconstraints.However,theremainingschedulingproblemallowsaformalapproachasitisonlydependentontheconstraintsdictatedbytheenvironment.1.2SchedulingofreactivesystemsInthecaseofreactivesystems,theschedulingproblemissubjecttotimingconstraintsontheresponsetotheinputsfromtheenvironment.Minimizingrun-timeoftheinputprocessing,ifpossible,andminimizingidleCPUtimewillthemainconcernsoftheschedulingalgorithm.Theformerisamatterofchoosingthebestalgorithmandusinganoptimizingcompiler.ButthelattercanbeimprovedbyreducingtheCPUtimespentbytheoperatingsystem.Onepossibleschedulingapproachcouldbedynamicscheduling:wegen-erateoneprocessforeachfunctionalprocessinourspecication,lettingtheoperatingsystemdecidewhichprocessshouldbeexecutedatrun-time.Theproblemwithdynamicschedulingisthattaskcontextswitchingcausesarun-timeoverhead,whichcanbeunacceptableinsomeenvironments.Therefore,althoughdynamicschedulingisusedwidespreadininteractivesystems,itisnotappropiateforreactivesystems.Staticschedulingtechniquestrytomakemostdecisionsaboutexecutionorderatcompile-time,thusreducingthetimeconsumedbytheoperat-ingsystemduringrun-time.Thesealgorithmsrequirethatsomeinforma-tionabouttherateofarrivalsofinputsfromtheenvironmentisknownatcompile-time.Eventhen,completelystaticschedulesareonlypossibleifwerestrictourselvestospecicationswithoutdata-dependentchoices.Real-timeembeddedsystems,whereafailuretosatisfyadeadlinecanleadtoaseriousfailure,cancopewiththisrestrictions.Butgenericembeddedsys-temswouldbeverylimitedwithoutdata-dependentconstructs.Theprob-lemofndingpartialschedulesinaconcurrentsystemwithdatadependentconstructsensuringthattherewillnotbebueroverowisknownasQuasiStaticScheduling(QSS).ThispaperpresentstheQSSproblemandastaticmethodtosynthesizeasetoftasksforaconcurrentsystemthatprovidebetterrun-timeperfor-mancethatasetofprocesseswithrun-timescheduling.Therestofsec-tionsareorganizedasfollows.Section2providestheoreticbackgroundandnecessarydenitionsfromthePNdomain.Section3containsahigh-leveldescriptionofthealgorithm,andsection4presentssomeresultsobtainedfromanindustrialexample.Section5describesrelevantopenproblemsthatwillprobablyleadtofutureresearchonthearea.1.3AmotivatingexampleFigure1showsanexampleofembeddedsystemthatcontrolstheenviron-mentalconditionsinaroomofalibrary.Thebooksintheroomcanbedamagedbyahighhumidityoraquickriseintemperature.Twosensorsinthesystemmonitorthetemperatureandhumidityintheroom;thesystemcanreactbyactivatingairconditioningoradryer.Finally,ifthetemper-aturebecomestoohigh,thesystemassumesthatthereisareandraisesanalarm.Thesystemisdividedinthreeprocesses.Twoprocesses,namelytheTEMP

1 / 19
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功