fork()的一些细节
来源:互联网 发布:alias软件 汉化版 编辑:程序博客网 时间:2024/05/22 17:28
1、哪些段会被复制
The child gets a copy of the parent's data space, heap, and stack. Note that this is a copy for the child; the parent and the child do not share these portions of memory. The parent and the childshare the text segment.(APUE-2e)
2、写时复制技术(COW)
Current implementations don't perform a complete copy of the parent's data, stack, and heap, since a fork is often followed by an exec. Instead, a technique calledcopy-on-write (COW)is used. These regions are shared by the parent and the child and have their protection changed by the kernel to read-only. If either process tries to modify these regions, the kernel then makes a copy of that piece of memory only, typically a "page" in a virtual memory system.(APUE-2e)Under Linux, fork() is implemented using copy-on-write pages, so the only penalty that it incurs is the time and memory required to duplicate the parent's page tables, and to create a unique task structure for the child.(man page)
- fork()的一些细节
- linux下调用fork()生成进程的一些细节
- document_getElementById的一些细节
- JS的一些细节
- 一些简单的细节
- dll的一些细节
- C++的一些细节
- Servlet的一些细节
- Servlet的一些细节
- Servlet的一些细节
- Servlet的一些细节
- 一些小小的细节
- Servlet的一些细节
- Servlet的一些细节
- Hibernate的一些细节
- lua的一些细节
- Java的一些细节
- Cookie的一些细节
- linux内核enforcing引导参数
- python 学习笔记
- Linux 设备和驱动加载的先后顺序 .
- NSThread NSCondition wait
- android 4.1 JellyBean 跟踪应用程序选择框弹出流程
- fork()的一些细节
- (droid分享)新浪微博开发系列【二】之授权
- DOS命令 ping/ipconfig 不能运行的解决方案
- Chuangxin 函数调用过程详解 【面】
- JDiy快速开发WEB之javaSE环境搭建-初级
- Google Protocol Buffer 的使用和原理
- xml基础-->总结
- 如何用xcode调试dylib
- (droid分享)新浪微博开发系列【四】之登录界面