IPC
IPC
COMMUNICATION
Understanding IPC
Page 02
WHY DO WE NEED IPC?
Example: Text editor and Like a shared printer in an Like a shared printer in an
spell checker working office office
together Multiple programs need to Multiple programs need to
Editor sends text to spell print print
checker IPC manages who uses the IPC manages who uses the
Spell checker returns printer and when printer and when
corrections
Without IPC, these
programs couldn't work
together
Page 03
MESSAGE PASSING
Message passing is like sending letters through a
postal system:
Direct Communication
Process A talks directly to Process B
Like making a phone call to a specific person
Example: Game client sending moves to game server
out by individuals or teams and is designed to achieve specific
outcomes within a set timeframe.
Indirect Communication
Processes leave messages in a shared location
Like a mailbox at the post office
Other processes pick up their messages
Example: Print jobs going to a printer queue
Page 05
SHARED MEMORY
Think of shared memory as a shared
whiteboard in an office
Example:
Print spooler system
Applications send print jobs
Jobs wait in queue
Printer processes one job at a time
Jobs have priority levels
Page 07
SOCKETS
Like phone lines for processes:
Can work across different computers
Two-way communication
Types:
TCP: Like a phone call (reliable)
UDP: Like a postcard (fast but less reliable)
Examples:
Web browsers talking to servers
Online games
Chat applications
Page 08
SIGNALS
Like emergency notifications or quick gestures:
One process sends pre-defined signal
Receiving process must handle or ignore it
Examples:
Ctrl+C to stop a program (SIGINT)
System asking program to close
(SIGTERM)
Force-stopping a program (SIGKILL)
Page 09
COMPARISON OF IPC METHODS
Page 09
IPC BEST PRACTICES
SECURITY CONSIDERATIONS PERFORMANCE OPTIMIZATION DESIGN GUIDELINES
Page 03
IPC
THANK YOU
Page 10