|Proposed by Marcus Ihlar (profile, biography) Don't forget to submit this proposal to official Google Melange site too!
How will I do that project
First of all I need to become fully acquainted with the Pharo / Squeak threads API (This is something I will do before the actual project will start). The second step will be to select a suitable image to work with.
When this is done I need to decide whether the modifications should be made directly inside the classes or if thread safe wrappers should be used instead. This is an important design decision that should be made together with my mentor and possibly more people in the community.
The actual work of improving the non-thread-safe parts will be done by repeating a process on different parts of the image. The process will look something like this:
1) Choose a set of classes to study
2) Manually study the code to find unsafe regions
3) Write test programs to detect possible race conditions
4) Make appropriate changes in the code
5) Run test programs to verify thread safety and identify potential deadlocking
Steps 4 and 5 are repeated until the region is safe.
In step 4 there will contain different design decisions eg. whether synchronization constructs should be used or if objects should be made immutable.
What methodologies will I use
I plan to work in a very agile manner with weekly deadlines, this project will by nature be test driven.
Suggested timeline and milestones
1. Preparation: Choice of image and design methodology, start building test programs. 1 to 2 weeks.
2. A new thread safe region each one or two weeks.
Where I see the risks
Some classes can be very complex and difficult to grasp and it's very important that the semantics of the code is unchanged. Thread safety can bring performance penalties, maybe it will be to severe in some cases.
How the results will look like
A Smalltalk image that is suitable for running on a VM supporting multicores.