CS415 Minithreads Project 4 Overview - PowerPoint PPT Presentation

About This Presentation
Title:

CS415 Minithreads Project 4 Overview

Description:

CS415 Minithreads Project 4 Overview Adrian Bozdog (Adi) adrianb_at_cs.cornell.edu – PowerPoint PPT presentation

Number of Views:139
Avg rating:3.0/5.0
Slides: 11
Provided by: Benjami164
Category:

less

Transcript and Presenter's Notes

Title: CS415 Minithreads Project 4 Overview


1
CS415 Minithreads Project 4 Overview
  • Adrian Bozdog (Adi)
  • adrianb_at_cs.cornell.edu

2
What you have to do
  • Implement connection-based reliable communication
  • IP-like/UDP-like/TCP-like protocol
  • Based on the previous implementation
  • Correct implementation
  • Window size may be one (one packet in transit)
  • An application message can have any size (not
    limited by max network datagram size)

3
Reliable communication
  • Set up a connection
  • Packets sent from specific local ports belong to
    the connection
  • Use the connection to send/receive the messages
  • Do not use miniport structures
  • Use minisocket structures
  • Close the connection

4
TCP-like protocol
  • Every packet must be acknowledged by the receiver
  • Ordered packet delivery
  • The sender resends a packet
  • After a specific timeout
  • If it does not receive an ack
  • Implements a handshaking protocol to open a
    connection
  • The client sends an open connection packet to the
    server
  • The server sends an open connection ACK to the
    client
  • The client sends back an ACK to the server

5
TCP implementation details
  • You should cope with packet duplicates
  • Receiver must
  • Keep track of received packets
  • Suppress duplicates of received packets
  • Sender must
  • Suppress duplicates of received ACKs
  • Specific scheme for retransmissions and timeouts
    (see project description)
  • Sender stops sending a packet after 12.7 seconds
    (after 7 retransmissions)

6
Stream-oriented protocol
  • A sender may send a message of any size
  • The sender side fragments large messages into
    several packets
  • Packet size lt MAX_NETWORK_PKT_SIZE
  • Do not preserve message boundaries at the
    receiver
  • Receiver side is not required to wait for all
    pieces of the message
  • See project description

7
Implementation hints
  • Modular-like implementation
  • Do not mix the code for TCP-like protocol and the
    code for UDP-like protocol in the same function
  • Protocols should communicate only using API
    defined in header files
  • TCP-like protocol will use UDP-like protocol
    functionalities (send and receive functions)
  • Any protocol may add its header to a message
    (minimsg and minisocket headers)

8
Implementation hints (2)
  • UDP protocol (minimsg.c) must distinguish the
    type of communication
  • Uses an extra field (type) in its header
  • Define a function in minimsg that will be used to
    send packets for all types of communication (do
    not change API provided e.g minimsg_send
    declaration)
  • Minimsg_send will use the new defined function to
    send a packet
  • A control packet used by the TCP-protocol is not
    received by the application
  • Minithread system
  • uses a function provided by the TCP-protocol to
    process the control packet
  • Does not store the control packet to a port
  • Read hints from the project description

9
Compilation hints
  • Minimsg.h is modified a little bit to avoid
    circular including (use it to compile the code
    properly)
  • Compile the code for Jornada
  • Set the two environment variables on the desktop
    that compile Jornada code (set it once for the
    entire semester)
  • Read tips for compiling and running programs on
    Jornada (see web site)

10
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com