Shared Memory using Threads in C on AIX

Discussion in 'C' started by kumars, Jun 18, 2008.

  1. kumars

    kumars New Member

    Joined:
    Jun 18, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    I am looking for C program source code. Could you please help me in finding the source code of the required mentioned below.

    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.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice