[ndnSIM] Threading Issue in ndnSIM

Atif Rehman atif_r at outlook.com
Sun Jan 13 08:16:29 PST 2019


Hello everyone,

I am analyzing the behavior of PIT timer in a ndnSIM by varying the processing time at producer node. For example, when the first request arrives at producer/provider node the processing time is 300 ms which means the producer will reply with data packet after 300 ms. All subsequent requests responded back with random processing time i.e. 300 ms, 749 ms, 1500 ms, 1700 ms, 249 ms etc. The value of a PIT timer is set to 1 second. Moreover, I am using  usleep(microseconds) function in Producer::OnInterest(shared_ptr<const Interest> interest) function after following line  NS_LOG_FUNCTION(this << interest); to create random processing delay on producer node.

The issue which i am facing is, it seems that usleep() function halt all threads of ndnSIM and PIT timer did not expire after 1 second even when the processing time is 1500, 1700 ms (greater than 1 second). I am using usleep() function because my understanding is (I might be wrong here) when we install NDN stack on any node, it runs in a separate thread. Therefore, if each node is running in separate thread then usleep() should not halt whole ndnSIM rather it should only halt the processing of producer node.

I shall be grateful if someone help me in this regard or suggest some alternative solution.


Regards

Atif Ur Rehman (Ph.D. Student)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20190113/9310dc82/attachment.html>


More information about the ndnSIM mailing list