System V IPC vs POSIX IPC

后端 未结 4 592
心在旅途
心在旅途 2020-11-28 01:54
  1. What are the differences between System V IPC and POSIX IPC ?
  2. Why do we have two standards ?
  3. How to decide which IPC functi
4条回答
  •  长情又很酷
    2020-11-28 02:30

    System V IPC is older and POSIX IPC is newer. However there are some differences for some aspects. Not always Posix is better than System V.

    1. The semaphores, queues and shared memory for Posix have Ascii string names, while under System V these are given with integer number.

    2. The System V semaphores allows to be automatically released if process dies (semop SEM_UNDO flag). There is no such thing for Posix.

    3. On Linux and FreeBSD there is big advantage of posix queues, as handler given by mq_open are basically file descriptor which can be polled/epolled/selected/kqueued.

提交回复
热议问题