POSIX Shared Memory: XSI or Realtime?
Asked Answered
M

0

6

It appears that POSIX defines two different optional IPC APIs that provide shared memory: the XSI extension (shmget, shmctl, shmdt) and the Realtime option group (shm_open, shm_unlink). The documentation on opengroup for shmget says, in the Application Usage section, that if I write sofware that uses the XSI routines, it should be easily modified to use the routines in the Realtime extension.

Does this mean that the routines in the Realtime extension should be preferred, if available?

Is one set intended to eventually replace the other?

Which set is more 'future-proof'?

Regards, David

Maher answered 11/9, 2013 at 13:31 Comment(3)
shm{get,ctl,at,dt} is the traditional System V shmem, and shm_{open,unlink} is the "new" and improved POSIX shmem.Manipur
Thanks ninjalj. So, XSI (X/Open something something) == 'old unix stuff'? Is the 'XSI extension' generally regarded as part of POSIX or not?Maher
I found that shm_open is faster (on CentOS 6). My Linux book says that shmget is more portable. You pick!Ruddock

© 2022 - 2024 — McMap. All rights reserved.