Sunday, September 25, 2005

Windows 98

Wow...I knew that Windows 98 was screwed up, but I didn't know it was this bad.


"In addition to containing a large clump of old 16-bit assembly code in the kernel, Windows 98 had two other serious problems. First, although it was a multiprogramming system, the kernel itself was not reentrant. If a process was busy manipulating some kernel data structure and then suddenly its quantum ran out and another process started running, the new process might find the data structure in an inconsistent state. To prevent this type of problem, after entering the kernel, most processes first acquired a giant mutex covering the whole system before doing anything. While this approach eliminated potential inconsistencies, it also eliminated much of the value of multiprogramming since processes were frequently forced to wait for unrelated processes to leave the kernel before they could enter it.

Second, each Windows 98 process had a 4-GB virtual address space. Of this, 2 GB was completely private to the process. However, the next 1 GB was shared (writably)among all other processes in the system. The bottom 1 MB was also shared among all processes to allow them to access the MS-DOS interrupt vectors. This sharing facility was used heavily by most Windows 98 applications. As a consequence, a bug in one program could wipe out key data structures used by unrelated processes, leading to them all crashing. Worse yet, the last 1 GB was shared (writably) with the kernel and contained some critical kernel data structures. Any rogue program that overwrote these data structures with garbage could bring down the system. The obvious solution of not putting kernel data structures in user space was not possible because this feature was essential to making old MS-DOS programs work under Windows 98."


It's amazing how much bad design was forced on users just to preserve a little bit of backwards-compatibility for MS-DOS applications. By the way, that passage is taken from Andrew Tannenbaum's Modern Operating Systems.

0 Comments:

Post a Comment

<< Home