lua-users home
lua-l archive

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


Friday, April 28, 2006, 10:07:35 PM, Diego Nehab wrote:

>>> However, there will always be someone asking: "Why doesn't
>>> Lua have multi-threading support?"
>>
>> You can get the best of both worlds by providing a simple coroutine
>> scheduler, and make versions of all the AIO primitives that block the
>> calling coroutine, and schedule a waiting coroutine by dequeuing the
>> IOCP.

> Now that everyone has dual core processors, and this tends
> to move to even more cores, how is the single-threaded AIO
> going to compare to multi-threading?

If your application has I/O, then it works extremely well. One core
tends to the single-threaded application, and the other core(s) the
system level I/O and other system threads.

A system I constructed with HyperThreaded Pentiums (using PVM and C,
not Lua) achieved superlinear speedup with added processors for a
compute intensive application: all I/O seems to have been offloaded to
the second core on each processor, so the single threaded core doing
the computation had more cycles that it did on the uniprocessor.

e

--
Doug Currie
Londonderry, NH