Advanced UNIX programming - PowerPoint PPT Presentation

About This Presentation
Title:

Advanced UNIX programming

Description:

Title: Advanced UNIX progamming Author: asriniva Last modified by: asriniva Created Date: 6/5/2002 8:34:37 PM Document presentation format: On-screen Show – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 9
Provided by: asr53
Learn more at: http://www.cs.fsu.edu
Category:

less

Transcript and Presenter's Notes

Title: Advanced UNIX programming


1
Advanced UNIX programming
  • Fall 2002
  • Instructor Ashok Srinivasan
  • Lecture 27

Acknowledgements The syllabus and power point
presentations are modified versions of those by
T. Baker and X. Yuan
2
Announcements
  • Reading assignment
  • Chapter 20
  • Sections 20.4 and 20.5
  • Chapter 14

3
Week 10 Topics
  • Advanced UDP sockets
  • Reliable communication over UDP
  • Time out
  • Sequence numbers
  • Unix domain protocols
  • Address structure
  • Client-server
  • socketpair

4
Reliable communication over UDP
  • Flow control
  • Error control

5
Flow control
  • Control the speed of the sender
  • If the receiver does not have enough buffer, stop
    sending
  • How do we accomplish this?
  • example1.c and example2.c are primitive UDP
    sender and receiver
  • How can we slow down the sender?
  • Add delay (sleep)
  • example1a.c and example2.c
  • Perform handshaking
  • example1b.c and example2a.c

6
Time out
  • example1b.c and example2a.c resolve the flow
    control problem
  • What will happen if some packet gets lost?
  • example1b.c and example2b.c
  • Solution
  • Add timeout to the sender
  • If a packet gets lost, the sender should timeout
    and resend the packet
  • How can we implement a timeout?
  • See example1c.c and example2b.c

7
Sequence numbers
  • Problems with example1c.c and example2b.c
  • Some packets get duplicated
  • How can we resolve this problem?
  • The receiver must be able to recognize whether it
    has received a packet
  • It should discard the duplicate
  • How can we accomplish this?
  • Add an identifier to each packet sent a
    sequence number
  • The receiver should record sequence numbers that
    is has received
  • example1d.c and example2c.c implement this

8
A reliable protocol
  • Positive Acknowledgement with Retransmission
    (PAR) protocol
  • The protocol implemented in example1d.c and
    example2c.c is PAR
  • A reliable transmission protocol
  • But not the most efficient
  • The network and end hosts are idle sometimes
  • Sliding window protocols improve the performance
    of PAR
Write a Comment
User Comments (0)
About PowerShow.com