|1. Can someone explain this behavior? |
I really can't, unless the account you're using to run this service doesn't have permissions to create such objects, or doesn't have access to your POSIX emulator. (shmget() is not in the Win32 SDK, but the equivalent function would be OpenFileMapping().)
2.Where does windows OS store the information about existing shared memory segment like where Linux stores in /proc/sysvipc/shm
It's hard to know what/how the memory is shared, but chances are you'd find what you're looking for in the Object Manager. I know there's an API to enumerate it, but I haven't looked into it. WinObj should show you, though.