I want to write a bit about a project of mine. Actually, I want to write about the topic of my m.sc. thesis, which i finished recently. As the title of this post implies, the thesis was about the Cell processor which powers the PlayStation 3 (among other things), and .NET.
The Cell processor has received a lot of attention, in part because Sony's chose to use it for the PS3, but also because of it's performance and design merits. Let's have a very brief look at what those merits are.
Cell is essentially a PowerPC chip with eight additional vector processors. The PowerPC core (PPE) is what runs the operating system and most programs. The vector processors (SPUs) are designed to be very fast at numeric computations, while maintaining at least some ability to do other kinds of work.
Basically all programs running on the Cell starts on the PPE. Some programs then choose to take advantage of the SPUs to offload some computations.
That's the super short description of Cell, there are plenty of articles on the net about the processor, you can start at wikipedia, for example: http://en.wikipedia.org/wiki/Cell_(microprocessor)
All of this wouldn't matter too much (to mee, anyway), if the PS3 was a closed system, like consoles usually are. But Sony did a really good thing when they decided to open the PS3 to Linux. And not only that, Sony and IBM (who designed Cell) also provides free of charge an SDK for Cell with compilers, libraries and such.
Now, how does .NET relate to this? Well, the Cell SDK comes with c, c++ and fortran compilers, and although those languages are performant, flexible and sometimes necessary to use, I think that being able to use .NET on the SPUs has the same kinds of advantages that .NET has on normal CPUs: Productivity, ease of use and so on.
Therefore I wanted to make it possible to run .NET code on the SPUs. That is what my thesis was all about, and that is what my buddy Klaus Hansen and I did.
We built a compiler which compiles .NET bytecode to SPU machine code, and created a library for managing the SPUs. Since Mono supports PowerPC we implemented the compiler purely in c#.
What this means is that it for example is possible to take an existing .NET application which runs on Mono, and make computationally intensive parts of the program execute on the SPUs.
In the next part, I'll show an example of using this framework, give some more status on what it's possible to do with it now, and what parts I'm working on improving now. If you want to try it out now, it's all available on http://code.google.com/p/celldotnet/. The released version (0.11) is the most stable version so far, but the subversion trunk might be more fun.
Note that since this is alpha software, you should probably have/get considerably more knowledge about Cell than I've covered here.
søndag den 4. maj 2008
Hello world
So this is my new blog and my first post.
I'll be blogging about software development, mainly .NET-related.
I'll be blogging about software development, mainly .NET-related.
Abonner på:
Opslag (Atom)