[Dillo-dev]Is IO.txt outdaetd?
It says dillo uses threads for DNS querying and reading local files, and signal driven I/O for TCP connections. When the socket gets ready for transmission, the data is sent using g_io_channel_write. But I can't not find the place where g_io_channel_write is invoked in the code. In previous posts I see "When using threads and mutexes (pthreads), thread scheduling is done by a third thread or by the kernel (depends upon the implementation), and it is preemptive. Now, the address space may be shared, so the need for mutexes arise, and because of both reasons, performance is degraded. Using a pseudo-thread (CCC thread), doesn't require scheduling by an external process or by the kernel. All is done in the same process, but there's no preemption." But I do find a thread is spawned in "a_IO_write_chunk()". Would you please tell me the reason? What does pseudo-thread mean? Is such thread spawned in "a_IO_write_chunk()" pseudo-thread? Thanks a lot!
On Mon, Aug 09, 2004 at 03:18:47PM +0800, Calvin Yu wrote:
It says dillo uses threads for DNS querying and reading local files, and signal driven I/O for TCP connections. When the socket gets ready for transmission, the data is sent using g_io_channel_write. But I can't not find the place where g_io_channel_write is invoked in the code.
Yes, once upon a time it used g_io_channel_write, but not anymore. I'll update this doc ASAP and let you know when its ready.
In previous posts I see "When using threads and mutexes (pthreads), thread scheduling is done by a third thread or by the kernel (depends upon the implementation), and it is preemptive. Now, the address space may be shared, so the need for mutexes arise, and because of both reasons, performance is degraded. Using a pseudo-thread (CCC thread), doesn't require scheduling by an external process or by the kernel. All is done in the same process, but there's no preemption." But I do find a thread is spawned in "a_IO_write_chunk()". Would you please tell me the reason?
Otherwise it wouldn't generate IO signals.
What does pseudo-thread mean?
A non-preemptive thread as those handled by CCC.
Is such thread spawned in "a_IO_write_chunk()" pseudo-thread?
No that one is a POSIX thread (or pthread at least ;). -- Cheers Jorge.-
On Mon, Aug 09, 2004 at 03:18:47PM +0800, Calvin Yu wrote:
It says dillo uses threads for DNS querying and reading local files, and signal driven I/O for TCP connections. When the socket gets ready for transmission, the data is sent using g_io_channel_write. But I can't not find the place where g_io_channel_write is invoked in the code.
Ok, I updated it. Beware that it's not an exact explanation of what happens inside Dillo today. Anyway, it continues to be an excellent source of information that describes the theory behind the code. Beware that the plugin system is not described in IO.txt and that the latest patch moved the "file:" protocol to a dpi, so it's not handled with a thread and a pipe inside Dillo anymore. Anyway, the thread and pipe pair is the basis for the generic dpi data stream transfer, so the theory in IO.txt will explain it to some extent. -- Cheers Jorge.-
participants (2)
-
Calvin Yu
-
Jorge Arellano Cid