译文实时数据库在嵌入式系统上的应用

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

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

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

资源描述

Real-timeDatabasesforEmbeddedSystemsIntroductionReal-timesystemsarenowusedinmanyapplicationdomains,includingnetworkinfrastructure,telecommunicationsandfinancialmarkets.Asreal-timesystemscontinuetoevolve,theirapplicationsbecomemorecomplex,andoftenrequiretimelyaccessto,andprocessingof,massiveamountsofdata.Atthestartofareal-timesystemdevelopmentproject,itisoftenassumedthatafastenoughdataprocessingengine,createdspecificallyforthesystemandtightlyintegratedwithitscode,willmeetreal-timerequirements.However,oftentheapplication’sinputdatamustbecorrelated,merged,orcomparedacrossalldataobjectsandacrosstime,forfilteringoranalysis.Inaddition,thedatamustbesharedbyconcurrenttasksthathavedifferentfunctions,timerequirementsanddegreesofimportance.Theseissuesarebetteraddressedbyaprovendatabasemanagementsystem(DBMS).Asaresult,real-timesystemsincreasinglyfeatureacommercial,off-theshelfDBMSasapartofthearchitecture,tosimplifydesign,streamlinedevelopmentandimproveperformance.Real-timevs.TraditionalDatabasesLiketraditionaldatabasesystems,real-timedatabasesystems(RTDBSs)serveasrepositoriesfordataandrovideefficientstorage,retrievalandmanipulationofdata.Themaindifferencesbetweenconventionalandreal-timedatabaseslieintemporalrequirementsofthemanageddata,timingconstraintsontransactions,andperformancegoals.Temporalconsistencyofdatarequirestheactualstateoftheexternalworldandthestaterepresentedinthedatabasetobecloseenoughtoremainwithinthelimitsoftheapplication.Themostcommonperformancemetricofalldatabases—whetherreal-timeornot—istransactionresponsetime.Fortraditionaldatabasesystemsthischaracteristicboilsdowntothenumberoftransactionspertimeunit;thismeasurementisusedheavilyinoptimizingaverageresponsetimefor“traditional”(not-real-time)applications.ForRTDBS,ontheotherhand,thetypicalmetricisthenumberoftransactionsthatviolatetimingconstraints(misstheirdeadline).Butevenwithinreal-time2systems,tolerancefortimingconstraintviolationsvaries.Thecostofmissedtransactiondeadlinesrangesfromadiminishingvaluereturn,tozerovalueformissedtransactions,tonegativevaluetoincreasinglynegativevalue.Thisdecreasingvalueoftencorrelatestodata’ssusceptibilitytoaging.Forexample,thevalueofthelastknownlocationofobjects(e.g.aircraftonaradarscreen)diminisheswithtime,andaftersomesmalltimeintervalbecomesirrelevantoruseless.Oneofthemostimportantdifferencesbetweenthedatabasesusedbyreal-timeandnon-real-timesystemsisthatwhiletheconventionalDBMSaimstoachievegoodthroughputoraverageresponsetime,thereal-timeDBMSmustprovideapredictableresponsetimetoguaranteethecompletionoftime-criticaltransactions.Therefore,thedesignofareal-timedatabasesubsystemshouldavoidusingcomponentsthatintroduceunpredictablelatencies,suchasdiskI/Ooperations,messagepassingorgarbagecollection.Thusreal-timedatabasestendtobedesignedasin-memorydatabasesystems.In-memorydatabasesforegodiskI/Oentirely,andtheirsimplifieddesign(comparedtoconventionaldatabases)minimizesmessagepassing.Thevalidityofthereal-timedatainthedatabasemayalsobecompromisedifitcannotbeupdatedfastenoughtoreflectreal-worldevents.Toavoidthis,thebestsolutionhasbeenafullytime-cognizanttransactionmanager.Attheveryleast,thedatabasedesignshouldprovidesomemeansoftransactionprioritization.HardReal-timevs.SoftReal-timeManyreal-timesystems,suchasnuclearpowerplantsandfly-by-wirevehicles,cannottolerateanymisseddeadlinesforcriticaltransactions.Thesearecommonlycalledhardreal-timesystems.Theresponsetimerequirementsofhardreal-timetransactionsaresuchthatafailuretoexecutebythedeadlinecouldresultincatastrophicconsequences.Butthemajorityofreal-timesystemsandtheirdatabasesfallintothesoftreal-timecategory,whereviolationoftimingconstraintsresultsindegradedquality,butistosomedegreetolerable.ManyfactorsmakeithardtobuildRTDBSs—andlimittheapplicabilityofcommercial,off-the-shelfRTDBSalmostexclusivelytothesoftreal-time3domain.Duetothecriticalnatureofcertainapplicationdomains(spacecraftcontrolsystems,forinstance),wholesystemdesigns,includingRTDBSs,arecustommadewithsparecapacity.Inahardreal-timesystem,designersoftenusecustomalgorithmsandscheduleexcessiveamountsoftimeforatransaction,especiallyacriticalone,justtocoveraworst-casescenario.Thesekindsofsystemsareoftentime-drivenandtime-slicescheduled(incontrasttosoftreal-timesystems,whichareoftenevent-drivenandpriorityscheduled).Virtuallyallcommercialdatabaseconcurrencycontrolapproacheshavebeendesignedtooptimizeaverage-caseperformanceratherthanworst-caselatency.Adaptingthesetechniquesforhard-realtimeisusuallyimpossible.However,inthesoftreal-timedatabasearena,thepastseveralyearshaveseenunprecedentedcommercialavailability,andsubstantialinnovation.Complexsoftreal-timesystemsneeddatabasestosupportconcurrentdataaccessandprovidewell-definedinterfacesbetweensoftwaremodules,whilesupportinglevelsofperformanceandpredictabilitylackingintraditionaldatabases.InthisarticleweconcentrateonsoftRTDBSthatarebasedonoff-theshelfhardwareandotherelements.Wewillanalyzesomecommonreal-timesystemsattributesandusagescenarios,andexaminehowthemoderncommerciallyavailableRTDB

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

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

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

×
保存成功