Software Programming and Cooking

Apart from the incidental choice of word “Cooking” to describe Windows Mobile ROM development process, I found out that recently there is really a great similarity between software programming and cooking.

With cooking, you master the science of key culinary skills, and then with some creativity,  you venture into dishing out different cuisine. I am not a food connoisseur, so you don’t expect me to go into details on this, but you should get the point.


Now, turning over to software programming (oh my, I suddenly feel so at ease), there is alot of similarities. You need to master the fundamental programming techniques, and you exposed into different type of programming; UI programming, Web programming, Data integration programming, Kernel programming .

And yes, recently I had ventured into kernel programming, something I have never imagined in the past. The reality though is that I was just meddling around with the Linux kernel source, thanks to  Opensource.

So I looked at the various kernel source codes published by various xda-developers, each of which addresses different aspect of kernel improvements. I decided to make a kernel that takes the best of all. The end product is one kernel that incorporates sztupy‘s Universal Lagfix, supercurio‘s Voodoo display tweak (Gamma and Sharpness enhancement), raspdeep‘s overclock and undervolt, and hardcore/ykk_five 341MB memory hack.

Universal Lagfix addresses the poor performance  inherent in Samsung’s original RFS-based storage. The fix is about reformatting specific data partitions into Linux ext4 format, and by doing that, you can expect 200-300% of improvement. The applications no longer run with intermittent freezes (caused by the lag in the file system access), and responses are therefore almost instantaneously.

So one would think, with a 200-300% improvement in performance, what is there to optimise further?

Now Samsung Galaxy S comes with 512MB of RAM, as you would expect from a top tier smart phones in the market. The problem with Galaxy S, is that the amount of RAM available for end user, is only 304MB. There are more than 200MB of RAM reserved for the system, such as video, android OS, etc. It didn’t help when Android has a bad habit of loading installed applications and widgets on start up, which means by the time your phone boots up successfully, you would be lucky to have 80MB RAM free for use. Now in Froyo, the memory management is far more robust than Eclair, but still, with a limited amount of free memory, you end up having frequent memory clean up performed by the OS, resulting in unnecessary instability in the system.  Both ykk_five and hardcore researched and figured out the kernel configuration for reserved memory. With some trial and error (as eliminating memory reservation causes problem with certain applications such as video recording or 3G video call), the folks in xda-developers established the optimal memory configuration. The result is 341MB of available memory (as compared to 304MB). That ensures some stability much needed in the Samsung Galaxy S.

And you would think by now; Samsung must have done something wrong if any more tweaks can be uncovered. You bet! The question now is how much have we optimised the  Cortex A8  processor, i.e. the brain of Galaxy S.  When looking at the kernel source code, folks have figured out that there are compiler flags we could use to compile the kernel to take advantage of the A8 Cortex CPU architecture. Not only that, the team has figured that the CPU can be over-clocked, just like how the PC geeks would have done to their desktop processors.  Additionally, the CPU is currently running at a voltage level that can be further tweaked, i.e. reducing the voltage consumption value  for each CPU frequency step. The end result, is a turbo-charged but super “air-cooled” (and efficient)  Galaxy-S. Unfortunately, there is no real tool out there to measure CPU voltage consumption scientifically, so one can only rely on feel (e.g. lower temperature) and experience (battery consumption level). That said, the under-volt tweak is still being refined as we speak, just to determine the optimal level of voltage that is low enough but not at the expense of CPU running reliably at the desired frequency.

The final installment of the tweak is display. supercurio had definitely done far more research than anybody in xda-developers, and probably even in Samsung development team, to improve on the display gamma and sharpness. More explanation can be found in his web-site, so I wouldn’t regurgitate what has already been documented.

And of course, there are some minor tweaks I did along the way, as I touched the source code for the above tweaks. However, these are experimental at this point, it’s probably not smart for me to disclose until I can conclusively determine the value of such tweaks.

Did I mention the code name of the kernel I have customised? Yet Another Optimised Kernel (YA OK!) … So go flash this kernel  if you happen to own a Galaxy S (sorry only for Europe and Asia Galaxy S owners) and want to turbo charge your phone. You will be surprise how buttery smooth your phone is, and it is definitely much faster than the Voodoo’ed Galaxy S I had awhile back.

Here’s a quick video capture of my Galaxy S running on YA OK Kernel. Enjoy.

114 thoughts on “Software Programming and Cooking

  1. fantastic publish, very informative. I’m wondering why the other specialists of this sector
    do not notice this. You must proceed your writing.
    I’m confident, you’ve a great readers’ base already!

  2. This blog was… how do I say it? Relevant!! Finally I have found something that helped me.

    Thank you!
    instant loans online personal loans for bad credit payday loans direct lenders only cheap loan short term loans
    mobile loans cash loans online payday loans mobile i need money car title loan i need money today
    unsecured loans for people with bad credit instant payday loans online cheap loan what is an unsecured loan get money fast payday loans
    no credit check personal loans for people with bad credit payday loans online no credit check money loans installment loans direct
    lenders mobile loan cash advance loans payday loan no credit check online payday loans no credit check how
    to make fast money title loans short term loans online loans for people with bad credit car title loans online

  3. JSGlobal Hosting has been providing affordable, reliable solutions to Individuals
    and Small to Medium Sized companies and businesses.
    We place a lot of emphasis on customer satisfaction by
    providing the safest environment for your website and the highest server uptime possible which translates to a higher uptime for your website.
    We provide 100% network uptime guarantee on all our hosting packages.
    Keeping this in view we have servers in the world’s safest and best
    Data Centers so that your website stays up at all times.

  4. ‘Burn After Reading’ is the 2008 dark comedy in which
    Pitt characterized a personal trainer who stumbled upon highly
    classified information. So, yes, it is possible to find legal free music downloads online, but at a price,
    and yes, bootleg movie download are on the rise again because the regular prices of these movie
    and music tracks are becoming too expensive. This
    movie, directed by the great Otto Preminger is a courtroom drama of a murder
    trial in which a lieutenant in the army is charged with murdering a bar owner who had raped
    the lieutenant’s wife.

  5. Hello there I am so delighted I found your webpage, I really found you by error, while I was looking on Digg for something else,
    Anyways I am here now and would just like to say many thanks for a tremendous post and a all round entertaining blog (I
    also love the theme/design), I don’t have time to read it all at the minute but I have bookmarked it and also added your RSS feeds,
    so when I have time I will be back to read much more,
    Please do keep up the excellent work.

  6. This design is steller! You definitely know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved too start my owwn blog (well, almost…HaHa!) Great job.
    I really enjoyed what you had to say, and more tha
    that, how you presented it. Too cool!

  7. I feel that is amoing the so much important information for me.
    And i’m satisfied studying your article. But should remark on some normal things,
    The site taste is wonderful, the articles is actually nice : D.
    Excellent activity, cheers

  8. Hello terrific blog! Does running a blog like this require a large
    amount of work? I’ve no expertise in programming however I
    was hoping to start my own blog soon. Anyways, if
    you have any recommendations or tips for new blog owners please share.
    I know this is off subject however I simply needed
    to ask. Thank you!

  9. My every sense is strained as to whatever will appear from somewhere.
    “After she slowly regains her senses, she reaches for me, and pulls me to her embrace. “The
    party was just getting started as we got there, since we were just too
    old to actually show up at a “”cool”” time.

  10. An impressive share! I have just forwarded this onto a colleague who
    has been doing a little homework on this. And he
    in fact ordered me breakfast simply because I discovered it for him…

    lol. So allow me to reword this…. Thank YOU for the meal!!
    But yeah, thanx for spending time to discuss this issue here on your blog.

  11. Magnificent beat ! I wish to apprentice while you amend your web site,
    how can i subscribe for a blog website? The account helped me a acceptable deal.

    I had been a little bit acquainted of this your broadcast provided bright clear concept

Leave a Reply to Myrtle Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s