1、Task-Process-Thread-Lightweight_process,Michael Li,Process/Task(in Unix),Processes the executing program code (often called the text section in Unix). a set of resources open files and pending signals internal kernel data processor state an address space one or more threads of execution a data secti
2、on containing global variables,Thread(in Unix),Threads are the objects of activity within the process. Each thread includes a unique program counter(PC) process stack(SP) set of processor registers() The kernel schedules individual threads, not processes. Traditional Unix systems, each process consi
3、sts of one thread. Modern systems, however, multithreaded programs those that consist of more than one thread are common.,Thread(in Linux),Linux has a unique implementation of threads: It does not differentiate between threads and processes. To Linux, a thread is just a special kind of process.,kern
4、el threads standard processes exist solely in kernel-space. Difference between kernel threads and normal processes kernel threads do not have an address space (in fact, their mm pointer is NULL). They operate only in kernel-space and do not context switch into user-space. Kernel threads are, however
5、, schedulable and preemptable as normal processes.,Resoures can be shared by processes,open files and pending signals, address space, ?,Resources can be shared by threads,open files and pending signals, address space, ?,POSIX-compliant pthread libraries that use Linuxs lightweight processes,LinuxThreadsIBMs Next Generation Posix Threading Package (NGPT),task_struct,