The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shared memory using threads kumars Linux 0 06-18-2008 10:00 AM
Shared memory in shared library DreamWarrior High Level Programming 12 05-30-2007 04:33 PM
memory sharing - not shared memory - elzalem High Level Programming 9 05-02-2007 07:45 AM
Can FD's be shared between threads? ne2000 High Level 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 05:10 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-18-2008
kumars kumars is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 9
threads and shared memory

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.
  #2 (permalink)  
Old 06-19-2008
sumitpandya sumitpandya is offline
Registered User
  
 

Join Date: Mar 2006
Location: Ahmedabad
Posts: 125
Nice tutorial for all C programmers

Programming in C
Closed Thread

Bookmarks

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 On




All times are GMT -4. The time now is 12:38 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-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0