notes

Personal notes
git clone git://git.laack.co/notes.git
Log | Files | Refs

InterProcessCommunication.md (936B)


      1 # Inter-Process Communication (IPC)
      2 
      3 **Source:** CS 6200
      4 
      5 **Chapter:** P2L1
      6 
      7 **Definition:** IPC is the sharing of data between running processes.
      8 
      9 ## Approaches
     10 
     11 1. Message-passing
     12 
     13 The Operating System establishes a communication channel between the processes (like a shared buffer), and the processes interact with it by writing / reading to the shared communication channel.
     14 
     15 It is the job of the OS to manage this channel, including defining APIs for reading / writing. This also means there is overhead because the OS is the arbiter of messages.
     16 
     17 2. Shared memory
     18 
     19 The OS establishes the shared memory channel and then maps this into the virtual address space for both processes. This mapping has a non-zero startup cost so sometimes message passing may be more efficient.
     20 
     21 This keeps the OS out of the way during communication, but this also adds code complexity because the OS is not defining APIs to send and receive messages.