[Vm-dev] re: Reducing the activity of the image

John McIntosh johnmci at smalltalkconsulting.com
Thu Feb 12 18:45:35 UTC 2015


Craig so how does using pthread_cond_timedwait affect socket processing?
The promise of nanosleep was to wake up if an interrupt arrived say on a
socket (Mind I never actually confirmed this the case, complete hearsay...)

On Thu, Feb 12, 2015 at 2:40 AM, Craig Latta <craig at netjam.org> wrote:

>
>
> Hoi Norbert--
>
>      In 2003, while implementing remote messaging for what became the
> Naiad distributed module system[1], I noticed excessive CPU usage during
> idle by Squeak on MacOSX (and extremely poor remote messaging
> performance). I prepared alternate versions of
> ioRelinquishProcessorForMicroseconds, comparing:
>
> -    select() (AKA aioSleepForUsecs in Ian's aio API, my starting point)
> -    pthread_cond_timedwait()
> -    nanosleep()
>
>      pthread_cond_timedwait was the clear winner at the time. I wrote my
> own relinquish primitive as part of the Flow external streaming
> plugin[2], and I've been using it ever since. Still seems fine. I've
> mentioned this before.
>
>
>      thanks,
>
> -C
>
> [1] http://netjam.org/naiad
> [1] http://netjam.org/flow
>
> --
> Craig Latta
> netjam.org
> +31 6 2757 7177 (SMS ok)
> + 1 415 287 3547 (no SMS)
>
>


-- 
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
https://www.linkedin.com/in/smalltalk
===========================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150212/e86dd625/attachment.htm


More information about the Vm-dev mailing list