[GSOC] Userland System V IPC

grigore larisa larisagrigore at gmail.com
Tue Jun 11 23:07:14 PDT 2013


Hi everyone,

My name is Larisa Grigore and this summer I will be developing Userland
System V IPC (shared memory, semaphores and message queues). This project
aims to implement System V IPC mechanism in user-space in order to achive
good performance for heavy consumers.

All operations as creation/destruction will be implemented through messages
sent to a daemon that will take care of the management of System V IPC
resources, things that were normally done in kernel. For communicating with
the daemon, a process must register to it using a known named pipe. After
that, both client process and daemon will use a separate channel for
communication.

Security is ensure with kernel help. I think that Linux implementation for
SysV shared memory is a good starting point. When *shmget()*[1] is called a
file is allocated assigning it some operations (in our case, *open*,* mmap*
 and *close* is enough). The easiest way to privide that functionality is
using a driver.

For shared memory, files will be created in order to be mapped in the
process address space. Semaphores can be implemented similar to Posix
Unnamed semaphores (memory-based semaphores)[2]. In message queues case, if
it is time, client will map a file in its address space. The file will
contain, beside messages written by processes, some control information.

During development phase, I will implement some simple tests but also use
some simple testsuites already available. Finally, I will use stress
testsuites, benchmarks and see what is the performance of a heavy consumer
like PostgreSQL. This results will be compared to the existing kernel
implementation. The last step is to identify solutions such that the
userland implementation performs on par with or better than the kernel
implementation.

More details can be found in my proposal[3].

[1] http://lxr.linux.no/linux+v3.9/mm/shmem.c#L2898
[2] http://linux.die.net/man/7/sem_overview
[3]
http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/larisagrigore/12001


Thanks,
Larisa Grigore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20130612/4e03febb/attachment.html>


More information about the Kernel mailing list