cprogram1C語(yǔ)言_第1頁(yè)
cprogram1C語(yǔ)言_第2頁(yè)
cprogram1C語(yǔ)言_第3頁(yè)
cprogram1C語(yǔ)言_第4頁(yè)
cprogram1C語(yǔ)言_第5頁(yè)
已閱讀5頁(yè),還剩27頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、cs 61c l14 network.1patterson spring 99 ucbcs61canatomy of i/o devices: networks lecture 14march 5, 1999dave patterson (/patterson)/cs61c/schedule.htmlcs 61c l14 network.2patterson spring 99 ucbreview 1/2operating system started as shared i/o librarysupp

2、ort for os abstraction: kernel/user bit, stacked ku bits, syscallmips follows coprocessor abstraction to add resources, instructions for osinterrupt control: interrupt enable bit, stacked ie bits, interrupt priority levels, interrupt maskre-entrant via restricting int. to higher prioritydma to accel

3、erate data movementcs 61c l14 network.3patterson spring 99 ucboutlinebuseswhy networks?a simple example: derive network basicsprotocol, ethernetadministrivia, “computers in the news”internetworking, protocol suites, tcp/ipperformance pitfallsconclusioncs 61c l14 network.4patterson spring 99 ucbrecal

4、l : 5 components of any computer processor (active)computercontrol(“brain”)datapath(“brawn”)memory(passive)(where programs, data live whenrunning)devicesinputoutputkeyboard, mousedisplay, printerdisk,network lectures 1-11lectures 12-15cs 61c l14 network.5patterson spring 99 ucbconnecting to networks

5、 (and other i/o)bus - shared medium of communication that can connect to many deviceshierarchy of buses in a pccs 61c l14 network.6patterson spring 99 ucbbuses in a pccpumemory busmemorydata ratesmemory: 100 mhz, 8 bytes 800 mb/s (peak)pci: 33 mhz, 4 bytes wide 132 mb/s (peak)scsi: “ultra2” (40 mhz)

6、, “wide” (2 bytes) 80 mb/s (peak)pci: internal(backplane) i/o busscsi:external i/o bus(1 to 15 disks)scsi interfaceethernet interfaceethernet local area networkcs 61c l14 network.7patterson spring 99 ucbwhy networks?originally sharing i/o devices between computers (e.g., printers)then communicating

7、between computers (e.g, file transfer protocol)then communicating between people (e.g., email)then communicating between networks of computers internet, wwwcs 61c l14 network.8patterson spring 99 ucbtypes of networkslocal area network (ethernet)inside a building: up to 1 km(peak) data rate: 10 mbits

8、/sec, 100 mbits/sec,1000 mbits/secrun, installed by network administratorswide area networkacross a continent (10km to 10000 km)(peak) data rate: 1.5 mbits/sec to 2500 mbits/secrun, installed by telephone companiescs 61c l14 network.9patterson spring 99 ucbabcs of networks: 2 computersstarting point

9、: send bits between 2 computersqueue (first in first out) on each endcan send both ways (“full duplex”)information sent called a “message”note: messages also called packetscs 61c l14 network.10patterson spring 99 ucba simple example: 2 computerswhat is message format?(similar in idea to instruction

10、format)fixed size? number bits?0: please send data from address in your memory1: packet contains data corresponding to request header(trailer): information to deliver message payload: data in message (1 word above)request/response1 bit32 bitsaddress/datacs 61c l14 network.11patterson spring 99 ucbqu

11、estions 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), and to which computer it came from for reply (source)req./resp.1 bit32 bitsaddress/datanet id net iddest. source5 bits 5 bitsh

12、eaderpayloadcs 61c l14 network.12patterson spring 99 ucbquestions 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

13、 information in messagereq./resp.1 bit32 bitsaddress/datanet id net iddest. source5 bits 5 bitsheaderpayloadchecksum8 bitstrailercs 61c l14 network.13patterson spring 99 ucbquestions about simple examplewhat if message never arrives?if tell sender it has arrived (and tell receiver reply has arrived)

14、, can resend upon failuredont discard message until get “ack”; (also, if check sum fails, dont send ack)req./resp.2 bits32 bitsaddress/datanet id net iddest. source5 bits 5 bitscheck8 bits00: requestplease send data from address01: replymessage contains data corresponding to request10: acknowledge (

15、ack) request11: acknowledge (ack) replycs 61c l14 network.14patterson spring 99 ucbobservations about simple examplesimple questions such as those above lead to more complex procedures to send/receive message and more complex message formatsprotocol: algorithm for properly sending and receiving mess

16、ages (packets)cs 61c l14 network.15patterson spring 99 ucbethernet packet formatpreamble dest addr src addrlength of data2 bytesdatacheckpreamble to recognize beginning of packetunique address per ethernet network interface card so can just plug in & usepad ensures minimum packet is 64 byteseasi

17、er to find packet on the wireheader+ trailer: 24b + padpad8 bytes6 bytes 6 bytes0-1500b 0-46b 4bcs 61c l14 network.16patterson spring 99 ucbsoftware protocol to send and receivesw send steps1: application copies data to os buffer2: os calculates checksum, starts timer3: os sends data to network inte

18、rface 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 address space, & signals application to continuecs 61c l14 network

19、.17patterson spring 99 ucbadministrivia 1/26th homework: due 3/10 7pmexercises 8.3, 8.29 (skip challenge), ap a.3 4th project: friday 3/12 7pm (absolute latest: 3/13 8am)readings: cache memory 7.1, 7.2upcoming eventsmidterm review sunday 3/14 2pm, 1 pimentelmidterm on wed. 3/17 5pm-8pm, 1 pimentelno

20、 discussion sections 3/18, 3/19friday before break 3/19: video tape by gordon moore, “nanometers and gigabucks”cs 61c l14 network.18patterson spring 99 ucbadministrivia 2/2: survey resultssurvey results45151934516050100150200 0-4 5-8 9-12 13-1616hours / week46325032050100150200250tooslowbitslowbit f

21、ast too fast2488912124494102050100150200250yes!fineelsewhereno!stuffnewscs 61c l14 network.19patterson spring 99 ucb“computers in the news”“a growing compatibility issue in the digital age: computers and their users privacy”, nyt, 3/2/99 “. an imminent privacy threat or simply part of the foundation

22、 of advanced computer systems” “privacy groups argue fiercely that the merger of computers and the internet has brought the specter of a new surveillance society (anything)”“.network designers argue that identity information is a vital aspect of modern security design because it is necessary to auth

23、enticate an individual in a network, thereby preventing fraud or intrusion”“all devices connected to networks require identification simply to function correctly. for 20 years a requirement for any computer connected to an ethernet”cs 61c l14 network.20patterson spring 99 ucbprotocol for networks of

24、 networks?internetworking: allows computers on independent and incompatible networks to communicate reliably and efficiently;enabling technologies: sw standards that allow reliable communications without reliable networkshierarchy of sw layers, giving each layer responsibility for portion of overall

25、 communications task, called protocol families or protocol suitesabstraction to cope with complexity of communication vs. abstraction for complexity of computationcs 61c l14 network.21patterson spring 99 ucbprotocol for network of networkstransmission control protocol/internet protocol (tcp/ip)this

26、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 lancs 61c l14 network.22patterson spring 99 ucbftp from stanford to berkeleybarrnet is wan for bay

27、areat3 is 45 mbit/s leased line (wan); fddi is 100 mbit/s lanip sets up connection, tcp sends filet3fddifddiethernetethernetethernethennessypattersonfddics 61c l14 network.23patterson spring 99 ucbprotocol family conceptmessage thmessagethmessage thmessagemessage thmessage ththactualactualactualactu

28、alactuallogicallogicalcs 61c l14 network.24patterson spring 99 ucbprotocol family conceptkey to protocol families is that communication occurs logically at the same level of the protocol, called peer-to-peer, but is implemented via services at the lower leveldanger is each level lower performance if

29、 family is implemented as hierarchy (e.g., multiple check sums)cs 61c l14 network.25patterson spring 99 ucbmessagetcp/ip packet, ethernet packet, protocolsapplication sends messagetcp datatcp headerip headerip dataehethernet hdrethernet hdrtcp breaks into 64kb segments, adds 20b headerip adds 20b he

30、ader, sends to networkif ethernet, broken into 1500b packets with headers, trailers (24b)all headers, trailers have length field, destination, .cs 61c l14 network.26patterson spring 99 ucbshared vs. switched based networksshared media vs. switched: pairs communicate at same time: “point-to-point” co

31、nnectionsaggregate bw in switched network is many times sharedpoint-to-point faster since no arbitration, simpler interfacenodenodenodesharedcrossbarswitchnodenodenodenodecs 61c l14 network.27patterson spring 99 ucbexample of network performancecompare ethernet, atm sending a message with a 5 mb pay

32、loadtime to send message: overhead + size/data rateethernet overhead: 500 microsecondsbw is 1.25 mbyte/secatm overhead: 600 microsecondsbw is 10 mbyte/sectransmission time = overhead + size/(data rate)cs 61c l14 network.28patterson spring 99 ucbexample of network performancecompare ethernet (10 mbit

33、/sec), atm (800 mbit/sec) sending a message with a 250 byte payloadtime to send message: overhead + size/data rateethernet overhead: 460 microsecondsbw is 1.25 mbyte/sectime = 460 + 250/1.25 = 660 usecsatm overhead: 630 microsecondsbw is 10 mbyte/sectime = 630 + 250/10 = 655 microsecondscs 61c l14 n

34、etwork.29patterson spring 99 ucblimits to performance of networkslayers of protocolprocessor speed for protocol processingmemory speed for transferring messagesbus speed for connecting to computersharing of network by multiple computerscs 61c l14 network.30patterson spring 99 ucbi/o pitfall: relying on peak data ratesusing the peak transfer rate of a portion of the i/o system to make performance projections or performance comparisonspeak bandwidth measurements of

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論