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 会在他们之间共享。

相关文章:

  • 2022-12-23
  • 2021-07-20
  • 2021-06-03
  • 2022-02-19
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
  • 2021-12-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2021-09-10
  • 2022-02-23
  • 2022-12-23
相关资源
相似解决方案