2007Sp61C-L37-ak-networks

上传人:博****1 文档编号:576822378 上传时间:2024-08-20 格式:PPT 页数:29 大小:2.77MB
返回 下载 相关 举报
2007Sp61C-L37-ak-networks_第1页
第1页 / 共29页
2007Sp61C-L37-ak-networks_第2页
第2页 / 共29页
2007Sp61C-L37-ak-networks_第3页
第3页 / 共29页
2007Sp61C-L37-ak-networks_第4页
第4页 / 共29页
2007Sp61C-L37-ak-networks_第5页
第5页 / 共29页
点击查看更多>>
资源描述

《2007Sp61C-L37-ak-networks》由会员分享,可在线阅读,更多相关《2007Sp61C-L37-ak-networks(29页珍藏版)》请在金锄头文库上搜索。

1、CS61C L37 I/O : Networks (1)Kronrod UCBTA Alex Kronrodinst.eecs/cs61c-teinst.eecs.berkeley.edu/cs61c CS61C : Machine StructuresLecture 37 I/O : Networks2007-04-20Bad software upgrade causes service outage for Blackberry usersSoftware upgrade to improve Cache performance triggered a problem at RIMs h

2、ub for North American traffic effecting more than five million usershttp:/ L37 I/O : Networks (2)Kronrod UCBI/O ReviewI/O gives computers their 5 sensesI/O speed range is 12.5-million to oneDifferences in processor and I/O speed synchronize with I/O devices before usePolling works, but expensiveproc

3、essor repeatedly queries devicesInterrupts works, more complexdevice causes an exception, causing OS to run and deal with the deviceI/O control leads to Operating SystemsCS61C L37 I/O : Networks (3)Kronrod UCBWhy Networks?Originally sharing I/O devices between computers ex: printersThen communicatin

4、g between computers ex: file transfer protocolThen communicating between people ex: e-mailThen communicating between networks of computers ex: file sharing, www, CS61C L37 I/O : Networks (4)Kronrod UCBHow Big is the Network (2007)?in 273 Sodain inst.cs.berkeley.eduin eecs & cs .berkeley.eduin berkel

5、ey.eduin .edu (2005: 9,000,000)in US (2005: 217,000,000, 2006: 286.5E6)(.net .com .edu .arpa .us .mil .org .gov)in the world Source: Internet Software Consortium: www.isc.org305256,400(1999) 50,000 10,000,000258,941,310433,190,000(2005:317,000,000, 2006: 439,000,000)CS61C L37 I/O : Networks (5)Kronr

6、od UCBGrowth RateEthernet Bandwidth19833 mb/s199010 mb/s1997100 mb/s19991000 mb/s200610 Gig E en.wikipedia.org/wiki/10_gigabit_ethernetCS61C L37 I/O : Networks (6)Kronrod UCBShared vs. Switched Based NetworksShared vs. Switched: Switched: pairs (“point-to-point” connections) communicate at same time

7、Shared: 1 at a time (CSMA/CD)Aggregate bandwidth (BW) in switched network ismany times shared:point-to-point faster since no arbitration, simpler interfaceNodeNodeNodeSharedCrossbarSwitchNodeNodeNodeNodeCS61C L37 I/O : Networks (7)Kronrod UCBWhat makes networks work?links connecting switches to each

8、 other and to computers or devicesComputernetworkinterfaceswitchswitchswitchability to name the components and to route packets of information - messages - from a source to a destinationLayering, redundancy, protocols, and encapsulation as means of abstraction (61C big idea)CS61C L37 I/O : Networks

9、(8)Kronrod UCBTypical Types of NetworksLocal Area Network (Ethernet)Inside a building: Up to 1 km(peak) Data Rate: 10 Mbits/sec, 100 Mbits /sec,1000 Mbits/sec (1.25, 12.5, 125 MBytes/s)Run, installed by network administratorsWide Area NetworkAcross a continent (10km to 10000 km)(peak) Data Rate: 1.5

10、 Mb/s to 10000 Mb/sRun, installed by telecommunications companies (Sprint, UUNetMCI, AT&T) Wireless Networks (LAN), .CS61C L37 I/O : Networks (9)Kronrod UCBThe Sprint U.S. Topology (2001)CS61C L37 I/O : Networks (10)Kronrod UCBAdministriviaCrunch timeLast Lecture and Course Surveys on Monday 2007-05

11、-07Final Review Session on Wed 2007-05-093 weeks + 1 day until the Final -Final Exam on Saturday 2007-05-1212:30-3:30 2050 VLSB. IS MANDATORY!Project 4 is out! May work in pairs.CS61C L37 I/O : Networks (11)Kronrod UCBABCs of Networks: 2 ComputersStarting Point: Send bits between 2 computersQueue (F

12、irst In First Out) on each endCan send both ways (“Full Duplex”)One-way information is called “Half Duplex”Information sent called a “message”Note: Messages also called packetsnetworkinterfacedeviceOSappOSappCS61C L37 I/O : Networks (12)Kronrod UCBA Simple Example: 2 ComputersWhat is Message Format?

13、Similar idea to Instruction FormatFixed size? Number bits?Header (Trailer): information to deliver messagePayload: data in messageWhat can be in the data?anything that you can represent as bitsvalues, chars, commands, addresses.8 bit32 x Length bitsDataLengthCS61C L37 I/O : Networks (13)Kronrod UCBQ

14、uestions About Simple ExampleWhat if more than 2 computers want to communicate?Need computer “address field” in packet to know:-which computer should receive it (destination)-which computer to reply to (source) Just like envelopes!8 bits32*n bits8 bits 8 bitsHeaderPayloadCMD/ Address /DataNet ID Net

15、 IDDest. SourceLenCS61C L37 I/O : Networks (14)Kronrod UCBABCs: many computersswitches and routers interpret the header in order to deliver the packetsource encodes and destination decodes content of the payloadnetworkinterfacedeviceOSapplicationOSapplicationCS61C L37 I/O : Networks (15)Kronrod UCBQ

16、uestions About Simple ExampleWhat if message is garbled in transit?Add redundant information that is checked when message arrives to be sure it is OK8-bit sum of other bytes: called “Check sum”; upon arrival compare check sum to sum of rest of information in message. xor also popular.HeaderPayloadCh

17、ecksumTrailerCMD/ Address /DataNet ID Net ID LenLearn about Checksums in Math 55/CS 70CS61C L37 I/O : Networks (16)Kronrod UCBQuestions About Simple ExampleWhat if message never arrives?Receiver tells sender when it arrives Send an ACK (ACKnowledgement) like registered mailSender retries if waits to

18、o longDont discard message until it is ACKedIf check sum fails, dont send ACKHeaderPayloadChecksumTrailerCMD/ Address /DataNet ID Net ID LenACKINFOCS61C L37 I/O : Networks (17)Kronrod UCBObservations About Simple ExampleSimple questions (like those on the previous slides) lead to:more complex proced

19、ures to send/receive messagemore complex message formatsProtocol: algorithm for properly sending and receiving messages (packets) an agreement on how to communicateCS61C L37 I/O : Networks (18)Kronrod UCBSoftware Protocol to Send and ReceiveSW Send steps1: Application copies data to OS buffer2: OS c

20、alculates checksum, starts timer3: OS sends data to network interface HW and says startSW Receive steps3: OS copies data from network interface HW to OS buffer2: OS calculates checksum, if OK, send ACK; if not, delete message (sender resends when timer expires)1: If OK, OS copies data to user addres

21、s space, & signals application to continueCS61C L37 I/O : Networks (19)Kronrod UCBProtocol for Networks of Networks?Networks are like onions.They stink?Yes. No!Oh, they make you cry.No! Layers. Onions have layers. Networks have layers. Abstraction to cope with complexity of communication (compare to

22、 Abstraction for complexity of computation)Networks are like onionsHierarchy of layers:-Application (chat client, game, etc.)-Transport (TCP, UDP)-Network (IP)-Physical Link (wired, wireless, etc.)CS61C L37 I/O : Networks (20)Kronrod UCBProtocol Family ConceptMessageMessageTHMessage THMessage THTHAc

23、tualActualPhysicalMessage THMessage THActualActualLogicalLogicalCS61C L37 I/O : Networks (21)Kronrod UCBProtocol Family ConceptKey to protocol families is that communication occurs logically at the same level of the protocol, called peer-to-peerbut is implemented via services at the next lower level

24、Encapsulation: carry higher level information within lower level “envelope”Fragmentation: break packet into multiple smaller packets and reassembleCS61C L37 I/O : Networks (22)Kronrod UCBProtocol for Network of NetworksIP: Best-Effort Packet Delivery (Network Layer)Packet switchingSend data in packe

25、tsHeader with source & destination address“Best effort” delivery Packets may be lostPackets may be corruptedPackets may be delivered out of orderCS61C L37 I/O : Networks (23)Kronrod UCBProtocol for Network of NetworksTransmission Control Protocol/Internet Protocol (TCP/IP) (TCP : a Transport Layer)T

26、his protocol family is the basis of the Internet, a WAN protocolIP makes best effort to deliver TCP guarantees deliveryTCP/IP so popular it is used even when communicating locally: even across homogeneous LANCS61C L37 I/O : Networks (24)Kronrod UCBMessageTCP/IP packet, Ethernet packet, protocolsAppl

27、ication sends messageTCP dataTCP HeaderIP HeaderIP DataEHEthernet HdrEthernet HdrTCP breaks into 64KiB segments, adds 20B headerIP adds 20B header, sends to networkIf Ethernet, broken into 1500B packets with headers, trailers (24B)All Headers, trailers have length field, destination, .CS61C L37 I/O

28、: Networks (25)Kronrod UCBTCP/IP in actionCreating a Packet:TCPIPIPHeaderTCPHeaderCS61C L37 I/O : Networks (26)Kronrod UCBOverhead vs. BandwidthNetworks are typically advertised using peak bandwidth of network link: e.g., 100 Mbits/sec Ethernet (“100 base T”)Software overhead to put message into net

29、work or get message out of network often limits useful bandwidthAssume overhead to send and receive = 320 microseconds (m ms), want to send 1000 Bytes over “100 Mbit/s” EthernetNetwork transmission time: 1000Bx8b/B /100Mb/s= 8000b / (100b/m ms) = 80 m msEffective bandwidth: 8000b/(320+80)m ms = 20 M

30、b/s CS61C L37 I/O : Networks (27)Kronrod UCBAnd in conclusionProtocol suites allow networking of heterogeneous componentsAnother form of principle of abstraction Protocols operation in presence of failuresStandardization key for LAN, WANIntegrated circuit (“Moores Law”) revolutionizing network switc

31、hes as well as processorsSwitch just a specialized computerTrend from shared to switched networks to get faster links and scalable bandwidthInterested? -EE122 (CS-based in Fall, EE based in Spring)CS61C L37 I/O : Networks (28)Kronrod UCBBonus Example: Network MediaCopper, 1mm think, twisted to avoid

32、 antenna effectTwisted Pair (“Cat 5”):Light: 3 parts are cable, light source, light detectorFiber OpticsTransmitterIs L.E.D orLaser DiodeReceiver PhotodiodelightsourceSilica: glass orplastic; actually 1/10 diameter of copperTotal internalreflectionAirCladdingBufferCS61C L37 I/O : Networks (29)Kronrod UCBBonus Backbone Link App CompositionFile-sharing is the dominant application on many links!

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号