Subject: Windows 7's dirty secrets revealed
From: Richard Rasker <spamtrap@linetec.nl> (Linetec)
Date: Thursday 19 Nov 2009 18:07:34
Groups: comp.os.linux.advocacy
An interesting look under the hood of Windows -- and in particular Vista 7:
http://www.theregister.co.uk/2009/11/18/windows_7_heart/
It would appear that quite a bit of criticism on the technical
implementation of Windows and the knowledge of Microsoft's programmers
actually isn't all that far off the mark:
- Criticism: Windows is such a convoluted mess that even Microsoft doesn't
understand it any more:
"the operating system is full of internal dependencies, and as Russinovich
admitted: "We don't really understand those dependencies".
Engineers have added features to low-level APIs that assume the presence
of dynamic link libraries (DLLs) that belong with higher level APIs, and
when you try to extract just those low-level components, they break."
The upside here is of course that they're actually working on improving
things in this respect, even though I think that the *nix way of dealing
with libraries is far superior.
- Criticism: Windows depends heavily on dirty hacks to offer at least the
illusion of speed:
"Microsoft has been in the habit of combining unrelated APIs into the same
DLL for performance reasons."
and
"Microsoft also picked out 300 common user actions, such as clicking the
Start menu or opening Control Panel, and gave them intensive optimisation
to improve perceived performance."
- Criticism: Windows encourages sloppy, messy programming:
"How about reliability? This was fascinating. Microsoft observed that 15
per cent of all user-mode crashes and 30 per cent of shutdown crashes were
caused by heap corruption: applications that try to access freed memory,
or memory beyond what is allocated. Its solution was a feature called the
Fault Tolerant Heap (FTH).
...
"The user gets better reliability at the expense of performance, which
suffers by up to 15 per cent or so, while buggy applications work better
than you would expect."
I really don't think that this is a good idea. If there's one way to make a
computer behave less predictable and perhaps make programmers lazy and
sloppy, it's to implement fault tolerance for software bugs.
Richard Rasker
Comments
David Gerard
2009-11-20 20:32:27
Natasiel
2009-11-20 22:07:57
Civilisation II has been released on Windows 3.11 then somewhere in the code, the application freed some memory. Due to a bug in Windows 3.11, the memory was not properly freed and Civilisation had to access this "not properly freed memory" to read some data. This bug has been fixed in Windows 95, but the proper fix broke Civilisation II. So, binary speaking, to keep backward compatibility, Windows 95 had a hack to verify if the calling application was civ2.exe before freeing memory.
This is but one known of the many "features" inside the hidden Windows code. Wine has a better win32 API implementation than any Windows. Otherwordly, to be 100% compatible, Wine has to implement bugs.
-Dominic
David Gerard
2009-11-20 22:19:34
The problem is that if you buy Windows 95 and your old programs don't work, you're not going to blame the old program - you're going to blame the new OS. So they have to do stuff like that. That's the pain of selling an OS for proprietary software. With free software, people are used to recompiling - GNU/Linux has extremely bad backwards binary compatibility, because it doesn't need it.
Wine is so far resisting app-specific hacks (Crossover has a few, but the winehq tree doesn't), but yeah, eventually it'll have to implement them. At the moment it confines itself to accurately reproducing more general Windows bugs ;-) Test-driven development, no new features without a conformance test, etc.
Roy Schestowitz
2009-11-20 23:43:33
David Gerard
2009-11-21 00:02:30
Yuhong Bao
2009-11-21 05:49:37
Yuhong Bao
2009-11-21 05:52:45
Roy Schestowitz
2009-11-21 10:08:28
Vista architecture. See? That's why it's called Vista 7.
Yuhong Bao
2009-11-21 21:18:36
Roy Schestowitz
2009-11-21 21:23:50
Yuhong Bao
2009-11-21 21:34:46
Roy Schestowitz
2009-11-21 22:02:02