Lecrpc优质PPT.ppt
- 文档编号:14314562
- 上传时间:2022-10-22
- 格式:PPT
- 页数:23
- 大小:106.50KB
Lecrpc优质PPT.ppt
《Lecrpc优质PPT.ppt》由会员分享,可在线阅读,更多相关《Lecrpc优质PPT.ppt(23页珍藏版)》请在冰豆网上搜索。
dispatchesrequesttothecorrectprocessStubs,Spring2002,CS461,4,BulkTransfer(BLAST),UnlikeAALandIP,triestorecoverfromlostfragmentsStrategyselectiveretransmissionakapartialacknowledgements,Spring2002,CS461,5,BLASTDetails,Sender:
aftersendingallfragments,settimerDONEifreceiveSRR,sendmissingfragmentsandresetDONEiftimerDONEexpires,freefragments,Spring2002,CS461,6,BLASTDetails(cont),Receiver:
whenfirstfragmentsarrives,settimerLAST_FRAGwhenallfragmentspresent,reassembleandpassupfourexceptionalconditions:
iflastfragmentarrivesbutmessagenotcompletesendSRRandsettimerRETRYiftimerLAST_FRAGexpiressendSRRandsettimerRETRYiftimerRETRYexpiresforfirstorsecondtimesendSRRandsettimerRETRYiftimerRETRYexpiresathirdtimegiveupandfreepartialmessage,Spring2002,CS461,7,BLASTHeaderFormat,MIDmustprotectagainstwraparoundTYPE=DATAorSRRNumFragsindicatesnumberoffragmentsFragMaskdistinguishesamongfragmentsifType=DATA,identifiesthisfragmentifType=SRR,identifiesmissingfragments,Spring2002,CS461,8,Request/Reply(CHAN),GuaranteesmessagedeliverySynchronizesclientwithserverSupportsat-most-oncesemanticsSimplecaseImplicitAcks,Spring2002,CS461,9,CHANDetails,Lostmessage(request,reply,orACK)setRETRANSMITtimerusemessageid(MID)fieldtodistinguishSlow(longrunning)serverclientperiodicallysends“areyoualive”probe,orserverperiodicallysends“Imalive”noticeWanttosupportmultipleoutstandingcallsusechannelid(CID)fieldtodistinguishMachinescrashandrebootusebootid(BID)fieldtodistinguish,Spring2002,CS461,10,CHANHeaderFormat,typedefstructu_shortType;
/*REQ,REP,ACK,PROBE*/u_shortCID;
/*uniquechannelid*/intMID;
/*uniquemessageid*/intBID;
/*uniquebootid*/intLength;
/*lengthofmessage*/intProtNum;
/*high-levelprotocol*/ChanHdr;
typedefstructu_chartype;
/*CLIENTorSERVER*/u_charstatus;
/*BUSYorIDLE*/intretries;
/*numberofretries*/inttimeout;
/*timeoutvalue*/XkReturnret_val;
/*returnvalue*/Msg*request;
/*requestmessage*/Msg*reply;
/*replymessage*/Semaphorereply_sem;
/*clientsemaphore*/intmid;
/*messageid*/intbid;
/*bootid*/ChanState;
Spring2002,CS461,11,SynchronousvsAsynchronousProtocols,Asynchronousinterfacesend(Protocolllp,Msg*message)deliver(Protocolllp,Msg*message)Synchronousinterfacecall(Protocolllp,Msg*request,Msg*reply)upcall(Protocolhlp,Msg*request,Msg*reply)CHANisahybridprotocolsynchronousfromabove:
callasynchronousfrombelow:
deliver,Spring2002,CS461,12,Dispatcher(SELECT),DispatchtoappropriateprocedureSynchronouscounterparttoUDPImplementconcurrency(openmultipleCHANs),AddressSpaceforProceduresflat:
uniqueidforeachpossibleprocedurehierarchical:
program+procedurenumber,Caller,(client),SELECT,CHAN,call,call,Callee,(server),SELECT,CHAN,upcall,upcall,deliver,send,deliver,send,Spring2002,CS461,13,SimpleRPCStack,Spring2002,CS461,14,SunRPC,IPimplementsBLAST-equivalentexceptnoselectiveretransmitSunRPCimplementsCHAN-equivalentexceptnotat-most-onceUDP+SunRPCimplementSELECT-equivalentUDPdispatchestoprogram(portsboundtoprograms)SunRPCdispatchestoprocedurewithinprogram,Spring2002,CS461,15,SunRPCHeaderFormat,XID(transactionid)issimilartoCHANsMIDServerdoesnotrememberlastXIDitservicedProblemifclientretransmitsrequestwhilereplyisintransit,Spring2002,CS461,16,PresentationFormatting,Marshalling(encoding)applicationdataintomessagesUnmarshalling(decoding)messagesintoapplicationdataDatatypesweconsiderintegersfloatsstringsarraysstructs,Typesofdatawedonotconsiderimagesvideomultimediadocuments,Spring2002,CS461,17,Difficulties,Representationofbasetypesfloatingpoint:
IEEE754versusnon-standardinteger:
big-endianversuslittle-endian(e.g.,34,677,374)Compilerlayoutofstructures,Spring2002,CS461,18,Taxonomy,Datatypesbasetypes(e.g.,ints,floats);
mustconvertflattypes(e.g.,structures,arrays);
mustpackcomplextypes(e.g.,pointers);
mustlinearizeConversionStrategycanonicalintermediateformreceiver-makes-right(anNxNsolution),Spring2002,CS461,19,Taxonomy(cont),TaggedversusuntaggeddataStubscompiledinterpreted,Spring2002,CS461,20,eXternalDataRepresentation(XDR),DefinedbySunforusewithSunRPCCtypesystem(withoutfunctionpointers)CanonicalintermediateformUntagged(exceptarraylength)Compiledstubs,Spring2002,CS461,21,#defineMAXNAME256;
#defineMAXLIST100;
structitemintcount;
charnameMAXNAME;
intlistMAXLIST;
bool_txdr_item(XDR*xdrs,structitem*ptr)return(xdr_int(xdrs,Spring2002,CS461,22,AbstractSyntaxNotationOne(ASN-1),AnISOstandardEssentiallytheCtypesystemCanonicalintermediateformTaggedCo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Lecrpc
![提示](https://static.bdocx.com/images/bang_tan.gif)