Accompanying slides for Project 5

Download Report

Transcript Accompanying slides for Project 5

CS415
Minithreads Project 5
Overview
Adrian Bozdog (Adi)
[email protected]
What you have to do
 Implement Ad-hoc networking layer
 a version of Dynamic Source Routing alg
 Communication layers should use
miniroute_send_pkt instead of network_send_pkt
 Routing layer can use network_send_pkt
 A new network_handler routine should deal with all
packets
 There may be packets (control routing packets, packets for
other machines) that are not for the current machine
 Forwards packets that contain data for the current machine
to the old network handler
CS414 Minithreads overview
2
Routing layer
 Data may be sent through intermediate
nodes
 A source uses a routing path to every
destination
 Processes three types of routing packets:
 Data packets
 Route Discovery packets
 Route Reply packets
CS414 Minithreads overview
User application
TCP-like protocol
UDP-like protocol
Routing
3
Network
Routing packets (1)
 Data packets:
 Contain the path to the destination
 The intermediate nodes should not involve communication
layers (i.e TCP, UDP layers)
 Route Discovery packets:
 Establish routes from sources to destinations
 Flood the network until the destination is reached
 Every packet is flooded for at most MAX_ROUTE_LENGTH – 1
 Every machine adds itself to the route path before
broadcasting the network
CS414 Minithreads overview
4
Routing packets (2)
 Route Reply packets:
 Used to give route information to the sources
 Send by destinations back to the sources
 Flooded through the network until they are
broadcasted MAX_ROUTE_LENGTH times or
reach the sources
 Do not change the routes established by the
Route Discovery packets
CS414 Minithreads overview
5
Routing cache
 Avoid discovering a route to the destination
for every sent packet
 Keeps SIZE_OF_ROUTE_CACHE routes to
destinations
 A cached route is used only if it is not older
than 3 seconds
 Otherwise run the route discovery protocol to get
the route to destination
CS414 Minithreads overview
6
Code change/addition
 Changes to network.h
 Set BCAST_ENABLED to 1
 Set BCAST_ADDRESS
 192.168.1.255 for ad-hoc network (see instructions for
setting an ad-hoc network)
 x.y.z.255 for CSUGLAB
 For debugging purposes
 Set BCAST_TOPOLOGY_FILE
 Provide a topology file (see project description)
 Used only in CSUGLAB (not on Jornada/Tablets)
 Add miniroute.h and miniroute.c to your
project
CS414 Minithreads overview
7
Implementation hints
 There must be at most a single routing discovery
process for any destination at any time
 Multiple threads should not trigger multiple routing
discovery processes for the same destination
 Only one cache entry for each destination
 Use the route reply packets with the latest
information (use seq_no for this)
 Use the structures and data-types provided in
miniroute.h
 Allow other machines that run other student’s code to
participate in the routing protocol
CS414 Minithreads overview
8
Test Cases
 Use any test from previous steps (project 3
and 4)
 Write new tests reading application data
from the terminal
 Add read.c, read.h and read_private.h
 Include “read_private.h” to minithread.c
 Add miniterm_initialize to minithread_system_initialize
 Test cases should use miniterm_read() to read
data from the terminal
CS414 Minithreads overview
9
Tablets
 Can compile and run tests like CSUGLAB desktops
 Can compile code for Jornada
 Can synchronize with Jornada using ActiveSync
 Run tests between Jornada and the Tablet
 Specify the TCP/IP properties for the Tablet in the
same way as for Jornada for ad-hoc network
 Specify an Ip address based on your group
 Set Subnet Mask to 255.255.255.0
 Set Gateway to 192.168.1.254
 Install the software used to compile code for
Jornada ( see “Tips for running programs on
Jornada” on CMS)
 Install Handheld PC 2000 SDK
CS414 Minithreads overview
10
Project 5 presentation
 Demo slots :
 Tuesday April 15 between 6 and 9 pm
 Wednesday April 16 between 6 and 9 pm
 Every group has a slot of 10 minutes
 A test of my choice
 should be compiled and run between Jornada machines /
Tablet
 should be compiled and run on CSUG desktops
 Set a DEBUG option in the routing layer used to
print information about messages received by the
routing layer
 You can sign for a slot on a sign-up sheet starting
from Thursday afternoon (4119 Upson)
CS414 Minithreads overview
11