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

  • SEARCH
  • Home
  • 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, but I can't find some good fortran documentation anywhere. I am studying
Flex newbie question: can MXML be generated on the fly, like HTML is generated
Newbie question: some vendors propose solution like generating dynamic certificates to allow user who
Newbie question here but for some reason I cant figure this out. I have
Newbie question... Can anyone provide a high level description of what things need to
Newbie question: Can one substitue commands, properties or methods for NSStrings or char at
Newbie question here, is there any inbuilt PHP tag that can be used to
newbie question I have a multiselect box that i populate with some ajax and
Newbie question but I can't find the answer. On first run my app is
newbie question: can anyone tip me to how to understand/interpret what is displayed in

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.