Greetings:

I have a very unusual situation. I am simulating wireless networks by
using a User Mode Linux -based testbed. There are two factors that are
challenging: 1.) the networks can be large; 2.) in some circumstances,
I need very accurate time resolution, because I may be simulating MAC
layer protocols, which need sub-microsecond accuracy.

The first factor can cause excessive loading on the host that hosts the
UML instances. 
The second factor seems to be beyond the capabilities of the native
Linux time management system, which counts clock ticks, that arrive (at
the least) every millisecond. When one accounts for schedule slippage,
one microsecond scheduling is probably pollyannishly unrealistic.

My approach has been to slow down time on the UML instances so their
clocks advance at a rate that is slower than the clock rate of the host
Linux machine. I have done this by modifying the do_timer() routine so
that it increments the jiffy counter modulo some integer. If this
integer is set to, say, 10, then the time keeping mechanism of the give
UML instance will run at 10% of the normal rate.

By slowing down time I can manage the first factor. And, when I slow
down time, the network is proportionately MUCH faster. (I added a fake
transmission time in the UML ethernet driver code so that each host
pauses after each write operation to the UML switch. The pause time is
equal to the packet length divided by the bit rate.)

So far so, good, but some applications seem to bypass the UML time
keeping mechanism and drill down into the host OS for their time.
"ping" is an exception; it schedules a preeemptible time out call with
the OS. But, it appears that applications that use gettimeofday, cheat.
The "date" command, for example, seems to get its time values from the
host OS.

Now, I understand that its good to make the date command cheat, because
then, each UML host will know the correct time of day. This is good
because it eliminates the hassle of setting the clock offset in each
UML host. In my case, this convenience is a big problem. 

So, how does one disable this cheating? 

Thanks!
John Zavgren



John Zavgren
[EMAIL PROTECTED]
603-371-0513 (home)
603-801-2094 (mobile)
"The problem isn't that there are too many fools in this world, but
rather that lightning isn't selective enough."
-- KC Burgess Yakemovic



> -------- Original Message --------
> Subject: User-mode-linux-user Digest, Vol 4, Issue 42
> From: [EMAIL PROTECTED]
> Date: Thu, September 28, 2006 3:15 pm
> To: user-mode-linux-user@lists.sourceforge.net
> 
> Send User-mode-linux-user mailing list submissions to
>       user-mode-linux-user@lists.sourceforge.net
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
> or, via email, send a message with subject or body 'help' to
>       [EMAIL PROTECTED]
> 
> You can reach the person managing the list at
>       [EMAIL PROTECTED]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of User-mode-linux-user digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Character map issue - vi (Mike Horn)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 28 Sep 2006 12:22:50 -0600
> From: "Mike Horn" <[EMAIL PROTECTED]>
> Subject: Re: [uml-user] Character map issue - vi
> To: "'Jeff Dike'" <[EMAIL PROTECTED]>
> Cc: user-mode-linux-user@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain;     charset="us-ascii"
> 
> Hi Jeff,
> 
> Here is the output for 'stty --all' let me know if anything looks incorrect.
> Thanks!
> 
> -bash-3.1# stty --all
> speed 38400 baud; rows 54; columns 80; line = 0;
> intr = ^C; quit = ^\; erase = ^?; kill = ^X; eof = ^D; eol = <undef>;
> eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt =
> ^R;
> werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
> -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
> -ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon
> -ixoff
> -iuclc ixany -imaxbel -iutf8
> opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
> ff0
> isig icanon -iexten echo -echoe -echok -echonl -noflsh -xcase -tostop
> echoprt
> echoctl echoke
> -bash-3.1# 
> 
> -----Original Message-----
> From: Jeff Dike [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 27, 2006 7:58 AM
> To: Mike Horn
> Cc: user-mode-linux-user@lists.sourceforge.net
> Subject: Re: [uml-user] Character map issue - vi
> 
> On Tue, Sep 26, 2006 at 11:03:24PM -0600, Mike Horn wrote:
> > guest# stty -all
> > stty: when specifying an output style, modes may not be set
> 
> Err, that should have been stty --all
> 
> > guest# tty
> > /dev/tty0
> 
> This much is OK.  There are problems with /dev/console (job control, not
> editing, though), so I wanted to check that you weren't using that.
> 
>                               Jeff
> 
> 
> 
> 
> 
> 
> ------------------------------
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> 
> ------------------------------
> 
> _______________________________________________
> User-mode-linux-user mailing list
> User-mode-linux-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
> 
> 
> End of User-mode-linux-user Digest, Vol 4, Issue 42
> ***************************************************


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to