P3L3 - Interprocess Communication Flashcards
What is IPC?
Set of mechanisms that the operating system must support in order to permit multiple processes to interact amongst each other
What are the two categories of IPC mechanisms?
Message-Based and Memory-Based
What is included under message-based IPC?
Sockets, pipes, message queues
What is included under memory-based IPC
Shared memory
Who is responsible for creating and maintaining the channel that is used to send messages between processes?
The OS!
T/F: Since the OS is required to establish the communication and perform each IPC operation, every send and receive call requires a system call and data copy?
True!
How many user/kernel crossings occur in a request-response interaction between two processes?
4!
Define Pipes
Pipes are characterized by two endpoints. There is no notion of messages, just a stream of bytes pushed into the pipe from one process and read from the pipe by the other
What are the two common APIs for message queues?
SysV and POSIX API
Define sockets?
With sockets, processes send and receive messages through the socket interface
T/F: The OS is involved in more than just creating a shared memory channel when memory based IPC takes place
False! it is merely involved in establishing the shared memory channel between the processes
What is the big benefit of the OS’s involvement with shared memory IPC
Once the physical memory is mapped into both address spaces, the OS is out of the way. System calls are used only in the SETUP phase
What are the two most popular shared memory API’s?
SysV and POSIX
What is the goal of message-based and memory-based IPC
Transfer data from the address space of one process to the address space of another process
What is the base unit for the SysV Shared Memory IPC
Segments which don’t need to correspond to contiguous physical pages