On Sun, Apr 03, 2011 at 11:04:18PM -0400, Feng Hou wrote:
Hello everyone,
Gambit has great concurrency support by green-thread and no-blocking I/O scheduling. However, they are only able to use one native thread on multicore hardware. I have noticed some wish list on wiki for multicore/multiprocessing concurrency support. I'm wondering whether 0MQ ( http://www.zeromq.org/) can be used as substance for Gambit to build such capabilities.
My thoughts are,
-- Not just a FFI binding. -- Use it as message passing broker for multicore and distributed concurrency. -- Share nothing between the GVM thread and other in-process native threads (doing long CPU bound computation or blocking I/O). -- How to integrate 0MQ inter-thread transport to gambit green-thread scheduler without blocking it? -- Would it be possible to bind 0MQ inter-thread socket to gambit mailbox? -- How to integrate 0MQ I/O event poller with gambit I/O loop? -- Would it be better to expose 0MQ IPC/TCP/PGM socket types as Gambit Port objects?
And how to handle necessary sync between running processes and garbage collection.
I realized they were way beyond my knowledge and skill level to implement (some may not even make sense, please correct me). Nevertheless, just want to see if others have similar thoughts or needs.
Modula 3 recently went to native threads from green threads, thereby enabling use of multiple cores. I wonder how they went about all this. It may even be practical to make gambit generate Module 3 code.
Cheers, Feng Hou
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list