Re: Time slices on linux


Subject: Re: Time slices on linux
From: Samuel Rydh (samuel@ibrium.se)
Date: Wed Sep 06 2000 - 15:42:56 MDT


> But even when running mol under the same priority (priority 0), it's quite
> irregular, it apparently doesn't get cpu every 30th second constantly, but
> only every 10th second or so. Maybe this is because mol doesn't require cpu
> constantly and returning (going to sleep) before the end of a slice, and
> thus in some way disturb the calculation of the scheduler (maybe the
> scheduler decides "so mol has had a time slice (even if it didn't use the
> whole of it), it will not get one again now even if it requires to be run
> again now". Or perhaps there might even be some complicated feedback
> effects?).

Another thing to take into account is that MOL is multi-threaded.
In particular keyboard/mouse input used to be in a separate thread
and this might increase the latency when the system is heavily loaded
(I removed the special input thread a few days ago).

> Hmm, I have another idea now:
>
> Maybe MacOS under mol just has it's own artificial interrupt timer, set at
> 1/60 second or, for mouse pointer movement etc., dependant on cpu time and
> not real time.

Spot on. MOL's internal clock ticks only when MOL owns the cpu
(well, there are corrections but these might not work well
when the system is heavily loaded). I've been thinking about
adding improved support for realtime driven interrupts.

Cheers,

/Samuel

----------------------------------------------------------
 E-mail <samuel@ibrium.se> WWW: <http://www.ibrium.se>
  Phone/fax: (home) +46 8 4418431, (work) +46 8 7908470
----------------------------------------------------------



This archive was generated by hypermail 2a24 : Wed Sep 06 2000 - 15:49:12 MDT