1 / 10

CS415 Minithreads Project 4 Overview

CS415 Minithreads Project 4 Overview. Adrian Bozdog (Adi) adrianb@cs.cornell.edu. What you have to do. Implement connection-based reliable communication IP-like/UDP-like/TCP-like protocol Based on the previous implementation Correct implementation

taniaf
Télécharger la présentation

CS415 Minithreads Project 4 Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS415 Minithreads Project 4 Overview Adrian Bozdog (Adi) adrianb@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 =< 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. User application TCP-like protocol UDP-like protocol Network 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)

More Related