Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

进程 #85

Open
hushicai opened this issue Nov 6, 2019 · 2 comments
Open

进程 #85

hushicai opened this issue Nov 6, 2019 · 2 comments

Comments

@hushicai
Copy link
Owner

hushicai commented Nov 6, 2019

No description provided.

@hushicai
Copy link
Owner Author

hushicai commented Nov 6, 2019

Linux 32位操作系统,进程的内存空间:

image

更详细的内存空间:

image

参考In-Memory Layout of a Program (Process)

@hushicai
Copy link
Owner Author

hushicai commented Nov 14, 2019

进程间通信

每个进程都有各自不同的用户地址空间,任何一个进程的全局变量在另一个进程中都不可见,进程之间要交换数据必须通过内核,在内核中开辟一块缓冲区,进程1把数据从用户空间拷到内核缓冲区,进程2再从内核缓冲区把数据读走,内核提供的这种机制称为进程间通信(IPC,Inter-Process Communication)。

image

参考https://www.jianshu.com/p/c1015f5ffa74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant