Examples of Ports in Real Systems
1. Unix sockets and TCP/IP communication.
- Common primitives/protocols for local messaging and network communication.
- TCP/IP defines a fixed space of port numbers per node.
System calls to send/listen to a particular port.
- Some ports are reserved to processes running with superuser (root) privilege.
Standard servers in /etc/services listen at well-known protected ports.
2. Mach supplies a rich set of port/messaging primitives.
- Open ports (port rights) are kernel object handles.
- Port rights may be passed in messages among processes.
The only way to get a send/receive right is for some other process to pass it to you! This is a system-wide basis for protection.