Karry Wang  

3.5 When a process creates a new process using the fork() operation, which of the following state is shared between the parent process and the child process?

  a. Stack  b.Heap  c.Shared memory segments

答案:c.Shared memory segments.

解析:fork一个新的子进程时, 子进程会得到和父进程用户级虚拟地址空间相同的一份拷贝, 包括文本, 数据和bss段, 堆以及用户栈。 所以他们只有shared memory segments 会在他们之间共享。

posted on 2013-11-23 17:16  Karry Wang  阅读(1645)  评论(0编辑  收藏  举报