Monday, May 14, 2012

Windows

Last time when my Windows (7) crashed it was when it overfilled my 20 GB partition with SP1, about 1 year ago. It downloaded it and then increased my partition occupancy by 1 to 2 GB. Although i had all updates contained in SP1 already on my computer as i had my automatic updates turned on. Since i wasn't expecting anything like that, i knew i had about 1 GB free on my partition it definitely pissed me off and i started seriously thinking on migrating to Linux. Not that i love Linus Torvalds or any in the community so much. Seriously. I think they're OK and they're doing a good job trying to put up a competition to Microsoft, for free.

But now this morning something crossed my mind. I used to run Windows at idle in about 350 MB out of my 2 GB. Those are Windows processes only on a pretty typical if not outdated hardware.

So out of my 20 GB of Windows code on my hard drive, i'm using about 0.15%. Now we know those dlls have many copies in there as 7 and other Windows versions keeps all the dll versions for reversing updates, and all the downloads for some reason if not for reference in case of lawsuits, saving at each restore point, i don't know, i think overall there's 4-5 identical copies of each piece of code in there.

But my computer most of the time doesn't use not even 10% of those 50-100 processes in those 350MB of memory i just mentioned as they don't do anything most of the time. Most of the time there's 4 or 5 processes running, one probably manages memory, the video driver, network manager, windows manager and the one that actually does something. That one is probably the browser, but of course, the most overlooked and active and ubiquitous is the free and famous Flash from Adobe, formerly from Macromedia, that runs inside the browser, that uses about 90% of the processor time compared to all other processes and, of course, annoys us the most and most of us don't even know it exists. We can only feel its presence on the flashing commercials on the screens. Now flash washes some if its sins by powering youtube, and who of us would give that one up!

Some people write emails or input data. That doesn't even scratches the back of the enormous power of today's computers. Most of the load occurs when scrolling up and down or moving windows on the screen when the system has to redraw the window with everything on it so many times per second.

Why that loads it so much? That is another mis(t)ery. I once wrote a piece of code, a stereo spectrum analyser based on a fast Fourier transform, similar to the one in iTunes (the optional animated bars in top of it). Not using any of the graphic libraries, just API calls as i remember, for initialisations and drawing a line. It was calculating the fast Fourier transform in ten points for each channel in a loop about ten times a second redrawing anything at the same pace in a resizeable window, with colours to chose and scale. It was all 44K, but i think that's because you cannot write in Windows programs with API calls much shorter that that. It is still out there iguess on softpedia anyone to see. I will put a link. It is still buggy as i abandoned it but it works enough to show it's working. But the point is i once launched it ten times on the screen and it was working on each window and it wouldn't even "move" the processor. And that was a 400 MHz computer.

The irrational use and reuse of libraries at Windows got them to the point that there's probably more than 90% overhead on most of their software from the programming point of view, those discussed above are separate issues, but they should at least have taken care and brushed up the graphical part of it, especially since this is all it is, a graphical OS with other vague capabilities, and on top it's called Windows!

So a whole industry that builds hardware, memory, hard drives, motherboards, monitors, modems, routers, fiber optics, etc, i'm too mad to think of now, that works efficiently just to piss the crap out of everybody. I mean to run Flash.

And they didn't even took enough care to design those as to be IMPOSSIBLE to get viruses or malware or whatever it's called now. Or maybe they had their reasons. IBM designed the first PC and put if out there for every manufacturer. Once out there it never changed, only improved.

Now after all the technological wonders they really achieved as far as speed and performance, we have to migrate our personal data to cloud as it is not safe and portable on our own devices.

So let's summarize for Windows:
Efficiency of hard drive occupancy: 0.015%
Efficiency of RAM memory real use: 10%
Efficiency as using the processor (competing against flash): 1-10%
Overhead in irrational use/reuse of libraries? probably over 90%
Overhead of needles machine code instructions in most used code: probably 90%
Efficiency of running Flash: up to 90% on older hardware
Built in by design malware protection: little
Efficiency as saving us time as being maintenance free: it depends on everybody's perception.
Efficiency of being worry free?
Efficiency of keeping our data safe?
Efficiency in pissing everybody off?
Efficiency in spying?

Now isn't this the most impressive technological blunder of all human enterprises ever?

Now i remember this conversation with the manager of a small software division i worked for, and he convinced me about the necessity of using object oriented programming as being a technique of reusing code. Anyways i had to agree with him cause he was the boss.

That might be true for small and custom projects when you have readily available libraries, but now looking at Windows through a historical prospective, i think it would have been rational to write and rewrite everything from scratch, because we are not interested in that type of efficiency and economy and using can programming when talking about software that repeats that overhead continuously and as we speak on hundreds of millions of computers.

No comments:

Post a Comment

Friendly comments welcome

Note: Only a member of this blog may post a comment.