Hi Pavel,
I'm looking at PosixSharedMemory again since I have to write a Master student proposal and I think this could be a good topic. I'm not really expert on SharedMemory, so I'm going to share what I have in mind, we can discuss about it, you could also co-supervise the student indirectly (though officially the supervisor has to be VUB staff).
Implementation-wise, I was thinking what could be interesting are:
- Making PosixSharedMemory compatible with TaskIt so from you image you can create a SharedMemory buffer, spawn another image+VM and attach it to the shared memory to have multiple threads working on the shared section.
- Add the #at:if:put: primitive, which write into the shared memory using compare and swap instruction for efficient thread-safe access.
- Add on SharedMemory all the primitives to read/write native types to the buffer (int64, double, etc.) with CAS and non CAS instructions.
- Maybe add APIs to read/write objects through Fuel to pass them by copy, though this looks difficult in some cases.
- Implement a lock system or a semaphore system on top of the CAS��
- implement lock-free and lock-full algorithm using CAS and non CAS instructions (I think a first try would be parallelSort on a 1Gb buffer of int32 with 4 native threads)
What do you think ? Do you have ideas ? Are you interested ? Do you thing having a student on this would be nice ?
The master thesis proposal has to include a research question. I am not sure what other languages do regarding shared memory.It's not clear so far what the research question is.
Best,