Sharing of Memory
Q3. Explain Sharing of Memory.
Ans. Each process has a segment table associated with it, which the dispatcher uses to define the hardware segment table when this process is given the CPU. Segments are shared when entries in the segment table of two different processes point to the same physical location.
Figure: Sharing of Memory
P1
Segment | Limit | Base |
0 | 1000 | 1400 |
1 | 400 | 2400 |
P2
Segment | Limit | Base |
0 | 1000 | 1400 |
1 | 400 | 4300 |
Figure: Physical Memory