A process in a multi-threaded system is the changeable entity. It must be considered as an execution frame. It has all traditional process attributes, such as:
Process ID, process group ID, user ID, and group ID
Environment
Working directory.
A process also provides a common address space and common system resources:
File descriptors
Signal actions
Shared libraries
Inter-process communication tools (such as message queues, pipes, semaphores, or shared memory).
Thread Properties
A thread is the schedulable entity. It has only those properties that are required to ensure its independent flow of control. These include the following properties:
Stack
Scheduling properties (such as policy or priority)
Set of pending and blocked signals
Some thread-specific data.
An example of thread-specific data is the error indicator, errno. In multi-threaded systems, errno is no longer a global variable, but usually a subroutine returning a thread-specific errno value. Some other systems may provide other implementations of errno.
Threads within a process must not be considered as a group of processes. All threads share the same address space. This means that two pointers having the same value in two threads refer to the same data. Also, if any thread changes one of the shared system resources, all threads within the process are affected. For example, if a thread closes a file, the file is closed for all threads.