当前位置: 技术问答>linux和unix
请教几个LINUX基本知识!(进程与线程的)
来源: 互联网 发布时间:2015-06-21
本文导语: 1.Does a child process share the same address space with its parent process? 2.Does a thread share the same address space with a process? 3.What does a process address space consist of (hint: segments) when you execute a program? | ...
1.Does a child process share the same address space with its parent process?
2.Does a thread share the same address space with a process?
3.What does a process address space consist of (hint: segments) when you execute a program?
2.Does a thread share the same address space with a process?
3.What does a process address space consist of (hint: segments) when you execute a program?
|
1、no
2、yes
2、yes
|
父进程创建子进程之初,使用fork系统调用,对fork的调用,父子进程是返回相同的地址的,
这个地址回答你的问题,即fork系统调用的返回地址.以后才由于父子进程返回值与系统
堆栈的不同,由程序人为的分开.
这个地址回答你的问题,即fork系统调用的返回地址.以后才由于父子进程返回值与系统
堆栈的不同,由程序人为的分开.