Using shmget(), we can allocate a shared memory block of certain size in bytes and using shmat(), we attach this shared memory block to the address space of the calling process.
I need to check my understanding:
We have one process creating and attaching a shared memory using shmget() and shmat(), and another process that is attaching this shared memory to its address space using shmat().
Now the return address of this shared memory (using the shmat()) is different in the two processes because this is an virtual address.
However, the shared memory block itself has a single base physical address that is mapped to different virtual addresses of the processes sharing this memory. Is this correct?