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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:12:26+00:00 2026-05-15T11:12:26+00:00

I have multiple processes in my linux environment that have to use the same

  • 0

I have multiple processes in my linux environment that have to use the same device driver to access a number of similar devices. My problem is that if one process instantaiates a device(by instantiate, I mean mknod ) file, and uses a minor number say 0 and 1 for two devices. So how does the other process while doing the same thing come to know that which minor number to use?

In short, in application space is it possible to find the number of device files that use the same driver?

  • 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-15T11:12:26+00:00Added an answer on May 15, 2026 at 11:12 am

    Assuming that you are referring to a driver that you are creating or at least have the source to, try using minor numbers in numerical order (for simplicity) starting with zero. Have your driver keep track of how many minor numbers/devices have been instantiated and expose that count via an entry in sysfs. When you go to instantiate a new device, use the current value of the variable for the new device’s minor number and increment the variable (inside the driver).

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

Sidebar

Related Questions

We have a pretty big perl codebase. Some processes that run for multiple hours
I have made a Linux CUI app that communicates between processes via Message-quene. There
If have I have multiple processes accessing a registry value thousands of times per
Here's what I am working on. At my website I have multiple processes with
I have a Django project in which multiple processes are accessing the backend mysql
I have an application where there are multiple processes. They share the reading and
We have a weblogic batch application which processes multiple requests from consumers at the
I am to process single PDFs that have each been created by 'merging' multiple
I'm new to c language and Linux. I have a problem related to fork(),getpid()and
I have some code that has to compile for multiple platforms. The following will

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.