[GSOC] System V IPC in userspace week10 report

Grigore Larisa larisagrigore at gmail.com
Mon Aug 26 10:03:03 PDT 2013


Hi all,

This week I have tested all I have implemented until now. Message queues
testing was a good way of testing shared memory and userland implementation
behavior when calling *fork*. Among others, I found some atypical behavior
when the parent removes the resource before the child finishes sysv
initialization (connect to daemon, inform about all resources used, etc)
and fixed it. I have also found scenarios when the memory used by clients
is not cleaned properly when another client removes a resource used by it.

Another bug was caused by using pthread_mutex/pthread_rwlock for
synchronizing access to semaphores and message queues. Those are
implemented using shared memory so sending a message or setting a semaphore
means writing in the shared memory area. Because more process can do this
(those using the sysv resource), a synchronization object is necessary. I
used pthread* but this can't work because
pthread_mutex_init/pthread_rwlock_init use malloc. To solve this issue I
have implemented a simple mutex inspired from pthread_mutex. Porting the
rwlock implies porting condition variables too.

Larisa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20130826/b6678f9a/attachment-0011.html>


More information about the Kernel mailing list