Inter-Process-Communication
-
IPC네트워크 2024. 3. 16. 16:14
Inter-Process Communication의 줄임말로, 말 그대로 프로세스 간 통신에 대한 이야기입니다. 더 자세히는 프로세스 끼리 데이터를 전송하고 동기화, 상호작용하는 방법을 의미합니다. 가장 대표적인 것이 파이프일 것입니다. 리눅스 시스템에서 단방향으로 데이터를 전송할 때 사용합니다. 양방향을 원하면 2개 만들면 됩니다. 위 이미지에서 | 가 파이프입니다. 이렇게 하는 것 말고도 시스템 콜 pipe()가 있습니다. 파일 디스크립터를 사용해서 부모 프로세스와 자식 프로세스 간 입력과 출력의 방향을 만들어서 연결시키는 방식입니다. 네임드 파이프는 그냥 파이프가 전혀 모르는 프로세스에는 접근을 할 수가 없다는 단점이 있어 해결하기 위해 사용되는 방식입니다. 이름을 안다면 ..