Each process has four sections that is:
Similarly, even thread has these sections but text, Data and, Heap sections are common to all the threads but only the stack section is separate for each thread.
A multithreaded aware operating system also needs to keep track of threads. The items that the operating system must store that are unique to each thread are:
- Thread ID
- Stack Pointer, Saved Registers and Instruction Pointer(PC)
- Stack(Local variables, temporary variables, return address)
- Signal Mask
- Priority(Scheduling information)
The items that are shared among threads within a process are:
- Text segment (instructions)
- Data segment (static and global data)
- BSS segment (uninitialized data)
- Open file descriptors
- Signals
- Current working directory
- User and group IDs
Diag-1: Memory Layout with two Threads


Relevant Posts:
- Thread Introduction
- Types of Thread: User-Level and Kernel Threads
- Memory layout of a process
- Thread Control Block(TCB)
- Characteristics of a Thread
- Pros and cons of a Thread
- Process Vs Thread
- Thread Programming
Categories: Operating system (OS)
Leave a Reply