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: Holger Freyther
Subject: Re: [Help-smalltalk] Sporadic process issue on Magritte tests
Date: Thu, 16 Apr 2015 07:06:23 -0400

> On 16 Apr 2015, at 04:01, Paolo Bonzini <address@hidden> wrote:
> 


> 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.

Okay but the current implementation appears to be improvable.

VMpr_Processor_signalAtNanosecondClockValue
  * Get current time and then check if to signal directly or queue
  _gst_async_timed_wait
   * Cancel the current alarm
   * Schedule waiting for the new SIGALRM
   * Call _gst_sigalrm_at
   _gst_sigalrm_at
      * I don’t know how linux behaves with TIMER_ABSTIME if it
        is in the past but apparently it does behave (hurray!)
      * Call _gst_get_ns_time
      * And check how many seconds to sleep

After going through the list it is only inefficient for the non
timer_settime case. So I withdraw my comment. :)

holger




reply via email to

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