Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 803773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:48:46+00:00 2026-05-14T23:48:46+00:00

Newbie question: On Unix, in a program with a parent and some children: –

  • 0

Newbie question:

On Unix, in a program with a parent and some children:

– How can the parent alert the children efficiently to do some work.. ?

– Or how can the children wait for parent signal to start doing some work?

EDIT:
This program tries to do a complex computation in parallel, I have already used shared memory as a common workspaces for all children to update results and for data transfer.
What I need now is the parent say “start” efficiently to all its children…(called many times)

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:48:47+00:00Added an answer on May 14, 2026 at 11:48 pm

    Your ipc tag says it all. You need to look into inter-process communuication:

    • Shared memory.
    • Semaphores.
    • Pipes.
    • Signals.
    • Memory-mapped files.
    • Sockets.

    No doubt there are other possibilities but that’s a good start.

    How efficient each is depends pretty much on your use case. If you only need to notify a child to do something, signals is probably what I’d use. If you need to transfer some more information between processes, it’s probably a good idea to fully specify the requirements.


    One thing you may want to consider is to bypass all the inter-process stuff altogether and just use threads. At least in Linux, threads are first class citizens to the scheduler. Older UNIXes may have made a distinction (with user-mode threads) but that is not the case with Linux.

    I’ve found that it’s simpler to do it that way and your information is automatically shared (keeping in mind you still need to protect shared stuff with mutexes and such).


    Another possibility if you’re already committed to shared memory is to use signals. Assuming you’ve set aside sections of that memory for each child (and they know where they are), signals are probably the quickest way to notify a bunch of children for parallel work.

    If your children just wait around in a select loop with (for example) a 30-second timeout for doing periodic work, a signal will cause it to exit immediately with EINTR. That gives you your efficient CPU usage while still giving immediate response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Newbie question. I have a NSMutableArray that holds multiple objects (objects that stores Bezier
Total newbie question but this is driving me mad! I'm trying this: myInt =
Sorry for the second newbie question, I'm a developer not a sysadmin so this
This is a sql newbie question. Basically, I want an extra column to return
This is a total newbie question, so thanks in advance. I'm trying to get
Here is one more newbie question: require 'tasks/rails' I saw this line in Rakefile
Pardon the dumb newbie question here; web programming isn't my forte... (blush) I have
This is sort of SQL newbie question, I think, but here goes. I have
I'm sure this is a newbie question, but every time I've compiled/dl'ed a new
Hey all. Newbie question time. I'm trying to setup JMXQuery to connect to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.