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 7989875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:51:53+00:00 2026-06-04T12:51:53+00:00

To work with databases or files as simple data persistance layer is easy to

  • 0

To work with databases or files as simple data persistance layer is easy to understand. But there are also ways to use them as communication channel to transfer data from one running process to another one or even send commands and requests, especially when this channel is faster then normal Unix sockets, like shared memory.

But how do you use this efficiently? I mean, a process doesn’t get an Event for a change in shared memory, he always has to poll for it, right? But isn’t that too resource intensive if all the processes are polling their shared memory all the time? What other alternatives are there?

  • 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-06-04T12:51:54+00:00Added an answer on June 4, 2026 at 12:51 pm

    To get notification of a change using IPCs on a Unix or Linux system, I could think of different technique without resorting to polling.

    1st Blocking Read

    One could use a file descriptor (a file, a Unix socket, a pipe or named pipe, an IPC queue, etc.). The consumer will read this file in a blocking way (a timeout is perhaps advised). The producer will write something to this file descriptor once it has updated the shared memory. Thus the consumer would get awaken from the read when this happen and go read the shared memory. The consumer will be in sleep state, so not consuming resources (like CPU) while waiting.

    One could even use select for the consumer to wait for several file descriptor at the same time.

    2nd Signals

    The consumer would be awaken by a signal sent by the producer. The producer sends a signal (SIGUSR1 for instance) to the consumer once it has updated the shared memory. The consumer had subscribed previously to the signal and can handle the request. It is a bit more complex to handle because the even can be triggered at any time, so the design of the consumer is more difficult.

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

Sidebar

Related Questions

At work, we have several applications with databases in a centralized SQL server. Whenever
I work with an OO database abstraction layer that I wrote. I have parameters
I'm studying the best data structures to implement a simple open-source object temporal database,
A repeating theme in my development work has been the use of or creation
I have written a simple ASP.NET MVC 2 application that stores data and can
I have a C# application where I am creating numerous Excel Files from Data
I'm writing a desktop app which needs a simple persistence layer - I found
I have created simple .aspx page which queries a database for some live data
I am trying to get a windows service to work but I keep getting
I have this pretty simple application, it uses a webService to transfer data to

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.