Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS415 Minithreads Project 4 Overview Adrian Bozdog (Adi)

Similar presentations


Presentation on theme: "CS415 Minithreads Project 4 Overview Adrian Bozdog (Adi)"— Presentation transcript:

1 CS415 Minithreads Project 4 Overview Adrian Bozdog (Adi) adrianb@cs.cornell.edu

2 CS414 Minithreads overview2 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 CS414 Minithreads overview3 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 CS414 Minithreads overview4 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 CS414 Minithreads overview5 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 CS414 Minithreads overview6 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 CS414 Minithreads overview7 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) Network UDP-like protocol TCP-like protocol User application

8 CS414 Minithreads overview8 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 CS414 Minithreads overview9 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 CS414 Minithreads overview10


Download ppt "CS415 Minithreads Project 4 Overview Adrian Bozdog (Adi)"

Similar presentations


Ads by Google