Can multiple processes access the same memory space? How is this achievable?

Discussion in 'Operating System' started by Sage_sage, Feb 21, 2012.

  1. Sage_sage

    Sage_sage New Member

    Joined:
    Feb 21, 2012
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    Can multiple processes access the same memory space? How is this
    achievable?
     
  2. Scripting

    Scripting John Hoder

    Joined:
    Jun 29, 2010
    Messages:
    421
    Likes Received:
    57
    Trophy Points:
    0
    Occupation:
    School for life
    Location:
    /root
  3. _eb75_

    _eb75_ New Member

    Joined:
    Jun 18, 2012
    Messages:
    16
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    www.isosika.net
    As an illustrative example from Linux we can take a part from a manual page. The method with other operating systems is pretty the same.
    An application can ask shared memory with an other application from OS.
    -----------------------------------
    shmget - allocates a shared memory segment int shmget(key_t key, size_t size, int shmflg);

    shmget() returns the identifier of the shared memory segment associated with the value of the argument key. A new shared memory segment, with size equal to the value of size rounded up to a multiple of PAGE_SIZE, is created if key has the value IPC_PRIVATE or key isn't IPC_PRIVATE, no shared memory segment corresponding to key exists, and IPC_CREAT is specified in shmflg.
    .........................
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice