The data segment includes static and global variables that have been initialized. Because these variables can be modified, a copy-on-write mechanism is employed.
Copy-on-write
In copy on write, the child process shares the same physical pages as the parent for the data segment.
The page table entries are marked as read-only. If either process attempts to write to a page, a page fault occurs.
The kernel handles the page fault by duplicating the page, providing each process with its own private copy.
The page table entry is then updated to point to the new page, and the write operation proceeds.