操作系统课件第1章_第1页
操作系统课件第1章_第2页
操作系统课件第1章_第3页
操作系统课件第1章_第4页
操作系统课件第1章_第5页
已阅读5页,还剩73页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

CopyrightXuJingdong,Allrightreserved,1,ComputerNetworksChapter1Basic,XuJingdongDept.ofComputerScienceandInformationSecurityNankaiUniversityxujd,CopyrightXuJingdong,Allrightreserved,2,Outline,whattheInternetnetworkedge:hosts,accessnet,physicalmedianetworkcore:packet/circuitswitching,Internetstructureperformance:loss,delay,throughputinpacket-switchednetworksprotocolandlayeringexample:FTPovertheInternet,CopyrightXuJingdong,Allrightreserved,3,?,WhatstheInternetinyoureye?,YourComputerConnectedtotheInternet,LocallinktotheInternet,InternetServices,CopyrightXuJingdong,Allrightreserved,4,Internet:theserviceview,World-widecommunicationinfrastructure:supportdistributedapplications,e.g.,Web,Email,FTP,VoIP,games,BT,QQ,WeChatcommunicationservicesprovidedtoapps:reliabledatadeliveryfromsourcetodestination“besteffort”(unreliable)datadeliveryclient-server(C/S)orpeer-to-peer(P2P)model,CopyrightXuJingdong,Allrightreserved,5,Internet:“nutsandbolts”view,Internet:“networkofnetworks”orinternetworkinglooselyhierarchicalpublicInternetversusprivateintranetmillionsofconnectedcomputingdevices:hosts,end-systems,runningnetworkappsPCServersMobilePhones,CopyrightXuJingdong,Allrightreserved,6,Internet:“nutsandbolts”view(cont.),routers:forwardpackets(chunks)ofdatathroughnetworkcommunicationlinksfiber,copper,radio,satelliteprotocols:controlsending,receivingofmessagese.g.,TCP,IP,HTTP,FTP,PPP,CopyrightXuJingdong,Allrightreserved,7,Internetstructure:networkofnetworks,roughlyhierarchicalnational/internationalbackboneproviders(NBPs)e.g.UUnet/WorldCom/MCI,Sprint,ATemailclient/server,peer-peermodel:minimal(orno)useofdedicatedserverse.g.Skype,BitTorrent,13,Accessnetworksandphysicalmedia,Q:Howtoconnectendsystemstoedgerouter?residentialaccessnetsinstitutionalaccessnetworks(school,company)mobileaccessnetworksKeepinmind:bandwidth(bitspersecond)ofaccessnetwork?sharedordedicated?,14,CopyrightXuJingdong,Allrightreserved,15,Residentialaccess:pointtopointaccess,Dialupviamodemupto56Kbpsdirectaccesstorouter(oftenless)Cantsurfandphoneatsametime:cantbe“alwayson”DSL:DigitalSubscriberLinedeployment:telephonecompany(typically)upto1Mbpsupstream(todaytypically256kbps)upto8Mbpsdownstream(todaytypically1Mbps)dedicatedphysicallinetotelephonecentraloffice,CopyrightXuJingdong,Allrightreserved,16,Residentialaccess:cablemodems,HFC:hybridfibercoaxasymmetric:upto30Mbpsdownstream,2MbpsupstreamnetworkofcableandfiberattacheshomestoISProuterhomesshareaccesstorouterdeployment:availableviacableTVcompanies,CopyrightXuJingdong,Allrightreserved,17,Residentialaccess:cablemodems,Diagram:,CopyrightXuJingdong,Allrightreserved,18,Institutionalaccess:localareanetworks,company/universitylocalareanetwork(LAN)connectsendsystemtoedgerouterEthernet:10Mbps,100Mbps,1Gbps,10GbpsEthernetmodernconfiguration:endsystemsconnectintoEthernetswitch,CopyrightXuJingdong,Allrightreserved,19,Wirelessaccessnetworks,sharedwirelessaccessnetworkconnectsendsystemtorouterviabasestationaka“accesspoint”wirelessLANs:IEEE802.11a/b/g:54MbpsIEEE802.11n:600Mbps。wider-areawirelessaccess3G:cellularsystemCDMA2000:3.1/1.8Mbps,TD-SCDMA:2.8/2.2MbpsWCDMA:14.4/5.76Mbps4G:TD-LTE:100/50Mbps5G:?,basestation,mobilehosts,router,Homenetworks,Typicalhomenetworkcomponents:DSLorcablemodemrouter/firewall/NATEthernetwirelessaccesspoint,wirelessaccesspoint,wirelesslaptops,router/firewall,cablemodem,to/fromcableheadend,Ethernet,20,CopyrightXuJingdong,Allrightreserved,21,PhysicalMedia,Bit:propagatesbetweentransmitter/receiverpairsphysicallink:whatliesbetweentransmitter&receiverguidedmedia:signalspropagateinsolidmedia:copper,fiber,coaxunguidedmedia:signalspropagatefreely,e.g.,radio,CopyrightXuJingdong,Allrightreserved,22,PhysicalMedia:TwistedPair,TwistedPair(TP)twoinsulatedcopperwiresCategory3:traditionalphonewires,10MbpsEthernetCategory5:100MbpsEthernet,CopyrightXuJingdong,Allrightreserved,23,PhysicalMedia:coax,Coaxialcabletwoconcentriccopperconductorsbidirectionalbaseband:singlechanneloncablelegacyEthernetbroadband:multiplechannelsoncableHFC,CopyrightXuJingdong,Allrightreserved,24,PhysicalMedia:fiber,Fibercableglassfibercarryinglightpulses,eachpulseabithigh-speedoperation:high-speedpoint-to-pointtransmission(e.g.,10s-100sGps)lowerrorrate:immunetoelectromagneticnoise,CopyrightXuJingdong,Allrightreserved,25,Physicalmedia:radio,signalcarriedinelectromagneticspectrumnophysical“wire”Bidirectionalpropagationenvironmenteffects:reflectionobstructionbyobjectsinterference,RadiolinktypesTerrestrialmicrowavee.g.upto45MbpschannelsWirelessLAN(e.g.WiFi)54Mbps,150Mbpswide-area(e.g.,cellular)3G,1MbpssatelliteKbpsto45Mbpschannel(ormultiplesmaller270millisecondend-enddelay,CopyrightXuJingdong,Allrightreserved,26,Thenetworkcore:,meshofinterconnectedroutersfundamentalquestion:howisdatatransferredthroughnet?circuitswitching:dedicatedcircuitpercall:telephonenetpacket-switching:datasentthroughnetworkindiscrete“chunks”,CopyrightXuJingdong,Allrightreserved,27,NetworkCore:CircuitSwitching,Itsthemethodusedbythetelephonenetworkcallsetuprequired:threephasesEstablishcircuitfromend-to-end(“dialing”),Communicate,Closecircuit(“teardown”).Originally,acircuitwasanend-to-endphysicalwireNowadays,acircuitislikeavirtualprivatewire,CopyrightXuJingdong,Allrightreserved,28,NetworkCore:CircuitSwitching,End-endresourcesreservedfor“call”linkbandwidth,switchcapacitydedicatedresources:nosharingcircuit-like(guaranteed)workresources(e.g.,bandwidth)dividedinto“pieces”piecesallocatedtocallsresourcepieceidleifnotusedbyowningcall(nosharing)dividinglinkbandwidthinto“pieces”frequencydivisiontimedivision,CopyrightXuJingdong,Allrightreserved,29,CircuitSwitching:FDMandTDM,Anexample,Howlongdoesittaketosendafileof640,000bitsfromhostAtohostBoveracircuit-switchednetwork?Alllinksare1.536MbpsEachlinkusesTDMwith24slots/sec500msectoestablishend-to-endcircuitLetsworkitout!,Rate1.536Mbps/24=64,000bpsTotaltime500ms+640000/64000s=10500ms,30,CopyrightXuJingdong,Allrightreserved,31,Source“Caller”,CentralOffice“C.O.”,Destination“Callee”,CentralOffice“C.O.”,TrunkExchange,CircuitSwitching:TelephoneNetwork,CopyrightXuJingdong,Allrightreserved,32,NetworkCore:PacketSwitching,ItsthemethodusedbytheInternetEachend-enddatastreamdividedintopacketsEachpacketisindividuallyroutedpacket-by-packet,usingtherouterslocalroutingtableDifferentpacketsmaytakedifferentpathsSeveralpacketsmayarriveforthesameoutputlinkatthesametime,thereforeapacketswitchhasbuffers,CopyrightXuJingdong,Allrightreserved,33,NetworkCore:PacketSwitching,packetsuserA,Bpacketssharenetworkresourcesstatisticalmultiplexingresourcesusedasneededresourcecontentionaggregateresourcedemandcanexceedamountavailablecongestion:packetsqueue,waitforlinkusestoreandforward:packetsmoveonehopatatimetransmitoverlinkwaitturnatnextlink,CopyrightXuJingdong,Allrightreserved,34,NetworkCore:PacketSwitching,A,B,C,10MbsEthernet,1.5Mbs,45Mbs,statisticalmultiplexing,queueofpacketswaitingforoutputlink,SequenceofA&Bpacketsdoesnothavefixedpattern,bandwidthsharedondemandstatisticalmultiplexing.TDM:eachhostgetssameslotinrevolvingTDMframe.,CopyrightXuJingdong,Allrightreserved,35,Linkrate,R,X(t),Droppedpackets,B,Droppedpackets,QueueLengthX(t),Time,Packetbuffer,Packetsforoneoutput,PacketSwitching&StatisticalMultiplexing,Data,Hdr,Data,Hdr,Data,Hdr,R,R,R,Becausethebufferabsorbstemporarybursts,theegresslinkneednotoperateatrateN.R.Butthebufferhasfinitesize,B,solosseswilloccur.,1,2,N,CopyrightXuJingdong,Allrightreserved,36,StatisticalMultiplexing,B,A,time,time,Rate,Rate,C,C,A,C,B,C,CopyrightXuJingdong,Allrightreserved,37,StatisticalMultiplexingGain,A,B,R,2C,R2C,A+B,time,Rate,Statisticalmultiplexinggain=2C/R,CopyrightXuJingdong,Allrightreserved,38,StatisticalMultiplexingMore,rate,Oneflow,time,CopyrightXuJingdong,Allrightreserved,39,StatisticalMultiplexingMore,rate,Twoflow,time,Averagerate,CopyrightXuJingdong,Allrightreserved,40,StatisticalMultiplexingMore,rate,Manyflow,time,Averageratesof:1,2,10,100,1000flows.,Networktrafficisbursty.i.e.theratechangesfrequently.Peaksfromindependentflowsgenerallyoccuratdifferenttimes.Conclusion:Themoreflowswehave,thesmootherthetraffic.,CopyrightXuJingdong,Allrightreserved,41,Packet-switchednetworks:routing,Goal:movepacketsamongroutersfromsourcetodestinationwellstudyseveralpathselectionalgorithmslater(chap.4)!datagramnetwork:destinationaddressdeterminesnexthoproutesmaychangeduringsessionanalogy:driving,askingdirectionsvirtualcircuitnetwork:eachpacketcarriestag(virtualcircuitID),tagdeterminesnexthopfixedpathdeterminedatcallsetuptime,remainsfixedthrucallroutersmaintainper-callstate,CopyrightXuJingdong,Allrightreserved,42,PacketSwitching:Simpleroutermodel,R1,Link1,Link2,Link3,Link4,Link1,ingress,Link1,egress,Link2,ingress,Link2,egress,Link3,ingress,Link3,egress,Link4,ingress,Link4,egress,ChooseEgress,ChooseEgress,ChooseEgress,ChooseEgress,CopyrightXuJingdong,Allrightreserved,43,SomeDefinitions,Packetlength,P,isthelengthofapacketinbitsLinklength,L,isthelengthofalinkinmetersDatarate,R,istherateatwhichbitscanbesent,inbits/second,orb/s1Propagationdelay,PROP,isthetimeforonebittotravelalongalinkoflength,LPROP=L/c.Transmissiontime,TRANSP,isthetimetotransmitapacketoflengthPTRANSP=P/RLatencyisthetimefromwhenthefirstbitbeginstransmission,untilthelastbithasbeenreceived.Onalink:Latency=PROP+TRANSP,1.Notethatakilobit/second,kb/s,is1000bits/second,not1024bits/second.,CopyrightXuJingdong,Allrightreserved,44,PacketSwitching,HostA,HostB,R1,R2,R3,R1,R2,R4,R3,TRANSP1,TRANSP2,TRANSP3,TRANSP4,PROP1,PROP2,PROP3,PROP4,Source,Destination,“Store-and-Forward”ateachRouter,CopyrightXuJingdong,Allrightreserved,45,PacketSwitching,Breakingmessageintopacketsallowsparalleltransmissionacrossalllinks,reducingendtoendlatencyItalsopreventsalinkorbufferfrombeing“hogged”foralongtimebyonemessage,HostA,HostB,R1,R2,R3,M/R,HostA,HostB,R1,R2,R3,M/R,Q:Whynotsendtheentiremessageinonepacket?,.,CopyrightXuJingdong,Allrightreserved,46,PacketSwitching:QueueingDelay,HostA,HostB,R1,R2,R3,TRANSP1,TRANSP2,TRANSP3,TRANSP4,PROP1,PROP2,PROP3,PROP4,Q2,Becausetheegresslinkisnotnecessarilyfreewhenapacketarrives,itmaybequeuedinabuffer.Ifthenetworkisbusy,packetsmighthavetowaitalongtime.,CopyrightXuJingdong,Allrightreserved,47,QueuesandQueueingDelay,Tounderstandtheperformanceofapacketswitchednetwork,wecanthinkofitasaseriesofqueuesinterconnectedbylinksForgivenlinkratesandlengths,theonlyvariableisthequeueingdelayIfwecanunderstandthequeueingdelay,wecanunderstandhowthenetworkperforms,CopyrightXuJingdong,Allrightreserved,48,Packetswitchingversuscircuitswitching,1Mbitlinkeachuser:100Kbpswhen“active”active10%oftimecircuit-switching:10userspacketswitching:moreusers,Packetswitchingallowsmoreuserstousenetwork!,CopyrightXuJingdong,Allrightreserved,49,Packetswitchingversuscircuitswitching,PacketswitchingGreatforburstydataresourcesharingnocallsetupExcessivecongestion:packetdelayandlossprotocolsneededforreliabledatatransfer,congestioncontrolQ:Howtoprovidecircuit-likebehavior?bandwidthguaranteesneededforaudio/videoappsQoS:stillanunsolvedproblem!,CopyrightXuJingdong,Allrightreserved,50,WhydoesInternetusepacketswitching?,Efficientuseofexpensivelinks:ThelinksareassumedtobeexpensiveandscarcePacketswitchingallowsmany,burstyflowstosharethesamelinkefficiently“Circuitswitchingisrarelyusedfordatanetworks,.becauseofveryinefficientuseofthelinks”DataNetworks,RobertG.Gallager,MITResiliencetofailureoflinks&routers:“Forhighreliability,.theInternetwastobeadatagramsubnet,soifsomelinesandroutersweredestroyed,messagescouldbe.rerouted”ComputerNetworks,Tanenbaum,CopyrightXuJingdong,Allrightreserved,51,Whatsaprotocol?,humanprotocols:whattimeisit?networkprotocols:machinesratherthanhumansallcommunicationactivityinInternetgovernedbyprotocols,Protocols:defineformat,orderofmessagessentandreceivedamongnetworkentities,andactionstakenonmessagetransmission,receipt,Note:twoormorecommunicatingentitiesrunningthesameprotocols,CopyrightXuJingdong,Allrightreserved,52,Whatsaprotocol?,ahumanprotocolandacomputernetworkprotocol,Hi,Hi,TCPconnectionreq.,CopyrightXuJingdong,Allrightreserved,53,Organizationofairtravel,aseriesofsteps,ticket(purchase)baggage(check)gates(load)runwaytakeoffairplanerouting,ticket(complain)baggage(claim)gates(unload)runwaylandingairplanerouting,airplanerouting,Layeringofairlinefunctionality,Layers:eachlayerimplementsaserviceviaitsowninternal-layeractionsrelyingonservicesprovidedbylayerbelow,Introduction1-54,CopyrightXuJingdong,Allrightreserved,55,Distributedimplementationoflayerfunctionality,CopyrightXuJingdong,Allrightreserved,56,Whylayering?,Dealingwithcomplexsystems:explicitstructureallowsidentification,relationshipofcomplexsystemspieceslayeredreferencemodelfordiscussionmodularizationeasesmaintenance,updatingofsystemchangeofimplementationoflayersservicetransparenttorestofsysteme.g.,changeingateproceduredoesntaffectrestofsystemQ:layeringconsideredharmful?,CopyrightXuJingdong,Allrightreserved,57,Layering:OSIreferencemodel,Session,Network,DataLink,Physical,Physical,Physical,Application,Presentation,Transport,Network,DataLink,DataLink,Network,Transport,Session,Presentation,Application,Network,DataLink,Physical,Peer-layercommunication,layer-to-layercommunication,Router,Router,1,2,3,4,5,6,7,1,2,3,4,5,6,7,Host,Host,CopyrightXuJingdong,Allrightreserved,58,FunctionofISOLayers,Layer1:PhysicalHowtransmittingrawbitsovercommunicationchannelCoding,etc.Layer2:DataLinkPoint-to-pointprotocolErrorchecking,Reliability,FlowcontrolControlaccesstothesharedchannel(broadcastnetwork)Layer3:NetworkPacketforwarding:howpacketsareroutedfromsourcetodestinationLayer4:TransportEnd-to-endprotocolReliability,Flowcontrol,Congestioncontrol,CopyrightXuJingdong,Allrightreserved,59,FunctionofISOLayers(Cont.),Layer5:SessionDialogcontrolSynchronizationLayer6:PresentationSyntaxandsemanticsofinformationtransmittedFormattransform,datacompressing,encrypt/decryptLayer7:ApplicationIndividualapplicationprogramProvidingservicetouser,CopyrightXuJingdong,Allrightreserved,60,Layering:TCP/IPmodel,Network,DataLink,Physical,Physical,Physical,Application,Transport,Network,DataLink,DataLink,Network,Transport,Network,DataLink,Physical,Peer-layercommunication,Router,Router,1,2,3,4,5,1,2,3,4,Application,5,Note:linklayer+physicallayerinterfacelayer,CopyrightXuJingdong,Allrightreserved,61,OSImodelvs.TCP/IPmodel,The7-layerOSIModel,The5-layerTCP/IPmodel,Session,Physical,Application,Presentation,Transport,Network,DataLink,1,2,3,4,5,6,7,Physical,DataLink,Network,Transport,1,2,3,4,Application,5,CopyrightXuJingdong,Allrightreserved,62,TCP/IPprotocolstack,Application:supportingnetworkapplicationsftp,smtp,httpTransport:host-hostdatatransfertcp,udpNetwork:routingofdatagramsfromsourcetodestinationip,routingprotocolsDatalink:datatransferbetweenneighboringnetworkelementsppp,ethernetPhysical:bits“onthewire”,CopyrightXuJingdong,Allrightreserved,63,Layering:distributedentities,Eachlayer:distributed“entities”implementlayerfunctionsateachnodeentitiesperformactions,exchangemessageswithpeers,CopyrightXuJingdong,Allrightreserved,64,Layering:logicalcommunication,E.g.:transporttakedatafromappaddaddressing,reliabilitycheckinfotoform“datagram”senddatagramtopeerwaitforpeertoackreceipt,CopyrightXuJingdong,Allrightreserved,65,Layering:physicalcommunication,source,applicationtransportnetworklinkphysical,segment,datagram,destination,applicationtransportnetworklinkphysical,router,Encapsulation,message,frame,Introduction1-66,CopyrightXuJingdong,Allrightreserved,67,Example:FTPovertheInternet,App,OS,R2,R3,R4,R1,R5,Ethernet,“A”,“B”,Ethernet,App,OS,CopyrightXuJingdong,Allrightreserved,68,Inthesendinghost,Application-ProgrammingInterface(API)(1)ApplicationrequestsTCPconnectionwith“B”TransmissionControlProtocol(TCP)(2)CreatesTCP“Connectionsetup”segmentTCPrequestsIPpackettobesentto“B”,TCPData,TCPHeader,TCPSegment,Type=ConnectionSetup,Empty,CopyrightXuJingdong,Allrightreserved,69,Inthesendinghost,InternetProtocol(IP)(3)CreatesIPpacketwithcorrectaddressesIPrequestspackettobesenttorouter,IPData,TCPSegment,Encapsulation,IPHeader,IPPacket,DestinationAddress:IP“B”SourceAddress:IP“A”Protocol=TCP,CopyrightXuJingdong,Allrightreserved,70,Inthesendinghost,Link(“MAC”orEthernet)Protocol(4)CreatesMACframewithFrameCheckSequence(FCS)WaitforAccesstothelineMACrequestsPHYtosendeachbitoftheframe,EthernetData,IPPacket,EthernetFCS,EthernetHeader,EthernetPacket,DestinationAddress:MAC“R1”SourceAddress:MAC“A”Protocol=IP,Encapsulation,CopyrightXuJingdong,Allrightreserved,71,InRouterR1,Link(“MAC”orEthernet)Protocol(5)AcceptMACframe,checkaddressandFrameCheckSequence(FCS)PassdatatoIPProtocol.,EthernetData,IPPacket,EthernetFCS,EthernetHeader,EthernetPacket,DestinationAddress:MAC“R1”SourceAddress:MAC“A”Protocol=IP,Decapsulation,CopyrightXuJingdong,Allrightreserved,72,InRouterR1,InternetProtocol(IP)(6)UseIPdestinationaddresstodecidewheretosendpacketnext(“next-hoprouting”).RequestLinkProtocoltotransmitpacket,IPData,IPHeader,IPPacket,DestinationAddress:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论