11.08.2011

Yay, it works

Today was a really good day. I could say this because of the reason I'm typing this right now, but thinking about, the whole day was full of stuff that had to be done for a longer or shorter and I finally finished off all them. This in order enabled me to finish one the things I wanted to have finished a few days ago: the special mutex system I need to create the thread system for my game engine. I made some false assumptions the days before and after a day full of resolutions and a lengthy session of Arx Fatalis (dayum, I love this game!), said myself to brush them all away and found a solution to properly test the system against all the odds I could come up with. I do now know how to handle this sort of custom mutex construct and I'm glad I didn't just moved the finishing to tomorrow (well, technically it's already tomorrow...) but right now at this very moment after watching a new Let's Play video of my favorite Let's Play-er. It pays off to utilize any sugar shock you can, I say you! Also, I did have too much coke this evening, which may also be another reason for why I'm still full of opportunity only held back by the fact that I should go to bed now and not later to not come late or so...

Anyway, though it always worked without, I also implement a little security measure that's highly important depending on how your system schedules threads and processes. Haven't encountered a moment where the problem kicked in, but I know that it can - writing parallel programs always requires you to think any possible timeline-correct permutation of all parallely executed program codes. I'm effectively trying to convert any typical racing condition know when accessing ressources to a query-based system, which works quite as it seems. No aliased access orders, no deadlocks and so segmentation faults as long as the data required to use a queried mutex by a thread won't get deleted when the thread ends. In 2 of 9 cases I got segmentation faults due to this and it really shows how sensitive one must act in such a complex system. It's one of those things I designed that I'd personally call complex. Most code I create requires no complex, but "I'm-right-in-the-subject" thinking to understand or even appreciate it. But this one... Well, it's not really special after all but more a basic tool to force an ensured access order to certain ressources. I'm proud, seriously. It's something I can even use in my bachelor or event master thesis cause it enables you to, well, effectively remove most racing conditions in realtime applications with non-realtime schedulers.

So yeah, I'm so proud on it right now that I probably forget that there atleast a million of other peoples out there using right now. Or not. Or maybe I'm simply too much on coke to take a nap and want to dump out about me and my computer. I feel like Patricia Tannis when she personifies her program as it was able to calculate a few calculate bits of Eridian glyphs on her digside on Pandora before the executing started to melt due to either too intense amounts of calculations or just because of the fact that this Planets will be the death of everyone, thus also including the right in this moment personified program and the executing computer as it's physical form.

Geez, I should run around the block right now. Too bad that our block is rather large and my lungs asthma-ridden enough to not even bear a shopping tour without a longer pause afterwards. Why am I typing this here anyway....

PS: Never drink too much coke in the evening. You may suffer from ingenious ideas and instant implementations.

No comments: