[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scheduler..




ns uses discrete event scheduling. so the marked lines are scheduling
events in future.

more below the marked lines

=====================================================================
 Deepak Bansal                 Address: Office: 503, Bldg NE43,
 Graduate Student                               LCS, MIT
 LCS, EECS,                             Home  : 615B, Ashdown House,   
 MIT                                            305, Memorial Drive,
                                                Cambridge
 Email: [email protected]              Phones: 617-253-4731 (O)
        [email protected]               617-225-9888 (R)
=====================================================================
 


On Mon, 9 Aug 1999, Rajesh Khetan wrote:

> Hi,
> 
> I would appreciate if somebody could explain me, the lines marked in the
> following function:
> 
> 
> 
> void LinkDelay::recv(Packet* p, Handler* h)
> {
> 	double txt = txtime(p);
> 	Scheduler& s = Scheduler::instance();
> 	if (dynamic_) {
> 		Event* e = (Event*)p;
> 		e->time_= txt + delay_;
> 		itq_->enque(p); // for convinience, use a queue to store
> packets in transit
> ***		s.schedule(this, p, txt + delay_); ***
>

schedule the arrival of packet in the next queue on path at a time
current+link delay + time to put packet on link

 	} else {
> ***		s.schedule(target_, p, txt + delay_); ***
same here
> 	}
> ***	s.schedule(h, &intr_, txt); ***

this if u look at h and intr should be able to find out

> }
> 
> 
> Thank you.
> 
> - Rajesh.
> 
> --------------------------------------------------------------------------
> Rajesh Khetan
> University of Southern California
> 1194 W 30th Street, Apt.# 1
> LA, CA - 90007                      	Tel : (323) 737 3035
> --------------------------------------------------------------------------
>