Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Code Executes Multiple Times

Posted on 2012-04-02
4
Medium Priority
?
773 Views
Last Modified: 2012-06-27
I have compiled code for a simple router program. I am taking a class and I needed to create a program that would simulate routers updating their routing tables. The only real question i have left is i'm not sure if the program should update the routers so often. I have attached all the parts of the program, the exe file and the log file of the output. Can someone take a quick look and let me know if the program should call the update function so many times, as illustrated by the output?

Thanks!

Running one node0/1/2/3.c file will also call the main program prog3.c and the other nodes and initiate the update process between all of the other nodes, also known as routers.
node0.c
node1.c
node2.c
node3.c
prog3.c
RoutingLog.txt
0
Comment
Question by:new435
  • 2
4 Comments
 
LVL 35

Assisted Solution

by:sarabande
sarabande earned 500 total points
ID: 37800293
it is only you who could answer that question. generally, a simulation should be as near as possible to the reality. if in reality you have much less updates it isn't a good simulation at least in that point. note, a simulation is different to a stress test. in the latter you would go the limits but not beyond. if your program is neither a simulation nor a stress test but a unit test you could go beyond the limits and try to produce even worsest scenarios just to proove that your system is stable in every case. such a complete unit test is fine if it has the expected results. if it only finds problems which wouldn't occur in the reality you might loose the right focus and forget to test the normal.

Sara
0
 

Author Comment

by:new435
ID: 37802543
I'm not quite sure how often real routers update themselves, which is why I posed the question.
0
 
LVL 3

Accepted Solution

by:
algorith earned 500 total points
ID: 37803811
I have heard that a poisoned router will be cured in 15 minutes or so on average, but I could not find this number on a quick search.  This article might help http://www.isoc.org/isoc/conferences/ndss/06/proceedings/papers/churn_as_shelter.pdf

Bandwidth limitations might be a good way to decide - i.e. you don't want the router updating so often that it consumes a significant portion of you network's bandwidth.  On the other hand, you do want the bad routing information to be purged as quickly as possible. All of which makes the answer specific to your own situation, which as an assignment is possibly ill-defined.

You could ask the TA...let us know if he can answer...
0
 

Author Comment

by:new435
ID: 37818160
see my program ends up updating > 100 times and im not sure if that is rediculus or not.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question