From: Benoit Fouet <benoit.fouet@purplelabs.com>
To: kumars <subhankar_k@rediffmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Shared Memory using threads in C on AIX
Date: Wed, 18 Jun 2008 13:26:30 +0200 [thread overview]
Message-ID: <4858F0E6.80803@purplelabs.com> (raw)
In-Reply-To: <17979185.post@talk.nabble.com>
Hi,
kumars wrote:
> I am looking for C program source code. Could you please help me in finding
> the source code of the required mentioned below.
>
>
>
> Task that I need to complete:
>
> Write a program to create multiple threads (one master thread and rest
> worker threads) and using the threads write into and read from shared memory
>
>
> Restrictions:
>
> Only one thread should be able to read at any instant of time into shared
> memory region.
>
> Only one thread should be able to write at any instant of time into shared
> memory region.
>
> Worker threads should inform the master thread after every read and write
> operation.
>
> Master thread inform the worker thread (which is waiting to acquire shared
> memory region) that read or write operation is successful and it can acquire
> the memory for either reading and writing operations.
>
>
>
man pthread.h, you'll find everything you need in there...
--
Benoit Fouet
Purple Labs S.A.
www.purplelabs.com
next prev parent reply other threads:[~2008-06-18 11:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 9:59 Shared Memory using threads in C on AIX kumars
2008-06-18 11:26 ` Benoit Fouet [this message]
2008-06-18 13:46 ` Glynn Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4858F0E6.80803@purplelabs.com \
--to=benoit.fouet@purplelabs.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=subhankar_k@rediffmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.