[ale] Linuxthreads question
Christopher Fowler
cfowler at outpostsentinel.com
Tue Jun 24 10:22:12 EDT 2003
On Tue, Jun 24, 2003 at 10:00:44AM -0400, John Mills wrote:
>
> That was my first thought, roughly, and may still be a better approach. I
> was troubled by FUD as to whether I could have a large enough number of
> shared segments (8-10), then I found 'clone' and 'linuxthreads' which
> seemed to do what I wanted. I could use one BEEGGG segment, but I wanted
> to allocate and attach each "writer"s buffer individually as a dedicated
> resource.
Think about it. What is shared memory? It is really just data that
is accessible via anyone with authority to read and/or write. Here are
possibilites of share memory.
1) Huge shared memory segments
2) File in /tmp/<filename>
3) Mount a tmpfs and use ram to store
a temp file
4) Use a database and have an API that
retrieves the data and converts to pointer
5) etc..
The posibilites are endless. Shared memory was just an example.
You'll still need a locking system but you can store the
data anywhere you like. The benefit of using #1 is that the
pointer in your program is actually pointing to the data.
#2 and #3 will require mmap if you want a pointer to point to
that data.
#4 is a copy in and out system that can have discrepencies.
>
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list