help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] Sporadic process issue on Magritte tests


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Sporadic process issue on Magritte tests
Date: Thu, 16 Apr 2015 10:01:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 15/04/2015 20:36, Holger Freyther wrote:
>> E.g. rename _gst_signal_at
>> > to _gst_signal_in and then deal with it there? I forgot why we still need 
>> > to add the
>> > ClockOnStartupTime to the resumptionTime
> I need to invest if that is scheduling, coalsceling or the cost of disarming, 
> arming
> the timer and the signal. but what I see is that
> 
> primitive:   arg2 1429121982628328000  now 1429121982628320000
> signal_at:           1429121982628328000 now 1429121982628331000
> 
> If now > nsTime the deltaMilli will be a huge number and we will sleep a very
> long time. My current preference would be to have a single _gst_get_ns_time
> call to arm these timers and a single comparison.

If now > nsTime, the deltaMilli should be made as small as possible.

The point of using absolute deadline is exactly to match deadlines as
close as possible ("perfect" if the syscall ultimately lets you specify
an absolute deadline).  Relative deadlines become less and less accurate
the more load you have, because you can be preempted away between the
computation of the deadline and the setting of the timer.

This is particularly relevant with cooperative multithreading such as
Smalltalk's.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]