Inter-Process Communication : Mechanism for various processes to communicate among them.
다양한 프로세스가 프로세스 간에 통신하기 위한 메커니즘
Types of IPCs in UNIX
Unidirectional byte streams which connect one process into the other process.
한 프로세스를 다른 프로세스에 연결하는 단방향 바이트 스트림
No structured communication
It is not possible to know the size, sender/receiver of data contained in the pipe.
구조화된 통신 없음 : 파이프에 포함된 데이터의 크기, 송신자/수신자를 알 수 없음
Access to pipes is achieved by reading / writing from/to file descriptors.
One current usage of the pipe mechanism is performed by means of the command line interpreter when commands are linked:
파이프 메커니즘의 현재 사용 중 하나는 명령이 연결된 경우 명령줄 인터프리터를 통해 수행됩니다.
(e.g., > ps -aux | grep root | tail)
Created by a process and the transmission for associated descriptors is achieved only by inheritance by its descendants (parent <-> child).
프로세스에 의해 생성되고 관련 설명자에 대한 전송은 하위 항목에 의한 상속에 의해서만 수행됨
(i.e., by creating a child process using fork() system call)
Restrictive in that it only allows communication between processes with a common ancestor which is a creator of a pipe.
파이프의 작성자인 공통 조상을 가진 프로세스 간의 통신만 허용한다는 점에서 제한적
fd[0] : read
fd[1] : write
"Hello World"
Remove the constraint of anonymous pipe (i.e., no name, only used between processes that have a parent process in common) because they are entries in the file system.
익명 파이프는 파일 시스템의 항목이기 때문에 해당 제약 조건을 제거
Has a name and handled exactly like files with respect to file operations (e.g., open, close, read, write).
Created by mkfifo or mknod commands.
Can be created by C functions : mkfifo().
Reading from / writing to a named pipe can be achieved by using standard read() and write() system calls.
A socket is defined as an endpoint for communication.
소켓은 통신을 위한 끝점으로 정의
Concatenation of IP address and port number
IP 주소와 포트 번호의 연결
The socket 161.25.19.8:1625 refers to port 1625 on host 161.25.19.8
Communication consists between a pair of sockets.
Remote procedure call (RPC) abstracts procedure calls between processes on networked systems.