Shared Memory (Posix)

hi

I had to create a shared memory segment which allows the creation of 8 child processes each with 1024 bytes and contains a common buffer area of 2096bytes.
i was able to create the shared memory with shm_open() followed by ftruncate() and mmap() system calls.

but for the shared buffer, i guess i have to create a buffer and allocate the specified size but the problem is am nt too sure how to map it in the shared memory.

and as for the child processes, this will require the fork() system call but sometimes it says child process and dynamically child process (i.e created as and when required)

can you guide plz and if possible any links for developing shared memory application(POSIX and not SYSTEM V).
Thxs
Looking forward to your reply

But my favriote is
Programming in C
In above your current interest is on "IPC:Shared Memory"

hi
thxs for the reply but it does not help. i did get this document on the web while doing the research but its of no use.
We have to use POSIX C and its different from the IPC shared memory.
This one corresponds to SYSTEM V

This sounds like school assignment. The differences are not that great. We do not support school work here.

This page has examples of both. N ote the "POSIX" section is not all that big:
IPC:Shared Memory
Read the one paragraph on POSIX. Use all of the rest of the examples, change open() calls to shm_open() and close() to shm_unlink(). And there you are.
system V -> POSIX.