DragonFly BSD
DragonFly kernel List (threaded) for 2013-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[GSOC] Userland System V IPC


From: grigore larisa <larisagrigore@xxxxxxxxx>
Date: Wed, 12 Jun 2013 09:07:14 +0300

--089e011847843fd2ae04deeed3c1
Content-Type: text/plain; charset=ISO-8859-1

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

--089e011847843fd2ae04deeed3c1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi everyone,<div><span style=3D"background-color:rgb(255,2=
55,255)"><br></span></div><div style><span style=3D"background-color:rgb(25=
5,255,255)">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.=A0</span></div>
<div style><span style=3D"background-color:rgb(255,255,255)"><br></span></d=
iv><div style><span style=3D"background-color:rgb(255,255,255)">All operati=
ons as creation/destruction will be implemented through messages sent to a =
daemon that will take care of the management of System V IPC resources, thi=
ngs 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 cli=
ent process and daemon will use a separate channel for communication.</span=
></div>
<div style><span style=3D"background-color:rgb(255,255,255)"><br></span></d=
iv><div style><span style=3D"background-color:rgb(255,255,255)">Security is=
 ensure with kernel help. I think that Linux implementation for SysV shared=
 memory is a good starting point.=A0<span style=3D"color:rgb(0,0,0);font-fa=
mily:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height:19.187=
5px">When=A0</span><em style=3D"margin:0px;padding:0px;border:0px;outline:0=
px;vertical-align:baseline;color:rgb(0,0,0);font-family:Arial,&#39;Helvetic=
a Neue&#39;,Helvetica,sans-serif;line-height:19.1875px">shmget()</em><span =
style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:basel=
ine;color:rgb(0,0,0);font-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,s=
ans-serif;line-height:19.1875px">[1]</span><span style=3D"color:rgb(0,0,0);=
font-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height=
:19.1875px">=A0is called a file is allocated</span><span style=3D"color:rgb=
(0,0,0);font-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;lin=
e-height:19.1875px">=A0assigning it some operations (in our case,=A0</span>=
<em style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:b=
aseline;color:rgb(0,0,0);font-family:Arial,&#39;Helvetica Neue&#39;,Helveti=
ca,sans-serif;line-height:19.1875px">open</em><span style=3D"color:rgb(0,0,=
0);font-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-hei=
ght:19.1875px">,</span><em style=3D"margin:0px;padding:0px;border:0px;outli=
ne:0px;vertical-align:baseline;color:rgb(0,0,0);font-family:Arial,&#39;Helv=
etica Neue&#39;,Helvetica,sans-serif;line-height:19.1875px">=A0mmap</em><sp=
an style=3D"color:rgb(0,0,0);font-family:Arial,&#39;Helvetica Neue&#39;,Hel=
vetica,sans-serif;line-height:19.1875px">=A0and=A0</span><em style=3D"margi=
n:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;color:rgb(=
0,0,0);font-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line=
-height:19.1875px">close</em><span style=3D"color:rgb(0,0,0);font-family:Ar=
ial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height:19.1875px">=
=A0is enough). The easiest way to privide that functionality is using a dri=
ver.=A0</span></span></div>
<div style><span style=3D"color:rgb(0,0,0);font-family:Arial,&#39;Helvetica=
 Neue&#39;,Helvetica,sans-serif;line-height:19.1875px;background-color:rgb(=
255,255,255)"><br></span></div><div style><span style=3D"background-color:r=
gb(255,255,255)"><span style=3D"color:rgb(0,0,0);font-family:Arial,&#39;Hel=
vetica Neue&#39;,Helvetica,sans-serif;line-height:19.1875px">For shared mem=
ory, files will be created in order to be mapped in the process address spa=
ce. Semaphores can be implemented similar to Posix Unnamed semaphores (memo=
ry-based semaphores)[2]. </span><span style=3D"color:rgb(0,0,0);font-family=
:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height:19.1875px"=
>In message queues case, if it is time, client will map a file in its addre=
ss space. The file will contain, beside messages written by processes, some=
 control information.</span><span style=3D"color:rgb(0,0,0);font-family:Ari=
al,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height:19.1875px"><br=
>
</span></span></div><div style><span style=3D"color:rgb(0,0,0);font-family:=
Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height:19.1875px;b=
ackground-color:rgb(255,255,255)"><br></span></div><div style><span style=
=3D"background-color:rgb(255,255,255)"><span style=3D"color:rgb(0,0,0);font=
-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height:19.=
1875px">During development phase, I will implement some simple tests but al=
so 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 impl=
ementation. The last step is to identify solutions such that the userland=
=A0</span><span style=3D"color:rgb(0,0,0);font-family:Arial,&#39;Helvetica =
Neue&#39;,Helvetica,sans-serif;line-height:19.5px">implementation performs =
on par with or better than the kernel implementation.</span></span></div>
<div style><span style=3D"color:rgb(0,0,0);font-family:Arial,&#39;Helvetica=
 Neue&#39;,Helvetica,sans-serif;line-height:19.5px;background-color:rgb(255=
,255,255)"><br></span></div><div style><span style=3D"color:rgb(0,0,0);font=
-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height:19.=
5px;background-color:rgb(255,255,255)">More details can be found in my prop=
osal[3].</span></div>
<div style><span style=3D"color:rgb(0,0,0);font-family:Arial,&#39;Helvetica=
 Neue&#39;,Helvetica,sans-serif;line-height:19.5px;background-color:rgb(255=
,255,255)"><br></span></div><div style><span style=3D"background-color:rgb(=
255,255,255)"><span style=3D"color:rgb(0,0,0);font-family:Arial,&#39;Helvet=
ica Neue&#39;,Helvetica,sans-serif;line-height:19.5px">[1]=A0</span><span s=
tyle=3D"color:rgb(0,0,0);font-family:Arial,&#39;Helvetica Neue&#39;,Helveti=
ca,sans-serif;line-height:19.1875px"><a href=3D"http://lxr.linux.no/linux+v=
3.9/mm/shmem.c#L2898">http://lxr.linux.no/linux+v3.9/mm/shmem.c#L2898</a></=
span></span></div>
<div style><span style=3D"background-color:rgb(255,255,255)"><span style=3D=
"color:rgb(0,0,0);font-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans=
-serif;line-height:19.1875px">[2]=A0</span><span style=3D"color:rgb(0,0,0);=
font-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans-serif;line-height=
:19.1875px"><a href=3D"http://linux.die.net/man/7/sem_overview";>http://linu=
x.die.net/man/7/sem_overview</a></span></span></div>
<div style><span style=3D"background-color:rgb(255,255,255)"><span style=3D=
"color:rgb(0,0,0);font-family:Arial,&#39;Helvetica Neue&#39;,Helvetica,sans=
-serif;line-height:19.5px">[3]=A0</span><a href=3D"http://www.google-melang=
e.com/gsoc/proposal/review/google/gsoc2013/larisagrigore/12001">http://www.=
google-melange.com/gsoc/proposal/review/google/gsoc2013/larisagrigore/12001=
</a></span></div>
<div style><span style=3D"background-color:rgb(255,255,255)"><br></span></d=
iv><div style><br></div><div style>Thanks,<br></div><div style><span style=
=3D"background-color:rgb(255,255,255)">Larisa Grigore</span></div></div>

--089e011847843fd2ae04deeed3c1--



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]