Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fork - parent and child communication

Status
Not open for further replies.

ras1107

Programmer
Apr 19, 2002
2
0
0
US
I am trying to create a parent and child process that have access to the same memory or same variables. Is there an easier better way than shared memory.

Thanks for the help.
ras1107
 
It's difficult to say without knowing more about your application.

Shared memory is generally the *fastest* means of sharing data between processes because once each process has attached the segment there is no further kernel involvement. Of course, an access control mechanism like semaphores is needed, which complicates things a bit.

Message queues are slower but easier to use as the kernel handles access control.
Russ
bobbitts@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top