+ All Categories
Home > Documents > Presentation4-Making Connections Www

Presentation4-Making Connections Www

Date post: 06-Apr-2018
Category:
Upload: maragathamani
View: 226 times
Download: 0 times
Share this document with a friend

of 61

Transcript
  • 8/3/2019 Presentation4-Making Connections Www

    1/61

    Making ConnectionsMaking Connections

    Prof. Aiman Hanna Prof. Aiman Hanna

    Department of Computer ScienceDepartment of Computer Science

    Concordia UniversityConcordia University

    Montreal, CanadaMontreal, Canada

  • 8/3/2019 Presentation4-Making Connections Www

    2/61

    22

    CCommunication Carriers &ommunication Carriers &

    DevicesDevicesThe Telephone NetworkThe Telephone Network Connects 100s of millions of usersConnects 100s of millions of users Calls are routed first to the local office (local exchange or central office)Calls are routed first to the local office (local exchange or central office)

    Calls within the same area code can be made through direct connectionsCalls within the same area code can be made through direct connections

    Other calls are routed depending on the destinationOther calls are routed depending on the destination

    Private Branch Exchange (PBX) computer is used to route telephone callsPrivate Branch Exchange (PBX) computer is used to route telephone calls

    within a company or organizationwithin a company or organization

    Figure 4.2 Telephone Network

  • 8/3/2019 Presentation4-Making Connections Www

    3/61

    33

    CCommunication Carriers &ommunication Carriers &

    DevicesDevicesC

    ellular PhonesC

    ellular Phones A geographic region is divided intoA geographic region is divided into cellscells each with aeach with a

    base station. A cellular phone is a twobase station. A cellular phone is a two--way radioway radiocapable of communicating with the base stationcapable of communicating with the base station

    The cell phone may be within more than one boundary,The cell phone may be within more than one boundary,however it communicates with the base station fromhowever it communicates with the base station fromwhere the signal is strongerwhere the signal is stronger

    Base stations communicate with a MTSO (MobileBase stations communicate with a MTSO (MobileTelephone Switching Office), which connects to theTelephone Switching Office), which connects to theregular telephone networkregular telephone network

    Receiving a cell call is more complexReceiving a cell call is more complex

  • 8/3/2019 Presentation4-Making Connections Www

    4/61

    44

    CCommunication Carriers &ommunication Carriers &

    DevicesDevicesCellular PhonesCellular Phones

    Figure 4.3 Cellular Grid

  • 8/3/2019 Presentation4-Making Connections Www

    5/61

    55

    CCommunication Carriers &ommunication Carriers &

    DevicesDevicesCellular PhonesCellular Phones

    Figure 4.4 Cellular Phone Communication

  • 8/3/2019 Presentation4-Making Connections Www

    6/61

    66

    CCommunication Carriers &ommunication Carriers &

    DevicesDevicesFacsimile (Fax) MachinesFacsimile (Fax) Machines A paper sheet is divided into a dot matrix; each dotA paper sheet is divided into a dot matrix; each dot (Pixel)(Pixel) is sois so

    tiny (200 dots per inch, 40,000 dots per square inch)tiny (200 dots per inch, 40,000 dots per square inch)

    Each dot is a bit: 1 if dot is white, 0 if blackEach dot is a bit: 1 if dot is white, 0 if black

    8.5x11 inches paper would produce 3,740,000 dots, and it takes8.5x11 inches paper would produce 3,740,000 dots, and it takes

    2 minutes (approx.) at the rate of 33.6 bps2 minutes (approx.) at the rate of 33.6 bps

    Fax machines useFax machines useData CompressionData Compression schemes; instead ofschemes; instead of

    sending dot by dot, the fax groups the dots and defines binarysending dot by dot, the fax groups the dots and defines binary

    representation of them using fewer bitsrepresentation of them using fewer bits

  • 8/3/2019 Presentation4-Making Connections Www

    7/61

    77

    TTransmissionransmission ModesModes Defines the way in which a bit group travels fromDefines the way in which a bit group travels from

    device to anotherdevice to another

    Also defines whether bits travel in both directionsAlso defines whether bits travel in both directions

    simultaneously or must take turnssimultaneously or must take turns

    Different transmission modes exist:Different transmission modes exist:

    Serial & ParallelSerial & Parallel Asynchronous, Synchronous & IsochronousAsynchronous, Synchronous & Isochronous

    Simplex, HalfSimplex, Half--Duplex & FullDuplex & Full--DuplexDuplex

  • 8/3/2019 Presentation4-Making Connections Www

    8/61

    88

    TTransmissionransmission ModesModes (continue...)(continue...)Serial & Parallel TransmissionSerial & Parallel Transmission

    Parallel transmission sends bits of a byteParallel transmission sends bits of a bytesimultaneously on separate wires; used between PCsimultaneously on separate wires; used between PCand printerand printer

    Only recommended for short distances due to syncOnly recommended for short distances due to syncproblemsproblems

    Serial transmission uses one wire, and can be used forSerial transmission uses one wire, and can be used forlong distance communication; cheaper, more reliablelong distance communication; cheaper, more reliable

    but slowerbut slower

    Figure 4.7 Parallel & Serial transmission

  • 8/3/2019 Presentation4-Making Connections Www

    9/61

    99

    TTransmissionransmission ModesModes (continue...)(continue...)Asynchronous, Synchronous & Isochronous TransmissionAsynchronous, Synchronous & Isochronous Transmission

    These are ways to provide serial communicationThese are ways to provide serial communication

    Asynchronous transmission:Asynchronous transmission:

    Bits are divided into small groups, usually bytes, and sent independentlyBits are divided into small groups, usually bytes, and sent independently

    The receiver never knows when the bits will arriveThe receiver never knows when the bits will arrive

    For example, typing keyboard charactersFor example, typing keyboard characters

    TypicalTypical bytebyte--oriented inputoriented input--outputoutput; that is data is transmitted one byte at; that is data is transmitted one byte at

    a timea time

    AAstart bitstart bitis needed to alert the receive that some data is coming;is needed to alert the receive that some data is coming;

    otherwise the first few bit may get lost by the time the receiver detect andotherwise the first few bit may get lost by the time the receiver detect andreacts to data receptionreacts to data reception

    Similarly, aSimilarly, astop bitstop bitis neededis needed

  • 8/3/2019 Presentation4-Making Connections Www

    10/61

    1010

    TTransmissionransmission ModesModes (continue...)(continue...)Asynchronous, Synchronous & Isochronous TransmissionAsynchronous, Synchronous & Isochronous Transmission

    Figure 4.8 Asynchronous CommunicationOverhead is 2/8 = 25%

    Figure 4.9 Asynchronous Transmission of

    ASCII Digits 321 using NRZ Coding

  • 8/3/2019 Presentation4-Making Connections Www

    11/61

    1111

    TTransmissionransmission ModesModes (continue...)(continue...)Asynchronous, Synchronous & Isochronous TransmissionAsynchronous, Synchronous & Isochronous Transmission Synchronous transmission:Synchronous transmission:

    Allows transmission of larger bit groupsAllows transmission of larger bit groups

    Characters are grouped into aCharacters are grouped into a Data FrameData Frame (simply(simply FrameFrame) them be transmitted) them be transmittedas a wholeas a whole

    A generic data frame has the following pieces:A generic data frame has the following pieces:

    SYNSYN: unique bit pattern that alert the receiver of frame arrival: unique bit pattern that alert the receiver of frame arrival

    Also used to ensure the receivers sampling rate and the consistency of the arrival rateAlso used to ensure the receivers sampling rate and the consistency of the arrival rate

    The receiver can then synchronize itself to the rate at which bits arriveThe receiver can then synchronize itself to the rate at which bits arrive

    ControlControl: these bits may include the following elements: these bits may include the following elements

    Source addressSource address

    Destination addressDestination address: Needed if frame needs to go through different nodes before reaching: Needed if frame needs to go through different nodes before reachingthe destinationthe destination

    DataData: Actual number of data bytes: Actual number of data bytes

    SequenceNumberSequenceNumber: Used to assemble frames at the destination in case they arrive out: Used to assemble frames at the destination in case they arrive outof orderof order

    Frame TypeFrame Type: Distinguished by some protocols: Distinguished by some protocols

    ErrorError: Error checking bits: Error checking bits

    EndEnd: End: End--ofof--frame bitsframe bits

  • 8/3/2019 Presentation4-Making Connections Www

    12/61

    1212

    TTransmissionransmission ModesModes (continue...)(continue...)Asynchronous, Synchronous & Isochronous TransmissionAsynchronous, Synchronous & Isochronous Transmission Synchronous transmission:Synchronous transmission:

    Much faster and has small overhead, howeverMuch faster and has small overhead, however

    Larger frames require higher buffering; they may also occupy the link forLarger frames require higher buffering; they may also occupy the link forlonger timelonger time

    Figure 4.10 Synchronous Transmission Frame

  • 8/3/2019 Presentation4-Making Connections Www

    13/61

    1313

    TTransmissionransmission ModesModes (continue...)(continue...)Asynchronous, Synchronous & Isochronous TransmissionAsynchronous, Synchronous & Isochronous Transmission

    Isochronous transmission:Isochronous transmission:

    With asynchronous & synchronous data do not necessarilyWith asynchronous & synchronous data do not necessarily

    arrive at a fixed ratearrive at a fixed rate

    Time between different synchronous frames may varyTime between different synchronous frames may vary

    (asynchronous nature!)(asynchronous nature!)

    Errors may force the frame to be reset, which affects theErrors may force the frame to be reset, which affects the

    transfer rate furthertransfer rate further

    For some applications, such as file transfer, that is fine sinceFor some applications, such as file transfer, that is fine sincecorrect information is more important than delayscorrect information is more important than delays

    Isochronous transmission is used to ensure a fixedIsochronous transmission is used to ensure a fixed

    transmission rate without gaps in betweentransmission rate without gaps in between

  • 8/3/2019 Presentation4-Making Connections Www

    14/61

    1414

    TTransmissionransmission ModesModes (continue...)(continue...)Simplex, HalfSimplex, Half--Duplex & FullDuplex & Full--Duplex CommunicationDuplex Communication

    Figure 4.11 Simplex, HalfSimplex, Half--Duplex & FullDuplex & Full--DuplexDuplex communication

  • 8/3/2019 Presentation4-Making Connections Www

    15/61

    1515

    IInterface Standardnterface Standard Communication may not occur even if both parties are using the same mechanisms!Communication may not occur even if both parties are using the same mechanisms!

    For example, if both send at the same time, no information may reach any of themFor example, if both send at the same time, no information may reach any of them ififone is not ready to listen then information is also lostone is not ready to listen then information is also lost

    Hence, communication must be guided by protocolsHence, communication must be guided by protocols

    Data Terminal EquipmentData Terminal Equipment ((DTEDTE), such as PCs, do not communicate directly; rather), such as PCs, do not communicate directly; ratherthey communicate tothey communicate to Data Communication EquipmentData Communication Equipment ((DCEDCE), such as a modem,), such as a modem,which connect to the networkwhich connect to the network

    The connection between

    DTE &

    DCE is called

    The connection between

    DTE &

    DCE is called

    DTE

    DTE--

    DCE Interface

    DCE Interface

    Figure 4.12 DTE-DCE Interface

  • 8/3/2019 Presentation4-Making Connections Www

    16/61

    1616

    IInterface Standardnterface Standard (continue...)(continue...)EIA

    EIA

    --232 Interface (RS

    232 Interface (RS

    --25S

    erial25S

    erialPort)Port)

    RS232: 25RS232: 25--line cable withline cable with

    2525--pin connector (DB25).pin connector (DB25).

    Every line has a function;Every line has a function;

    for example:for example:

    Pin 1: protective groundPin 1: protective ground

    Pin 2: Transmit date DTEPin 2: Transmit date DTE

    DCEDCE

    Pin 22: Ring Indicator;Pin 22: Ring Indicator;

    indicates DCE is receivingindicates DCE is receiving

    a ringing signal (whena ringing signal (when

    modem receives a call)modem receives a call)

    RS-232 Connector

  • 8/3/2019 Presentation4-Making Connections Www

    17/61

    1717

    IInterface Standardnterface Standard (continue...)(continue...)EIAEIA--232 Interface (RS232 Interface (RS--232 Serial Port)232 Serial Port)

    Figure 4.14 Sending & Receiving over RS-232

  • 8/3/2019 Presentation4-Making Connections Www

    18/61

    1818

    IInterface Standardnterface Standard (continue...)(continue...)EIAEIA--232 Subset232 Subset Driven by economicsDriven by economics

    and actual user needs,and actual user needs,

    some vendors onlysome vendors only

    implemented a part ofimplemented a part ofthe interface usingthe interface using

    only 9 circuits insteadonly 9 circuits instead

    of 25 (9of 25 (9--binbin

    connectors)connectors)

    RS-232 Subset 9-bin Connector

  • 8/3/2019 Presentation4-Making Connections Www

    19/61

    1919

    IInterface Standardnterface Standard (continue...)(continue...)Null ModemNull Modem

    Sometimes, it is needed to connect two computers directlySometimes, it is needed to connect two computers directly

    A first attempt to establish connection is plug in the wire to both endsA first attempt to establish connection is plug in the wire to both ends

    This however wont work; Why?This however wont work; Why?

    Same circuit in each end is expected to perform the same functionality; forSame circuit in each end is expected to perform the same functionality; forexample send/send or receive/receiveexample send/send or receive/receive

    One solution in such case is to use a null modemOne solution in such case is to use a null modem

    The null modem can be simply a cableThe null modem can be simply a cable

    Figure 4.15 Null Modem

  • 8/3/2019 Presentation4-Making Connections Www

    20/61

  • 8/3/2019 Presentation4-Making Connections Www

    21/61

    2121

    IInterface Standardnterface Standard (continue...)(continue...)X.21 InterfaceX.21 Interface

    Figure 4.16 Sending & Receiving over an X.21 Connection

  • 8/3/2019 Presentation4-Making Connections Www

    22/61

    2222

    IInterface Standardnterface Standard (continue...)(continue...)Universal Serial BusUniversal Serial Bus ((USB)USB) Not long ago, we had to deal with Serial ports, Parallel ports,Not long ago, we had to deal with Serial ports, Parallel ports,

    Special connections for Game controllers, KeySpecial connections for Game controllers, Key--boards, Mice,boards, Mice,

    etc.etc.

    USB was the proper replacements to those many connectorsUSB was the proper replacements to those many connectors

    Very flexible in connecting many different devicesVery flexible in connecting many different devices

    Has 7Has 7--bit addressing schemes to reference the devices, whichbit addressing schemes to reference the devices, which

    enables connections to 127 (excluding the DTE host itself)enables connections to 127 (excluding the DTE host itself)

  • 8/3/2019 Presentation4-Making Connections Www

    23/61

    2323

    IInterface Standardnterface Standard (continue...)(continue...)U

    niversalS

    erial BusU

    niversalS

    erial Bus((USB)USB)

    Figure 4.17 Connecting USB Devices

  • 8/3/2019 Presentation4-Making Connections Www

    24/61

    2424

    IInterface Standardnterface Standard (continue...)(continue...)

    Universal Serial BusUniversal Serial Bus ((USB)USB)

    USB cable contains 4 wires:USB cable contains 4 wires:2 wires for data carrying2 wires for data carryingsignal in modified NRZ (0signal in modified NRZ (0

    changing, 1 same)changing, 1 same) The other two wires provideThe other two wires provide

    lowlow--amplitude power sourceamplitude power sourceto USB devicesto USB devices

    USB 1.1 at 12 Mbps, USBUSB 1.1 at 12 Mbps, USB2.0 at 480 Mbps.2.0 at 480 Mbps.

    Limited to 4.5 meters; ifLimited to 4.5 meters; iflonger, there is no guaranteelonger, there is no guaranteeof electrical signal integrityof electrical signal integrity

    Figure 4.19 USB Cable & Plugs

    Figure 4.18 USB Wires

  • 8/3/2019 Presentation4-Making Connections Www

    25/61

    2525

    IInterface Standardnterface Standard (continue...)(continue...)U

    niversalS

    erial BusU

    niversalS

    erial Bus ((USB

    )USB

    ) Operates on Master/Slave mode, where the host is the masterOperates on Master/Slave mode, where the host is the master

    USBFrameUSBFrame: 1: 1--milisecond slice of time.milisecond slice of time.

    During this 1During this 1--ms time frame,ms time frame,packetspackets are sent (packet is a groupare sent (packet is a groupof bits)of bits)

    All devices are clock synchronized in respect to a frameAll devices are clock synchronized in respect to a frame

    The synchronization isThe synchronization is notnotdone by a common clock; rather bydone by a common clock; rather bythe host sending a special packet at the beginning of each framethe host sending a special packet at the beginning of each frame

    This special packet indicates that a new frame is beginningThis special packet indicates that a new frame is beginning

  • 8/3/2019 Presentation4-Making Connections Www

    26/61

    2626

    IInterface Standardnterface Standard (continue...)(continue...)Universal Serial BusUniversal Serial Bus ((USB)USB) USB defines 4 different transmission types:USB defines 4 different transmission types:

    Control TransferControl Transfer

    Bulk TransferBulkTransfer

    Interrupt TransferInterrupt Transfer

    Isochronous TransferIsochronous Transfer

    Control TransferControl Transfer::

    USB devices areUSB devices are hot pluggablehot pluggable

    Once plugged, the host queries the device to determine its type & bit rateOnce plugged, the host queries the device to determine its type & bit rate

    The devices respondsThe devices responds the host assigns an address to that devicethe host assigns an address to that device

    Once this is done, the device is connected and can receive commandsOnce this is done, the device is connected and can receive commands

    from the host such as requesting their status or initiating data exchangefrom the host such as requesting their status or initiating data exchange

  • 8/3/2019 Presentation4-Making Connections Www

    27/61

  • 8/3/2019 Presentation4-Making Connections Www

    28/61

    2828

    IInterface Standardnterface Standard (continue...)(continue...)Universal Serial BusUniversal Serial Bus ((USB)USB) Interrupt TransferInterrupt Transfer::

    The worldThe world interruptinterrupthere is not that proper!here is not that proper!

    USB devices hold the information until the host asks for them, which isUSB devices hold the information until the host asks for them, which is

    literallyliterally PollingPolling

    The major advantage here is avoiding the complexity involved with theThe major advantage here is avoiding the complexity involved with the

    interrupt system/protocolinterrupt system/protocol

    For example, if the host sets its polling time to the keyboard at 50 framesFor example, if the host sets its polling time to the keyboard at 50 frames

    (each 50 ms), then it can get up to 20 characters each second(each 50 ms), then it can get up to 20 characters each second

  • 8/3/2019 Presentation4-Making Connections Www

    29/61

  • 8/3/2019 Presentation4-Making Connections Www

    30/61

    3030

    IInterface Standardnterface Standard (continue...)(continue...)Universal Serial BusUniversal Serial Bus ((USB)USB) USB PacketsUSB Packets

    Several exchange of packets could take place during a singleSeveral exchange of packets could take place during a single

    frameframe

    Packet types:Packet types: TokenToken,,DataData,,HandshakeHandshake All packets haveAll packets have SYNSYNandand PIDPID (packet ID)(packet ID)

    SYNSYN is a bit pattern that forces the receiving device tois a bit pattern that forces the receiving device to

    synchronize its clock with the sender and adjust theirsynchronize its clock with the sender and adjust their

    receiving bit ratereceiving bit rate

    PIDPID identifies the packet typeidentifies the packet type SOFSOF indicates the Start o Frameindicates the Start o Frame

  • 8/3/2019 Presentation4-Making Connections Www

    31/61

    3131

    IInterface Standardnterface Standard (continue...)(continue...)Universal Serial BusUniversal Serial Bus ((USB)USB) USB PacketsUSB Packets

    ININ&& OUTOUTpackets represent a request from the host to initiate datapackets represent a request from the host to initiate data

    transfertransfer

    AddressAddress is a 7is a 7--bit address that identifies the device to be usedbit address that identifies the device to be used

    CRCCRC(Cyclic Redundancy Check) is used for error detection(Cyclic Redundancy Check) is used for error detection If errors occur, aIf errors occur, a NAKNAKis sent to the hostis sent to the host

    Some devices may have more than one address; for example a gameSome devices may have more than one address; for example a game

    controller with multiple buttons would have multiple addresses associatedcontroller with multiple buttons would have multiple addresses associated

    with them. Thewith them. The endpointendpointis needed to identify the exact source oris needed to identify the exact source or

    destination of the data within the device.destination of the data within the device.

    For example, a game controller may have many buttons sending orFor example, a game controller may have many buttons sending orreceiving different information. Each of these buttons will be indicated byreceiving different information. Each of these buttons will be indicated by

    an endpointan endpoint

  • 8/3/2019 Presentation4-Making Connections Www

    32/61

  • 8/3/2019 Presentation4-Making Connections Www

    33/61

    3333

    IInterface Standardnterface Standard (continue...)(continue...)FireWireFireWire FireWire (Apple), i.Link (Sony)FireWire (Apple), i.Link (Sony)

    Share common characteristics with USBShare common characteristics with USB

    Provide a speed of 400Mbps (USB provides 12Mbps, USB 2.0Provide a speed of 400Mbps (USB provides 12Mbps, USB 2.0

    provides 480 Mbpsprovides 480 Mbps Can be used with many devices, but the main focus is onCan be used with many devices, but the main focus is on

    multimedia devices, especially with digital video applicationmultimedia devices, especially with digital video application

    Connects multiple devices usingConnects multiple devices usingDaisy ChainDaisy Chain, which means, which means

    many devices can be connected in sequence and there is no needmany devices can be connected in sequence and there is no need

    for a hubfor a hub

    Devices have one or more FireWire port, so they can also act asDevices have one or more FireWire port, so they can also act as

    regenerators/repeatersregenerators/repeaters

  • 8/3/2019 Presentation4-Making Connections Www

    34/61

    3434

    IInterface Standardnterface Standard (continue...)(continue...)FireWireFireWire

    Figure 4.21 Connecting FireWire Devices

  • 8/3/2019 Presentation4-Making Connections Www

    35/61

    3535

    IInterface Standardnterface Standard (continue...)(continue...)F

    ireWireF

    ireWire Uses 6 wires (2 twisted pairsUses 6 wires (2 twisted pairs TPATPA && TPBTPB + 2 wires for power+ 2 wires for power

    source)source)

    UsesUses Data Strobe EncodingData Strobe Encoding

    TPA uses some form of NRZ, where 1 is high, 0 is lowTPA uses some form of NRZ, where 1 is high, 0 is low

    This is however errorThis is however error--prone due to misprone due to mis--synchronization with the sendersynchronization with the senderclockclock

    The sender sends a strobe signal overTPB, which stays constantThe sender sends a strobe signal overTPB, which stays constantwhenever the data change from 1 to 0 and vise versawhenever the data change from 1 to 0 and vise versa

    The receiver gets both TPA& TPB signals and by XORing them, it canThe receiver gets both TPA& TPB signals and by XORing them, it cancreate the exact sender clockcreate the exact sender clock

    This is a bit like Manchester Encoding, with one great difference; theThis is a bit like Manchester Encoding, with one great difference; thebaud rate is the same as the bit rate, so there is no double BW utilizationbaud rate is the same as the bit rate, so there is no double BW utilization

    The only cost here is one additional twisted pairThe only cost here is one additional twisted pair

  • 8/3/2019 Presentation4-Making Connections Www

    36/61

    3636

    IInterface Standardnterface Standard (continue...)(continue...)FireWireFireWire

    Figure 4.22 Data Strobe Encoding

  • 8/3/2019 Presentation4-Making Connections Www

    37/61

    3737

    IInterface Standardnterface Standard (continue...)(continue...)Multiple

    FireWire BusesMultipleF

    ireWire Buses USB uses Master/Slave protocol whereas FireWire usesUSB uses Master/Slave protocol whereas FireWire uses peerpeer--toto--

    peerpeerprotocolprotocol

    Devices may be daisy chained together to form aDevices may be daisy chained together to form a bus groupbus group

    Figure 4.23 Multiple FireWire Buses

  • 8/3/2019 Presentation4-Making Connections Www

    38/61

    3838

    IInterface Standardnterface Standard (continue...)(continue...)Multiple FireWire BusesMultiple FireWire Buses FireWire supports two communication modes:FireWire supports two communication modes:

    Asynchronous, IsochronousAsynchronous, Isochronous

    Asynchronous Communication:Asynchronous Communication:

    Involves exchange & acknowledgmentInvolves exchange & acknowledgment

    Send a packetSend a packet Wait for a ACK or NACKWait for a ACK or NACK

    IsochronousTransfer:IsochronousTransfer: With this mode, FireWire guarantee that data is sent at aWith this mode, FireWire guarantee that data is sent at a

    steady rate; there is no waiting forACKs or resending ofsteady rate; there is no waiting forACKs or resending of

    packetspackets

  • 8/3/2019 Presentation4-Making Connections Www

    39/61

    3939

    IInterface Standardnterface Standard (continue...)(continue...)F

    ireWireA

    rbitrationF

    ireWireA

    rbitration Since there is noSince there is no mastermasterhost, what happens if two deviceshost, what happens if two devices

    attempt to send at the same timeattempt to send at the same time

    Devices are configured in a tree hierarchy, with one device at theDevices are configured in a tree hierarchy, with one device at the

    root; each device selects an ID based on its location in the treeroot; each device selects an ID based on its location in the tree

    The root device acts an arbiter; when devices under it wish toThe root device acts an arbiter; when devices under it wish to

    transfer, the root decides which one gets the bus based on sometransfer, the root decides which one gets the bus based on some

    form of priorityform of priority

    This process is only part of the arbitration, and it works withThis process is only part of the arbitration, and it works with

    some arbitration methods:some arbitration methods:

    Fairness Arbitration, andFairness Arbitration, and

    Urgent ArbitrationUrgent Arbitration

  • 8/3/2019 Presentation4-Making Connections Www

    40/61

  • 8/3/2019 Presentation4-Making Connections Www

    41/61

    4141

    IInterface Standardnterface Standard (continue...)(continue...)FireWireArbitrationFireWireArbitration

    Figure 4.23 FireWire Arbitration

  • 8/3/2019 Presentation4-Making Connections Www

    42/61

    4242

    MMultiplexingultiplexing It is possible to connect each device of a networkIt is possible to connect each device of a networkdirectly to that network, however each of thesedirectly to that network, however each of these

    connection carries its costconnection carries its cost

    Alternatively, multiplexing can be usedAlternatively, multiplexing can be used

    A multiplexer, orA multiplexer, ormuxmux, routes transmission from, routes transmission frommultiple sources to a single destinationmultiple sources to a single destination

    Multiplexer

  • 8/3/2019 Presentation4-Making Connections Www

    43/61

    4343

    MMultiplexingultiplexing (continue...)(continue...)F

    requencyF

    requency--D

    ivision Multiplexing (FD

    M)D

    ivision Multiplexing (FD

    M) Used with analog signals; a common uses are TV & radioUsed with analog signals; a common uses are TV & radio

    The available BW is divided into separate ranges or channelsThe available BW is divided into separate ranges or channels

    Each device shares a part of the available BW, a channel, andEach device shares a part of the available BW, a channel, and

    keeps that portion at all timeskeeps that portion at all times

    Figure 4.27 Amplitude Modulation

  • 8/3/2019 Presentation4-Making Connections Www

    44/61

    4444

    MMultiplexingultiplexing (continue...)(continue...)F

    requencyF

    requency--D

    ivision MultiplexingD

    ivision Multiplexing The modulated signals from all inputs are combinedThe modulated signals from all inputs are combined

    into as a single, more complex analog signalinto as a single, more complex analog signal

    The channels themselves are separated by aThe channels themselves are separated by a guardguard

    bandband

    Figure 4.29 FDM

  • 8/3/2019 Presentation4-Making Connections Www

    45/61

  • 8/3/2019 Presentation4-Making Connections Www

    46/61

    4646

    MMultiplexingultiplexing (continue...)(continue...)Statistical TimeStatistical Time--Division MultiplexingDivision Multiplexing

    In practice, it may not be possible to keep input & output rates the sameIn practice, it may not be possible to keep input & output rates the same

    Keeping the frame size fixed would simply the protocol but underutilize theKeeping the frame size fixed would simply the protocol but underutilize thechannelschannels

    An alternative is to use Statistical Multiplexer, sometimes calledAn alternative is to use Statistical Multiplexer, sometimes calledConcentratorConcentrator

    Since the order in one frame is not the guaranteed, a more complex logic isSince the order in one frame is not the guaranteed, a more complex logic isthere to resolve the frame correctlythere to resolve the frame correctly

    Figure 4.31 Statistical TDM

  • 8/3/2019 Presentation4-Making Connections Www

    47/61

    4747

    MMultiplexingultiplexing (continue...)(continue...)

    WaveWave--Division MultiplexingDivision Multiplexing

    Similar to FDM, but based onSimilar to FDM, but based onopticsoptics Potential bit rate is 1000Potential bit rate is 1000Gbps (Tera bps)Gbps (Tera bps)

    Light consists of severalLight consists of several

    wavelengths (refer to spectrum ofwavelengths (refer to spectrum offrequencies)frequencies)

    Prism spreads the light intoPrism spreads the light intodifferent colors (to differentdifferent colors (to differentwavelengths)wavelengths)

    Each source can operate at aEach source can operate at aspecific wavelengthspecific wavelength

    All signals are combinedAll signals are combined

    before transmission, andbefore transmission, and

    separated at the receiverseparated at the receiver

    Figure 4.32 Light Reflecting through a Prism

    Figure 4.33 Wave-Division Multiplexing

  • 8/3/2019 Presentation4-Making Connections Www

    48/61

    4848

    DDigital Carriersigital CarriersT1T1 A standard used for longA standard used for long--distance communicationdistance communication

    Uses TDM to combine many voice channels into oneUses TDM to combine many voice channels into oneDS1DS1 frameframe

    T1T1 refers to the circuit,refers to the circuit,DS1DS1 refers to the signalrefers to the signal

    DS1 frame has 24 channels of 8 bits each, and one framing bitDS1 frame has 24 channels of 8 bits each, and one framing bitfor synchronizationfor synchronization

    Figure 4.34 DS1 Frame

  • 8/3/2019 Presentation4-Making Connections Www

    49/61

    4949

    DDigital Carriersigital Carriers (continue...)(continue...)T1T1 88--bit voice samples are taken from each of the 24 channels at abit voice samples are taken from each of the 24 channels at a

    rate of 8000 samples per secondrate of 8000 samples per second

    Each sample occupies one slot in the DS1 frameEach sample occupies one slot in the DS1 frame

    The receiving mux extract the bits from each slot and route themThe receiving mux extract the bits from each slot and route them

    to the appropriate destination (the voice is heard at the otherto the appropriate destination (the voice is heard at the otherside)side)

    Figure 4.34 T1 Carrier System

  • 8/3/2019 Presentation4-Making Connections Www

    50/61

    5050

    DDigital Carriersigital Carriers (continue...)(continue...)T1T1

    T1 rate:T1 rate: 88--bit sample * 8000 samples/secondbit sample * 8000 samples/second 64 Kbps64 Kbps

    To support this rate, T1 must transmit a DS1 frame each 1/8000 secondsTo support this rate, T1 must transmit a DS1 frame each 1/8000 seconds must transmit 8000 * 193 bits each secondmust transmit 8000 * 193 bits each second

    Date rate of 1.544 MbpsDate rate of 1.544 Mbps

    This rate is considered slow compared to optical fiber capabilitiesThis rate is considered slow compared to optical fiber capabilities

    That is the reason there are other carriers with more channels and faster bitThat is the reason there are other carriers with more channels and faster bitraterate

    T1 is not only used for voice communication; other companies lease phoneT1 is not only used for voice communication; other companies lease phonelines to transfer digital information between computerslines to transfer digital information between computers

    North American Communication Carriers

    Carrier Digital Signal No. No. of Channels Bit Rate, MbpsT1 DS1 24 1.544

    T2 DS2 96 6.312

    T3 DS3 672 44.736

    T4 DS4 4,032 274.176

  • 8/3/2019 Presentation4-Making Connections Www

    51/61

    5151

    CContention Protocolsontention Protocols Access to the medium from many entry points is called contentionAccess to the medium from many entry points is called contention

    Unless controlled, contention may lead to fatal problemsUnless controlled, contention may lead to fatal problems Contention protocols are used to avoid such problemsContention protocols are used to avoid such problems

    Figure 4.39 No Contention Protocol

    Figure 4.40 Stop-and-Go Access Protocol

  • 8/3/2019 Presentation4-Making Connections Www

    52/61

    5252

    CContention Protocolsontention Protocols (continue...)(continue...)Aloha ProtocolsAloha Protocols

    Earliest contention protocol in 1970s by Univ. of Hawaii, calledEarliest contention protocol in 1970s by Univ. of Hawaii, calledPure ALOHAPure ALOHA

    Several stations to central station (Menehune) by radioSeveral stations to central station (Menehune) by radiocommunicationcommunication

    ff11 for broadcast,for broadcast,ff22 (different frequency than(different frequency than ff11) forACK) forACK Any station can transmit; if collision then wait random timeAny station can transmit; if collision then wait random time

    Figure 4.41 Aloha System

  • 8/3/2019 Presentation4-Making Connections Www

    53/61

    5353

    CContention Protocolsontention Protocols (continue...)(continue...)Slotted Aloha ProtocolsSlotted Aloha Protocols

    Any overlap in signals, even a small one, would forceAny overlap in signals, even a small one, would forceretransmissionretransmission

    Hence, a minimal safe period to transmit two signals is 2T (T isHence, a minimal safe period to transmit two signals is 2T (T istime period)time period)

    So, to allow a device to transmit, you should reserve 2T for thatSo, to allow a device to transmit, you should reserve 2T for that

    Not to waste such time, Slotted Aloha is usedNot to waste such time, Slotted Aloha is used

    Devices can only send at the beginning of each slotDevices can only send at the beginning of each slot

    Figure 4.42 Transmission Using Pure Aloha & Slotted Aloha

  • 8/3/2019 Presentation4-Making Connections Www

    54/61

    5454

    CContention Protocolsontention Protocols (continue...)(continue...)

    Slotted Aloha ProtocolsSlotted Aloha Protocols SlottedAloha has a higher success rate than Pure AlohaSlottedAloha has a higher success rate than Pure Aloha

    However, with increased traffic, the different may notHowever, with increased traffic, the different may not

    be that significantbe that significant

    Figure 4.43 Success Rate for Pure Aloha & Slotted Aloha

  • 8/3/2019 Presentation4-Making Connections Www

    55/61

  • 8/3/2019 Presentation4-Making Connections Www

    56/61

    5656

    CContention Protocolsontention Protocols (continue...)(continue...)C

    ollisionD

    etection (CD

    )C

    ollisionD

    etection (CD

    ) Instead of sending entire frame then discover that collision hasInstead of sending entire frame then discover that collision has

    occurred when no ack is received, sense the medium for collisionoccurred when no ack is received, sense the medium for collision

    and stop transmitting if occursand stop transmitting if occurs

    This will avoid the medium from being unusable during collisionThis will avoid the medium from being unusable during collision

    Commonly used with CSMACommonly used with CSMA called CSMA/CDcalled CSMA/CD

    Figure 4.45

    Collision with and without Detection

  • 8/3/2019 Presentation4-Making Connections Www

    57/61

    5757

    CContention Protocolsontention Protocols (continue...)(continue...)

    CollisionDetection (CD)CollisionDetection (CD) Two issues worth considering:Two issues worth considering:

    Frame sizeFrame size

    DistanceDistance

    Frame Size:Frame Size:

    The frame has to be of a minimum size so the device canThe frame has to be of a minimum size so the device can

    detect collision before it finishesdetect collision before it finishes

    If too large, a device can monopolize the mediumIf too large, a device can monopolize the medium

    So, how small should a frame be?So, how small should a frame be?

    Depends on the maximum time it takes to detect collisionDepends on the maximum time it takes to detect collision

  • 8/3/2019 Presentation4-Making Connections Www

    58/61

    5858

    CContention Protocolsontention Protocols (continue...)(continue...)Collision Detection (CD)Collision Detection (CD)

    Example:Example:Assume:Assume:

    10 Mbps bit rate,10 Mbps bit rate,

    Largest distance between two devicesis 2 KMLargest distance between two devicesis 2 KM

    Signalpropagate at a rate of200 meter/Signalpropagate at a rate of200 meter/secsec

    To propagate 2 KM it takes 10To propagate 2 KM it takes 10secsec

    To propagate 4 KM (worst case, go & come back), we need 20To propagate 4 KM (worst case, go & come back), we need 20secsec

    Rate of 10 Mbps is the same as 10 bits eachRate of 10 Mbps is the same as 10 bits eachsecsec

    In 20In 20secsecwe have 200 bits or 200/8 = 25 byteswe have 200 bits or 200/8 = 25 bytes

    This is the minimum size a frame can be so CD can be madeThis is the minimum size a frame can be so CD can be made

  • 8/3/2019 Presentation4-Making Connections Www

    59/61

    5959

    CContention Protocolsontention Protocols (continue...)(continue...)Collision Detection (CD)Collision Detection (CD)

    The other issue with CD isThe other issue with CD is distancedistance

    For exampleFor example CDCD does not work well with satellite since the timedoes not work well with satellite since the timeneeded to travel back and forth between ground and satellite isneeded to travel back and forth between ground and satellite istoo big due to the large distancetoo big due to the large distance

    Binary exponential backBinary exponential back--off algorithmoff algorithm

    Varies the waiting time before sending again if collision occurredVaries the waiting time before sending again if collision occurred

    If first collision then wait 0, or 1 slotsIf first collision then wait 0, or 1 slots

    Second collision then wait randomly for 0, 1, 2, or 3 slotsSecond collision then wait randomly for 0, 1, 2, or 3 slots

    ....................................................

    ....

    IfIfnn successive collisions then wait for random # of slots between 0 andsuccessive collisions then wait for random # of slots between 0 and22nn--1, when n > 16 give1, when n > 16 give--up and signal to higher layer!up and signal to higher layer!

  • 8/3/2019 Presentation4-Making Connections Www

    60/61

    6060

    CContention Protocolsontention Protocols (continue...)(continue...)Token PassingToken Passing

    Instead of sending whenever it wishes, a device will take turns inInstead of sending whenever it wishes, a device will take turns insending with the other onessending with the other ones

    Capture token to send data frameCapture token to send data frame

    If data then remove token and transmit data frame; else passIf data then remove token and transmit data frame; else passtoken to neighbortoken to neighbor

    Only sender can put the token back on ring after receiving itOnly sender can put the token back on ring after receiving itbackback

    One frame per tokenOne frame per token

    Advantage: contention is much controlled than the previousAdvantage: contention is much controlled than the previousprotocolsprotocols

    Disadvantages:Disadvantages: All devices must be knownAll devices must be known

    Complexity (what happen if the token is lost or if the device that hasComplexity (what happen if the token is lost or if the device that hascontrol over it fails)control over it fails)

  • 8/3/2019 Presentation4-Making Connections Www

    61/61

    CContention Protocolsontention Protocols (continue...)(continue...)

    Token PassingToken Passing

    6


Recommended