[libdispatch-dev] libpthread_workqueue released
Jordan K. Hubbard
jkh at apple.com
Sun Jun 20 13:16:47 PDT 2010
That's very interesting, and certainly solves the portability problem for those OSes unwilling / unable to implement pthread workqueues in kernel space. How are you planning on implementing the system-wide load balancing behavior? A global semaphore of some sort, I would assume, but it's really your assumptions I think we're interested in. :)
Looking further forward, is this something you would like to propose as part of the "official libdispatch sources" for making the code base more portable?
On Jun 14, 2010, at 9:36 PM, Mark Heily wrote:
> I have written a pure userspace implementation of the Darwin pthread_workqueue API as used by libdispatch. This is based on Stacey Son's port to FreeBSD , but does not include any of the kernel bits. It's portable to a wide range of POSIX-compliant platforms. I have tested it under Linux, and it shows major improvements in the performance and stability of the libdispatch test suite.
> I havn't implemented overcommit or multiple priority levels yet, but the basic workqueue functionality is there. I have a few ideas for adding kernel support and will be developing a Linux kernel module to complement the existing userspace code.
> A tarball of the source code is here:
> The SVN repository is available here:
> To try this with libdispatch, add '-lpthread_workqueue' to the LDADD variable in testing/Makefile.am.
> - Mark
>  http://people.freebsd.org/~sson/thrworkq/
> libdispatch-dev mailing list
> libdispatch-dev at lists.macosforge.org
More information about the libdispatch-dev