开发者

Examples of inter process communication(IPC)

开发者 https://www.devze.com 2023-03-06 03:20 出处:网络
I am wondering about actual examples or instances of inter process communication (IPC) which we encounter on a daily basis (which happen under the hood or othe开发者_运维问答rwise) while using our lap

I am wondering about actual examples or instances of inter process communication (IPC) which we encounter on a daily basis (which happen under the hood or othe开发者_运维问答rwise) while using our laptop/desktop. I have always read about these theoretically from a textbook.

For example:

  • Between a parent process and child processes: one example of this in Linux I know is when a shell starts other processes and we can kill those processes using their process IDs.

  • Between two unrelated (in hierarchy) but cooperating processes?


One way of doing IPC on the two cases you mentioned is using sockets.

I recommend taking a look at Beej's Guide to Unix Interprocess Communication for information and examples.


Some examples of IPC we encounter on a daily basis:

  • X applications communicate with the X server through network protocols.
  • Pipes are a form of IPC: grep foo file | sort
  • Servers like Apache spawn child processes to handle requests.
  • many more I can't think of right now

And I am not even mentioning examples of IPC where the processes are on different computers.

0

精彩评论

暂无评论...
验证码 换一张
取 消