POSIX shared memory objects - HP UX

This is a discussion on POSIX shared memory objects - HP UX ; The link http://docs.hp.com/en/B3782-90716/ch08s14.html says that posix shared memory objects are implemented on hp-ux using the underlying file system. Does this mean that the shared memory objects are implemented as regular files in the underlying file system such as vxfs? If ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: POSIX shared memory objects

  1. POSIX shared memory objects

    The link http://docs.hp.com/en/B3782-90716/ch08s14.html says that
    posix shared memory objects are implemented on hp-ux using the
    underlying file system. Does this mean that the shared memory objects
    are implemented as regular files in the underlying file system such as
    vxfs?
    If so, this is strictly not a memory object. POSIX specification for
    shared memory
    objects says that the name starts with '/' but no embedded '/' chars in
    the name.
    When I try this on hp-ux, it fails because it tries to create the
    object in the root (/)
    file system and the user has no permission to create a file in the root
    file system.
    On linux, the same thing works because it creates a 'file' in the tmpfs
    file system
    (not in the root file system).
    How are POSIX shared memory objects implemented on hp-ux?


  2. Re: POSIX shared memory objects

    murali.vemulapati@gmail.com wrote:
    > The link http://docs.hp.com/en/B3782-90716/ch08s14.html says that
    > posix shared memory objects are implemented on hp-ux using the
    > underlying file system. Does this mean that the shared memory objects
    > are implemented as regular files in the underlying file system such as
    > vxfs?
    > If so, this is strictly not a memory object. POSIX specification for
    > shared memory
    > objects says that the name starts with '/' but no embedded '/' chars in
    > the name.


    Cite?

    When I checked the standard, it states:

    The shm_open() function shall establish a connection between a shared
    memory object and a file descriptor. It shall create an open file
    description that refers to the shared memory object and a file
    descriptor that refers to that open file description. The file
    descriptor is used by other functions to refer to that shared memory
    object. The name argument points to a string naming a shared memory
    object. It is unspecified whether the name appears in the file system
    and is visible to other functions that take pathnames as arguments. The
    name argument conforms to the construction rules for a pathname. If name
    begins with the slash character, then processes calling shm_open() with
    the same value of name refer to the same shared memory object, as long
    as that name has not been removed. If name does not begin with the slash
    character, the effect is implementation-defined. The interpretation of
    slash characters other than the leading slash character in name is
    implementation-defined.

    That's directly from http://www.unix.org/single_unix_specification/.

    > When I try this on hp-ux, it fails because it tries to create the
    > object in the root (/)
    > file system and the user has no permission to create a file in the root
    > file system.
    > On linux, the same thing works because it creates a 'file' in the tmpfs
    > file system
    > (not in the root file system).
    > How are POSIX shared memory objects implemented on hp-ux?
    >


    The doc is correct, these are files. [Which is pretty obvious
    from the passed in name conforming to path names and then being attached
    via mmap() and all...]

    Don

+ Reply to Thread