Processes running on an OS are isolated from each other for security. One process cannot directly access another's memory. IPC provides controlled mechanisms for processes to communicate and share data.
Two or more processes share a common region of physical memory. One process writes data to the shared region, and others read from it.
shmget(), shmat(), shmdt().Processes communicate by sending and receiving messages through the kernel. No shared memory is needed.
send(destination, message) and receive(source, message).A Pipe is a unidirectional byte stream connecting the output of one process to the input of another.
pipe(). Data flows in one direction. The shell | operator uses pipes: ls | grep .txt.mkfifo().A Socket is a bidirectional communication endpoint that can connect processes on the same machine (Unix domain sockets) or across a network (Internet sockets using TCP/IP).
A Signal is a lightweight asynchronous notification sent to a process to notify it of an event. The process can handle, ignore, or use the default action for each signal.
SIGKILL (9): Forcefully terminates a process (cannot be caught or ignored).SIGTERM (15): Politely requests termination (can be caught for graceful shutdown).SIGINT (2): Sent when user presses Ctrl+C.SIGSEGV (11): Segmentation fault (invalid memory access).