Examples of IPC Systems

Posix shared memory

Untitled

Producer process illustrating POSIX shared-memory API

Producer process illustrating POSIX shared-memory API

Producer와 차이

  1. ftruncate(shm_fd, SIZE) → 공유 메모리의 크기를 결정하는 코드가 없다.
  2. sprintf → 메모리에 쓰지 않고 / printf → 메모리에서 읽어들인다.
  3. shm_unlink → 공유메모리를 제거한다.

Untitled

Consumer process illustrating POSIX shared-memory API

Consumer process illustrating POSIX shared-memory API

Pipes Message Passing