ECE155ALecture6

ECE155ALecture6 - Computer Networks Lecture 6 Professor...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Computer Networks Lecture 6 Professor Louise E. Moser Winter 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Elementary Data Link Layer Protocols Unrestricted Simplex Protocol Simplex Stop-and-Wait Protocol Simplex Noisy Channel Protocol, a.k.a., Positive Acknowledgment with Retransmission Protocol, or Alternating Bit Protocol
Background image of page 2
3 Unrestricted Simplex Protocol Assumptions Sender and receiver at NL are always ready Receiver’s processing time is insignificant Receiver’s buffer space is infinite Communication channel never loses or damages frames Data is transmitted in only one direction (simplex) Uses no sequence numbers or acks Only event type frame_arrival
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Unrestricted Simplex Protocol /* Protocol 1 provides data transmission in one direction only, from sender to receiver. The communication channel is assumed to be error free, and the receiver is assumed to be able to process the input infinitely fast. Consequently, the sender just sits in a loop pumping data out onto the line as fast as it can. */ typedef enum {frame_arrival} event_type; #include “protocol.h” void sender1(void) { frame s; /* buffer for an outbound frame */ packet buffer; /* buffer for an outbound packet */ while (true) { /* enter an infinite loop */ from_network_layer(&buffer); /* get something to send */ s.info = buffer; /* copy it into s for transmission */ to_physical_layer(&s); /* send it on its way */ } } Sender From Network Layer to Physical Layer In textbook Fig. 3-10 void receiver1(void) { frame r; event_type event; /* ±lled in by wait, but not used here */ while (true) { /* enter an in±nite loop */ wait_for_event(&event); /* only possibility is frame_arrival */ from_physical_layer(&r); /* get the inbound frame */ to_network_layer(&r.info); /* pass the data to the network layer */ } } Receiver From Physical Layer to Network Layer
Background image of page 4
5 Simplex Stop-and-Wait Protocol Drop Assumption Receiver’s processing time is insignificant or, equivalently, receiver’s input buffer is infinite Main Problem To prevent sender from overwhelming receiver If receiver takes t time units to execute from_physical_layer(); to_network_layer(); sender must not transmit more than one frame per t time units Need flow control
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Simplex Stop-and-Wait Protocol One Solution Restrict sender so it transmits so slowly that, even if frame undergoes max delay, no buffer overflow at receiver Too conservative Better Solution Receiver provides feedback to sender Gives sender permission to send next frame Sender sends frame, waits for ack from receiver Alternates between sender and receiver (half-duplex)
Background image of page 6
7 Simplex Stop-and-Wait Protocol /* Protocol 2 (stop-and-wait) also provides one-directional flow of data from sender to receiver. The communication channel is assumed to be error free, as in protocol 1.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 33

ECE155ALecture6 - Computer Networks Lecture 6 Professor...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online