Inter-Process communication Flashcards
Shared File Concepts
Processes communicate by reading from and writing to a common file on disk.
Acts as a persistent storage mechanism.
What are the key characteristics of files?
Simple to implement.
Slower due to disk I/O overhead.
Synchronization issues may arise if multiple processes access the file simultaneously
What are the concepts of shared memory?
Processes communicate by sharing a block of memory in RAM.
Allows extremely fast communication as no disk I/O is involved.
What are the shared memory characteristics?
Requires explicit synchronization (e.g., semaphores, mutexes) to manage access.
Non-persistent: Data is lost when the system shuts down or the shared memory segment is deallocated.
What are the concepts of sockets?
Processes communicate over a network or within the same machine using socket endpoints.
Suitable for distributed systems or processes on different machines.
What are the socket characteristics?
Can be connection-oriented (TCP) or connectionless (UDP).
Works with IP addresses and ports.
Uses system calls like socket(), bind(), listen(), accept(), send(), and recv()