Advanced Operating Systems for M1IL -Inter Process Communication
Advanced Operating Systems for M1IL -Inter Process Communication
3rd chapter
Inter-Process
Communication
Presented by: Abdelaziz Kella
❏ Inter process communication (IPC) is a mechanism
which allows processes to communicate with each
Interaction other and synchronize their actions. Processes within
Synchronous Communication: Sender waits for Client-Server Models: Web applications using
the receiver to acknowledge receipt message passing for requests and responses
Asynchronous Communication: Sender continues Microservices: Services communicate via
without waiting for acknowledgment messages in distributed systems
IPC in Networking
❏ Sockets
❏ Message sizes
❏ Lost messages
❏ Flow control
❏ Message destinations
❏ ServerSocket
❏ Socket
❏ Necessary steps
❏ Creating a socket
❏ Binding a socket to a port and local Internet
address
❏ A client binds to any free local port
❏ A server binds to a server port
❏ Blocking
❏ Send: non-blocking
❏ upon arrival, message is placed in a
queue for the socket that is bound to
the destination port.
❏ Receive: blocking
❏ Pre-emption by timeout possible
❏ If process wishes to continue while
waiting for packet, use separate thread
UDP Datagram communication flow
Java implementation of UDP Datagrams
1. DatagramPacket
❏ It provides a constructor to make an array of
bytes comprising:
Message content
Length of message
Internet address
Local port number
❏
Java implementation of UDP Datagrams
2. DatagramSocket