Q:

When running a program in parallel on multiple processors in shared-memory space, does each processor have it's own .TEXT segment?

This user asked why two Linux processes of the same file could not share the same text segment, to which the responder replied that modern Operating Systems sandbox programs by default and shared libraries are the only entities not duplicated by the OS (not including storage memory).
While I was researching earlier, however, I found(1) other(2) questions(3) that talked about how the operating system is trying to balance optimization with process-memory protection, and so through a combination of virtual memory addressing and page table lookups, as well as optimizations like copy-on-write, two programs could be sharing the same .TEXT segment, although they wouldn't be aware of it. Am I correct in saying this?

Excerpt: So the real thing is that text section could be shared by mapping different virtual pages to the same physical pages (called frames).

The reason I ask is because we're working on a molecular dynamics simulator that runs in a shared memory-model and we're trying to determine whether there is just one processor tasked with the burden of holding the program code, or if every processor requires their own local copy. (There are 6,000 processors.)
The thing that confuses me as well is that the OpenMP Memory Model is "shared", but each thread has "private access to each variable" (slide 5/19), which sounds a lot like the shared library [so/dll] model, and I'm wondering if that's how shared resources operate in general.
Additional Source - This question was asking about shared memory, but in terms of whether it was a specific location that all processes have access to. In his diagram, I want to know whether those three text segments can be simplified to one text segment and n-pointers, essentially.

A:

It looks like as misunderstanding here, partially because of different usage of "shared" term. I.e., sharing of text segment doesn't have much in common with OpenMP memory model.
Speaking on techical side, it's easy to just look at state of text page sharing under Linux. There are useful /proc//smaps files, where for each mapping Linux kernel reports size in Shared_Clean state (see man 5 proc for more details). 
For example, when I run single less /proc/self/smaps 
for 1st mapping I see
Shared_Clean:          0 kB
 Private_Clean:       108 kB
But after running 2nd less /proc/self/smaps
in another terminal at same machine I got
Shared_Clean:        108 kB
 Private_Clean:         0 kB
So, we see the code for /usr/bin/less is actually shared between different processes.
To me, the answer about "sandboxes" from 1st reference is not valid. We can see that sharing is here. You can try yor particular workload and see what occurs for real codes.

