CS 61C L26 Disks & Networks (1)A Carle, Summer 2005 © UCBinst.eecs.berkeley.edu/~cs61c/su05CS61C : Machine StructuresLecture #26: Disks & Networks 2005-08-04Andy CarleCS 61C L26 Disks & Networks (2)A Carle, Summer 2005 © UCBOutline•Buses•Networks•DisksCS 61C L26 Disks & Networks (3)A Carle, Summer 2005 © UCBBuses in a PC: connect a few devices (2002)CPUMemory bus (FSB)MemorySCSI:ExternalI/O bus(1 to 15 disks)SCSI InterfaceEthernet InterfaceEthernet Local Area Network•Data rates (P4)• Memory: 400 MHz, 8 bytes⇒ 3.2 GB/s (peak)• PCI: 100 MHz, 8 bytes wide ⇒ 0.8 GB/s (peak)• SCSI: “Ultra4” (160 MHz), “Wide” (2 bytes)⇒ 0.3 GB/s (peak)GigabitEthernet:⇒ 0.125 GB/s (peak)PCI InterfacePCI: Internal(Backplane)I/O busBus - shared medium of communication that can connect to many devices. Hierarchy!!CS 61C L26 Disks & Networks (4)A Carle, Summer 2005 © UCBMain components of Intel Chipset: Pentium II/III• Northbridge:• Handles memory• Graphics• Southbridge: I/O• PCI bus• Disk controllers• USB controlers• Audio• Serial I/O• Interrupt controller• TimersCS 61C L26 Disks & Networks (5)A Carle, Summer 2005 © UCBA Three-Bus System (+ backside cache)• A small number of backplane buses tap into the processor-memory bus• FSB bus is only used for processor-memory traffic• I/O buses are connected to the backplane bus (PCI)• Advantage: load on the FSB is greatly reducedProcessor MemoryProcessor Memory Bus (FSB)BusAdaptorBusAdaptorBusAdaptorI/O BusBacksideCache busI/O BusL2 CacheBackplaneCS 61C L26 Disks & Networks (6)A Carle, Summer 2005 © UCBWhat is DMA (Direct Memory Access)?• Typical I/O devices must transfer large amounts of data to memory of processor:• Disk must transfer complete block • Large packets from network• Regions of frame buffer• DMA gives external device ability to access memory directly: • much lower overhead than having processor request one word at a time.• Issue: Cache coherence:• What if I/O devices write data that is currently in processor Cache? - The processor may never see new data!• Solutions: - Flush cache on every I/O operation (expensive)- Have hardware invalidate cache lines (“Coherence” cache misses?)?CS 61C L26 Disks & Networks (7)A Carle, Summer 2005 © UCBOutline•Buses•Networks•DisksCS 61C L26 Disks & Networks (8)A Carle, Summer 2005 © UCBWhy Networks?•Originally sharingI/O devices between computers (e.g., printers)•Then Communicating betweencomputers (e.g, file transfer protocol)•Then Communicating betweenpeople (e.g., email)•Then Communicating betweennetworks of computers ⇒ p2p File sharing, WWW, …CS 61C L26 Disks & Networks (9)A Carle, Summer 2005 © UCBHow Big is the Network (1999)?Computers in 271 Sodain inst.cs.berkeley.eduin eecs&cs .berkeley.eduin berkeley.eduin .eduin US(.com .net .edu .mil .us .org)in the worldSource: Internet Software Consortium~30~400~4,000~50,000~5,000,000~46,000,000~56,000,000CS 61C L26 Disks & Networks (10)A Carle, Summer 2005 © UCBGrowth RatesEthernet Bandwidth1983 3 mb/s1990 10 mb/s1997 100 mb/s1999 1000 mb/s2004 10 Gig E010,000,00020,000,00030,000,00040,000,00050,000,00060,000,00070,000,00080,000,00090,000,000100,000,000Jan-93 Apr-95 Jun-97 Aug-99 Internet Hosts "Source: Internet Software Consortium (http://www.isc.org/)".CS 61C L26 Disks & Networks (11)A Carle, Summer 2005 © UCBWhat makes networks work?•links connecting switches to each other and to computers or devicesComputernetworkinterfaceswitchswitchswitch•ability to name the components and to route packets of information -messages - from a source to a destination•Layering, protocols, and encapsulation as means of abstraction(61C big idea)CS 61C L26 Disks & Networks (12)A Carle, Summer 2005 © UCBTypical Types of Networks•Local Area Network (Ethernet)• Inside a building: Up to 1 km• (peak) Data Rate: 10 Mbits/sec, 100 Mbits/sec,10Gbits/sec (1.25, 12.5, 1250 MBytes/s)• Run, installed by network administrators•Wide Area Network• Across a continent (10km to 10000 km)• (peak) Data Rate: 1.5 Mb/s to >10000 Mb/s• Run, installed by telecommunications companies (Sprint, UUNet[MCI], AT&T)• Wireless NetworksCS 61C L26 Disks & Networks (13)A Carle, Summer 2005 © UCBABCs of Networks: 2 Computers• Starting Point: Send bits between 2 computers• Queue (First In First Out) on each end• Can send both ways (“Full Duplex”)• Information sent called a “message”• Note: Messages also called packetsnetworkinterfacedeviceOSapplnOSapplnCS 61C L26 Disks & Networks (14)A Carle, Summer 2005 © UCBA Simple Example: 2 Computers•What is Message Format?• Similar idea to Instruction Format• Fixed size? Number bits?• Header(Trailer):information to deliver message• Payload: data in message• What can be in the data?• anything that you can represent as bits• values, chars, commands, addresses...8 bit32 x Length bitsDataLengthCS 61C L26 Disks & Networks (15)A Carle, Summer 2005 © UCBQuestions About Simple Example•What 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) [just like envelopes!]8 bits32xn bits8 bits 8 bitsHeader PayloadCMD/ Address /DataNet ID Net IDDest. SourceLenCS 61C L26 Disks & Networks (16)A Carle, Summer 2005 © UCBABCs: many computers•switches and routers interpret the header in order to deliver the packet•source encodes and destination decodes content of the payloadnetworkinterfacedeviceOSapplicationOSapplicationCS 61C L26 Disks & Networks (17)A Carle, Summer 2005 © UCBQuestions About Simple Example• What if message is garbled in transit?• Add redundant information that is checked when message arrives to be sure it is OK• 8-bit sum of other bytes: called “Check sum”; upon arrival compare check sum to sum of rest of information in messageHeader PayloadChecksumTrailerCMD/ Address /DataNet ID Net ID LenMath 55 talks about what a Check sum is…CS 61C L26 Disks & Networks (18)A Carle, Summer 2005 © UCBQuestions About Simple Example•What if message never arrives?•Receiver tells sender when it arrives (ack) [ala registered mail], sender retries if waits too long•Don’t discard message until get “ACK” (for ACKnowledgment); Also, if check sum fails, don’t send ACKHeader PayloadChecksumTrailerCMD/ Address /DataNet ID Net ID LenACKINFOCS 61C L26
View Full Document