Saturday, 26 April 2008

Threading in OGE

I recently committed the new threading code for OGE. It's still work in progress with changes needing to be made and more features to be added but the basis is there now.

In the old OGE code, a SystemThread allowed one or more System's to be initialised onto it and ticked/updated at regular intervals. In the new version instead of each System working out if it should update or not, each SystemThread goes through a SystemController. Using both of these, different ways of managing time can be implemented. Currently we have a "Fast" implementation which the SystemThreadFast class passes the current time (when it receives it) to all of the SystemController's. Each SystemController checks to see if it's System should be ticked.

Overall this keeps a lot of threading detail away from the user, so hopefully they won't need to know a huge amount about multi threading before using OGE.

Friday, 11 April 2008

Six Day Weekend

I havent blogged in a while because I have been fairly busy with uni and OGE, but hopefully from now I can be a bit more relaxed.

Firstly, I have a 6 day weekend now as most of my units in uni are coursework based, we managed to get our 2 lectures fit into a single day. This of course saves me a lot of time (an hour travel every day) and money, which i can now use to buy cheap DVDs...

Secondly, Leanne and I, came up with a schedule for me to use that will allow me to do all the work I need to but to have free time as well. Usually I end up thinking that I should be working nearly all the time, because there's no set schedule that I can stick to. So now I have OGE scheduled meaning I can definitely keep working on that as well as get all my work done.

For OGE, I just committed the first public preview of OGE utilities to SVN, there's obviously a lot to add to it still. Once it has been documented and enough features added to it then work can be started on the core, which will be a lot more fun.

The dependencies for the core is now POCO and Intel's Threading Building Blocks. The latter we added to be able to get as much performance as we can out of threading in OGE, as they include a lot of very useful utilities. I don't think we will end up using their parrallel code, as OGE will manage its own threads, but atomic primitives, fast mutexs and concurrent containers will be very useful.