嵌入式主动实时数据库ARTsEDB的事务执行模型

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

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

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

资源描述

华中科技大学硕士学位论文嵌入式主动实时数据库ARTs-EDB的事务执行模型姓名:丁力申请学位级别:硕士专业:计算机软件与理论指导教师:刘云生20060511IARTs-EDBARTs-EDBARTs-EDBARTs-EDBIDARTs-EDBIIAbstractRuningunderembeddedenvironment,real-timedatabasehasgreatdifferenceontransactionprocessingfromtraditionaldatabase.Traditionaldatabasedoesn’tconsiderthetimelimitationofdataandtransaction,whoseobjectisaverageperformanceandsystemthroughout,whileactivereal-timeembeddeddatabasetriesitsbesttoassuremoretransactionscommittedbeforetheirdeadlinesonthebasisoftheirpriorities.ARTs-EDBisanembeddedactivereal-timedatabasesystemresearchedanddevelopedindependently.Havingthecharactersofflexibility,brisknessandgoodmigration,themulti-threadandmodularizedprocessstructureandtransactionexecutionmodelmeetsembeddedmicro-kernelconstruction,whichisthefoundationofthewholesystemconstruction.ThenormalflattransactionmodelisnotsatisfiedfortheneedofARTs-EDB.Soanestedtransactionmodelisbuilded.EverytransactionofARTs-EDBhaveatransactionprocessblock,whichaddressestheID,neededresourceandstatusofitandexistduringitslifecycle.Forsatisfiedtheeffectiveandtimeconstrains’ececutionoftransactions,firstofall,transactionpriorityassignmentshouldtakeintoaccounttransaction’deadline,schedulingtransactionshouldtakeintoaccounttransactionpriority.Second,inordertoloadallneededdataintomemorybeforetransactions’exectution,transactionsneedpre-analysis.Last,becausethedependoftransactions,whenabegin,commitorabortoperationoftransactionsoccur,shouldtakeactivemechanismintocount.ARTs-EDBbuildaeffectiveexecutionmodeloftransaction.First,transactionadmitingandreleasingmakessurethemaxnumbersoftransactionsinmemory,andthedatatheyneedalsoinmemory.Second,thehighestprioritytransactionexecutesfirstbytransactionscheduling.Keywords:Real-timedatabaseEexecutionmodeloftransaction,Priorityassignment,Transactionscheduling?_____?“v”111.1“”ACID1“”2“”“”34/[1](CPUI/O)21.2,1[2]“”“”“”[3]2[4]RT-S2PLRT-S2PL-RPRT-S2PL-PIDOCC-DA[5-6]DOCC-DA[7]H2PLOCC-BCEagleSpeedStarBase1EagleSpeedRTDBMSEagleSpeedReal-TimeDatabaseManagementSystemCODASYL3EagleSpeedRTDBMS123EagleSpeedEagleSpeedCODASYLEagleSpeedACIDEagleSpeedEagleSpeed[8]2StarBaseStarBase(Virginia)(firmreal-time)[9]StarBaseRT-Mach[10]StarBaseStarBase12WAIT-X(S)[11]Abort3RT-MachStarBase4RT-MachERTDBSRTDBSADBSARTs-EDBARTs-EDBSQLESQLERTDBLESQLSQLARTs-EDBCESQLERTDBLERTDBLE-C-AARTs-EDBS-A—S-AE-CERTDBLERTDBL1.3ARTs-EDBARTs-EDBARTs-EDBARTs-EDB5ARTs-EDBARTs-EDBARTs-EDBARTs-EDBARTs-EDBARTs-EDBARTs-EDB62ARTs-EDBARTs-EDB,,2.1I/O“”[12]“”I/O(ContextSwitch)CPU[13-15][16]2.1.1“”2.1DBDBM(t)tDBDBM(t)⊆DBTSDBSAT(t)tAT(t)⊆TSAT(t)TDt(T)TtDt(t)⊆DBt∀T∈AT(t)Dt(T)⊆DBM(t)DBMMDB“”,MMDBSI/O.7[17-19],I/OB+,B+MMDBCPU2.1.2[20-21]I/O“”I/O2.2ARTs-EDBARTs-EDBSQL[22]“”82.12-1ARTs-EDB1SystemInterface2DataSpec1SQLESQLART-DLCSQL2DD93E-B4T-B3ApplicationSpec.StaticPreprocessing1TT2P-B4TM1TransactionExcuting235DBRunningMgt.ARTs-EDB6QP127MMM12MMDBINDEX81SDB2Recovery9AM12310QPTMARTs-EDBAMMMDBSDBMMMINDEX“”“”ARTs-EDBARTs-EDB=DB()+TRIM()+TIMM()+MMDB()2.3ARTs-EDBARTs-EDBARTs-EDBARTs-EDB1AdministratorAdministratorAdministratorARTs-EDB“”Server2ServerServerServerServerServer113TriggerMonitorTriggerMonitorServer4TransMag.TransMag.5AdmissionAdmission6ReleaseRelease7SchedulerScheduler8ServiceServiceSchedulerARTs-EDB9.CKPT.ThreadMenuListener.ThreadCKPT.ThreadcheckpointcheckpoinMenuListener.Thread12ARTs-EDB2.22.4ARTs-EDBARTs-EDB2.2ARTS-EDBAdmissionThreadCKPT.ThreadMenuListener.ThreadUser2AdministratorUser1UsernTMG.ThreadAP1APnServiceServiceAM-ThreadsSharedGlobalArea(SGA)&SharedCodesReleaseThreadSchedulerThread13ARTs-EDB2.31.2.3.2.3ARTS-EDB144.2.5ARTs-EDB2.5.1ARTs-EDB2.4ARTs-EDB2.4ARTs-EDBClockSensorOperatiorMonitorHandlerDetectorEvaluatorEventsConstraintsSituationsTransactionTransactionPrimitiveOperationPrimitiveInterruptPrimitiveActionTM152.5.212RRARTS-EDB“”32.145start_flagLOAD_TYPELoadType0-firstload1-failureload2-dailyloadAUTO_CLOSEAutoClose0:1:MAX_CONNECT_NUMMaxConnectNumMEM_DB_SIZEMemDBSizeMAX_ACTIVE_TRAN_NUMMaxActiveTranNumMAX_ACCEPT_TRAN_NUMMaxAcceptTranNumCKPT_PERIODCheckPointPeriod2.116012checkpointredo6checkpoint72282.5.3ARTs-EDB1ESQLESQL2ESQLESQL3ESQL121734BeginCommitAbort2.5.412.3.4.5.6.7.8.9.110.2.6ARTs-EDB183ARTs-EDBARTs-EDBARTs-EDB3.11.ACID“”“”“”“”[23]1[24]23[25-27]42.1——————[28-29][30-31]192[32-34]/——/——/——3.1a-cvtddeadlinee“”rreleasetrvt=0[35-37]3.13——[38]——203.21CAD2ARTs-EDB343.1TRANSACTION[39]TRANSACTION=SRtC•SS=(STEP,{STEP})STEP=SUBTRAN|OPOP=OBOPTMOPSUBTRAN=TRANSACTIONOB-OPTM-OP21•RDRCPUPRR=DRPR•tS•CDRS[40]123453.3ARTs-EDB1.1ARTs-EDB2IMMEDIATEDEFERED22SEPARETE33.2ARTs-EDBAbortAbort“**”Y(Begin/Commit/Abort)(Update/Insert/Delete)?MonitorTMManager**?Monitor?TMManagerIDTMManagerTMManagerYNNYN3.2232.1spawntransaction_nameexecute_modevoidmain{BeginT1……..spawntransaction_name[SYN/ASYN]BeginT2……EndT2……..EndT1}2SYNASYN3voidmain{TM_SendToTransMag();//ifadmission_result==124iffork()==0//{}else……..//return;}43.33.4ARTs-EDB13.325[41]12[42]3T“”t(EP)=dtEPTdTEDF()4TS=tEPTCEPtPS5626ARTs-EDBARTs-EDB[43]123ARTs-EDB21[44]ARTs-EDB272()“”“”ARTs-EDB3I/OARTs-EDB[45]4ARTs-EDBCPU()[46

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

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

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

×
保存成功