View Single Post
Old 05-15-2008, 06:56 AM   #4 (permalink)
void
True Techie
 
void's Avatar
 
Join Date: Oct 2005
Posts: 199
Default Re: Operating system concepts

A thread is a separate path of execution through an instance of a program contained within the address space of a process (In Linux a thread is implemented as a special process). A process, 'lightweight' or not, is an instance of a program in its own address space. By lightweight I understand you mean the memory size that a process will consume. This is determined by the kernel at runtime and will allocate the processes address space accordingly. This may increase during runtime with the creation of threads and allocation of heap memory. You can not determine what the kernel will do, your process may even be killed by the Linux kernel OOM Killer in certain situations. For more information read the Advance Linux Programming book, it contains chapters dedicated to threads and processes with programming examples in C using pthreads and the exec* family of function calls.
void is offline   Reply With Quote