[GSOC] System V IPC in userspace week10 report
larisagrigore at gmail.com
Mon Aug 26 10:03:03 PDT 2013
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernel