Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
What should happen, when the process owning a piece of data decides to unshare it while other processes share the data as well? ???
Should they be killed at once as they cannot use the data anymore? Should they be killed when accessing the shared data? Should I copy the physical adresses of the data's pages and not dispose them when the first process dies?
that mainly depends on what you plan to do with the object. Imho, an object that is no longer owned by any process should be released (though that's not the way it works in Unix). You could also imagine to receive a signal telling "peer X using the shmem is now gone", and do whatever you want with the info (release aswell, respawn a process, etc.)
Unless you want to introduce some sort of persistance into the shared memory, then you should probably have a reference count on them so that when the last user releases it, the memory is freed.