Linux Process Management(12) > the child either calls exec() or exits. > 2. The child is not allowed to write to the address space. > 3. ==> use fork() is ok in kernel > 2.2. > 10. P.25 The Linux Implementation of Threads > 1. The Linux kernel done not provide any special scheduling > semantics or data structures to represent threads. > Instead, a thread is merely a process which share certain > resources. Each thread has a unique task_struct and > appears to the kernel as a normal process which shares the > address space, filesystem resources, file descriptors, and > installed signal handlers. > 2. Threads are created like normal task with the exception > that the clone() system call is passed flags corresponding > to specific resources to be shared: > clone (CLONE_VM CLONE_FS CLONE_FILES CLONE_SIGHAND, 0); > fork() can be implemented by clone() as: > clone (SIGCHLD, 0);