This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Gsoc 2014 project proposal


Hi everyone, i' m an italian student in Computer Science and i want
try to apply for this year Google Summer of Code. I' ll apply for a
GLibC project and i want to share my project proposal before the
official submission with the community for receive any possible
feedback. You can also find me on IRC ( panzone ). I thank everyone
who spend their time reading my proposal and I hope i can spend the
summer working with you.


Name: Andrea Francesco Iuorio

Contacts: andreafrancesco.iuorio@gmail.com, panzone (IRC)

Project name: GNU C Library - ISO C11 Threads

Summary

GNU C Library provides a pthread implementation for multithreading
programming. With the introduction of C11, the ISO standard now
provides a specific library for some basic multithreading features
like thread handling, mutex managment and coditional variables. The
goal of this project is to implement the C11 multithreading standard
library using the GNU C Library pthread implementation: this way we
can move forward to C11 and, at the same time, we can have a working
implementation of C11 threads for every GLibC target.

Benefits

C11 provide a simple, portable and standard multithreading library.
With this project  the GNU C Library will have one of the more ( if
not the most ) important new feature aviable in the new C standard.
This means that developers can use the standard thread library during
development, making their program portable and they can compile any
programs that use the standard multithreading library.

Deliverables

An ISO C11 thread library implementation ( in more detail, an
implementation of threads.h functions and data structures ). This
library should be somewhat indipendent from the rest of C11 (
althought it may exist an exception as i notice in the implementation
plan ) so it can be seen as an usefull increment to the existing GLibC
code.

Plan

First, my other summer plans: I should take my degree on the
first/second week of July, so i' ll take one ( probabily two,
depending how the project is going ) day free in this period . Besides
that, i don' t have any other plans and i could garantee at least 40
hours weekly, probably more.

Regarding the implementation plan, I think i could see this project as
a two-step project:

1)First we should have a basic thread implementation and mutex
managment: this include simple threads managment and mutex creation,
lock and unlock for example. This way we can have some basic
multithreading programs working quickly and, as you can see in the
schedule below, i count to finish it before the mid-term evaluation
for having something that could be used ( for basic programs ) in time
for the evaluation.

2) Implementing the rest of the standard, probably in this order:
mutex types, conditional variables, thread storages  and one-time
functions.

As you can see, i propose a bottom-up approach. This way i can have a
working subset in time for the first evaluation and one can create
some simple multithreading programs for testing, benchmarking and so
on.

There are also an extra feature that, even if not completely relevant
to the C11 thread.h library, is quite usefull for thread programming
in general: atomic variables. C11 provide a separate implementation
and library for atomic variables ( stdatomic.h ). I decide to focus on
the threads.h library for this project but, as you can see in my
general schedule, i mantain some extra time because i don' t know at
the moment if i' ll need or if it is mandatory having atomic variables
for the thread.h implementation. If i don' t need it but i don' t have
any other problems, i could use my extra time to implement
stdatomic.h.

In more detail, i think to divide my time as follow:

April - 18 May

This period will be used to learn GNU codestyle conventions, the glibc
structure, its pthread interface and for reading the C11 reference. I'
ll also discuss with my mentor some project designs.

19 May - 22 June

This period will be used for the basic implementation: thread data
structures, thread handling and mutex basic managment.

N.B. 23 June - Mid term evaluation. My primary goal is to have a basic
and working function subset before the evaluation that, if possibile,
could pass the patch review.

23 June - 13 July

This period will be used for mutex types ( C11 possess three mutex
types ) and conditional variables. This way, at the end of this
period, we have all the functions to controll race codition expected
in the ISO standard.

14 July - 3 August

This period will be used for thread storage and one-time function
implementation.

I have a two-week emergency buffer for any problems that could emerge
during my work. If i finish my project before the deadline the
remaning time will be used for implementing some other C11 missing
features like atomic variables.

This is only a general schedule. I' ll decide with my mentor what
features i should implement on a weekly bases, depending by my
progresses and problems.

Communication

At the start of every week i' ll try to decide a weekly schedule of
features and functions which should be implemented in that week. For
this weekly meeting i think that email  could be a good way to mantain
a trace of what is doing and when is doing.

Beside that, i' ll work with IRC in idle , so my mentor could contact
me every moment.  I' m totally open for IRC meeting if there is any
necessity to clarify some aspect of my work.

For code review, i think that the best way is to use a personal public
repository. This way i can do my work more freely and my mentor ( and
anyone ) could see my project in real time at any moment. When i' ll
reach an important milestone i' ll submit a patch using the normal
GLibC commits procedure.

Qualification

I' m a forth year student in Computer Science in University of Milan.
For my thesis project, i work on a runtime layer for modular exception
handling and a compiler for an OO language. I also create, during this
work, a compiler for a c-like language for x86 architecture. I start
as a personal project a simple implementation of the C89 standard for
Windows but i never finished it. I love low-level programming and i
love simplicity and minimalism, so i love the C language, its standard
library and i think that they should be the basics that every
programmers should know so you can understand why i want to work on
GLibC. I have a good C knowledge, its standard library and, since i
tried to work on portable code on Windows i' m not completely new to
pthread. I wrote some compilers and i have read reference manuals for
assembly and code generation, but i never write a standard library for
a language ( or a real library in general ) so this could be the
perfect chance to make experience in library development.

-- 
Andrea Francesco Iuorio
Student in Computer Science, Università degli Studi di Milano
andreafrancesco.iuorio@gmail.com - GPG Key


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]