Go Back   The UNIX and Linux Forums > Top Forums > Programming
.
google site



Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-18-2008
Registered User
 

Join Date: Jun 2008
Posts: 9
shared memory read/write using threads

I am looking for C program source code. Could you please help me in finding the source code 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.
Sponsored Links
  #2 (permalink)  
Old 06-18-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 6,137
see chapter 4 & 5:
Download Advanced Linux Programming
  #3 (permalink)  
Old 06-18-2008
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 759
Another good resource on threads programming
Sponsored Links
Closed Thread

Bookmarks

Tags
linux download

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
threads and shared memory kumars Programming 1 06-19-2008 04:20 AM
Shared memory using threads kumars Linux 0 06-18-2008 11:00 AM
Shared memory in shared library DreamWarrior Programming 12 05-30-2007 05:33 PM
Can FD's be shared between threads? ne2000 Programming 2 01-16-2006 04:14 AM
Shared memory shortage but lots of unused memory cjcamaro UNIX for Advanced & Expert Users 1 10-13-2004 06:10 PM



All times are GMT -4. The time now is 07:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0