Re: shmem in backends?

Matto Marjanovic (maddog@mir.com)
Tue, 21 Jul 1998 16:53:34 -0400 (EDT)

>From: "Yuri Dario" <mc6530@mclink.it>
>Date: Tue, 21 Jul 1998 14:33:23 +0100

>On Mon, 20 Jul 1998 23:24:01 -0700, David Mosberger-Tang wrote:
>
>> Matto> to be implemented using Sys V shared memory IPC (instead of
>> Matto> pipes, as the connection to a child reader process)?
>>
>>I'd suspect problems with the OS/2 port.
>
>OS/2 supports shared memory between processes, but actually using threads has less impact on system
>resources. I'm working on multiple threads in backends that are using fork().

It seems like threads are precisely what you want for scanner
backends. Well, actually, non-blocking SCSI I/O with a select
mechanism is *really* what you want --- so that you can toss the
READ_DATA_VERY_SLOWLY command to the scanner and then not get stuck
waiting while it completes.

Anyhow, threads do seem more apropos than a full-process fork, because
of the unnecessary bit-slinging overhead you incur copying scanner
data back to a parent process. (Yeah, the scanner head is such a
time-limiter it probably doesn't matter, but it can't hurt to try to
be as efficient as possible.)

Is there a well-established, portable thread standard that I could
code with? (Posix threads?) Any suggestions on what manpages to
start with?

-matt m.

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com