shmat, I am able to access the data stored in one program from another program. Here's the gist of the code:
key=ftok("shared.c",'c'); shmid=shmget(key,1024,0644|IPC_CREAT); data=shmat(shmid,(void *)0,0); printf("Enter the data"); gets(data);
Similarly I can write another program and use
shmat there to access the data.
Now I wanted to know how can I access it from the host operating system. Since the shared memory id will be different in the host memory,
shmat won't work.
How can I access the shared memory from the host machine?
can we do it in this way: we know that there exist a page table with respect to each operating system in a hypervisor which will maps the logical address to physical address,there is a pmap table which maps the physical address of the hypervisor with the physical address of the host machine,and also there exist shadow page tables in hypervisor which maps the logical guest address to host physical address. Is there any way of accessing the shadow page tables or pagetable corresponding to the OS