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

The Archive Base Latest Questions

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

This is an interview question. Is it possible to use mutex in multiprocessing case

  • 0

This is an interview question.

Is it possible to use mutex in multiprocessing case on Linux/UNIX ?

My idea:
No, different processes have separate memory space.

mutex is only used for multithreading.

semaphore is used for multiprocessing to do synchronization.

right ?

Any comments are welcome.

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

    Mutual exclusion locks (mutexes) prevent multiple threads
    from simultaneously executing critical sections of code that
    access shared data (that is, mutexes are used to serialize
    the execution of threads). All mutexes must be global. A
    successful call for a mutex lock by way of mutex_lock()
    will cause another thread that is also trying to lock the
    same mutex to block until the owner thread unlocks it by way
    of mutex_unlock(). Threads within the same process or
    within other processes can share mutexes.

    Mutexes can synchronize threads within the same process or
    in other processes. Mutexes can be used to synchronize
    threads between processes if the mutexes are allocated in
    writable memory and shared among the cooperating processes
    (see mmap(2)), and have been initialized for this task.

    Initialization

    Mutexes are either intra-process or inter-process, depending
    upon the argument passed implicitly or explicitly to the
    initialization of that mutex. A statically allocated mutex
    does not need to be explicitly initialized; by default, a
    statically allocated mutex is initialized with all zeros
    and its scope is set to be within the calling process.

    For inter-process synchronization, a mutex needs to be allo-
    cated in memory shared between these processes. Since the
    memory for such a mutex must be allocated dynamically, the
    mutex needs to be explicitly initialized using mutex_init().

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

Sidebar

Related Questions

This is an interview question asked a month ago.... Do session use cookies? If
This question was asked at interview. Say I have a contract. [ServiceContract] public interface
I have faced this question in my Interview as well. I do have many
Possible Duplicate: Linked list interview question This is an interview question for which I
Possible Duplicate: Counting inversions in an array This is an phone interview question :
While an interview I caught in words due to this question. Suppose I have
This was an interview question: Given an amount, say $167.37 find all the possible
Possible Duplicate: Help with algorithm problem from SPOJ Came across this interview question. Given
This is a interview question. So is it possible to override a method without
How to implement singleton without using static/global variable? Possible? This is an interview question...

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.