Monday, August 2, 2010

Windows NT Architecture Vs. Prior Windows Versions

You know having knowledge about the architecture or internals of an operating system is an essential part of the job for a System Programmer, System administrator & intimate to say for a security expert .
Well, windows is a big & complex operating system, from different versions it revealed to the community that windows ever has potential to progress along with other operating Systems like Apple mac Osx or difference Posix based systems like different variant of Linux or Bsd's .
nowadays everyone likes to work, develop & working experiences with new windows versions, I mean Windows 7, it's a good idea for everyone to have experience with new releases of products but in fact having knowledge at least about prior versions is a prerequisite for professionals who want to have adventure around internals .
As you might already know developing effective applications require in-depth knowledge about how the underlying system works . it's a mandatory topic for programmers & security experts who's trying to build Native ( Subsystem independent applications ) & or Kernel Land Softwares .
of course there's no user-friendly application that is programmed purely in ring0, because by default or better to say by nature a ring0 application just going to install through services & nobody can see the output directly .
I've decided to allocate this entry to anyone who likes to know better about Windows NT ( includes Windows 2000, Windows Xp 32 & 64 Bit, Windows 2003 32 & 64 Bit ), so if you're a beginner in this area keep following this blog or if you're an experienced windows System programmer feel free to skip this entry .

From the initial announcement of Windows NT, Microsoft made it clear that it was to be long-term replacement for windows 95 ( & it's subsequent releases, windows 98 & windows millennium edition ).
The following list highlights some architectural differences & advantages that Windows NT ( and its subsequent releases ) has over windows 95 ( & its subsequent releases ) :

  • Windows NT supports multiprocessor environments, as windows 95 doesn't .
  • The windows NT File System supports security ( such as discretionary access control ) however windows 95 file system doesn't .
  • Windows NT is fully a 32-Bit ( & now 64-bit ) operating system - it contains no 16-bit code, other than support code for running 16-bit windows applications . windows 95 contains a large amount of old 16-bit code from its predecessors, windows 3.1 & MS-DOS.
  • Windows Nt is fully reentrant or better to say a multi-threading System, Significant parts of Windows 95 are nonreentrant ( mainly the 16-bit code taken from windows 3.1 ). this nonreentrant code includes majority of graphics & window management functions ( GDI & User ) . when a 32-bit application on windows 95 attempts to call a system service implemented in nonreentrant 16-bit code, the application must first obtain a system-wide lock ( or mutex ) to block other threads from entering the nonreentrant code base . And even worse, a 16-bit application holds this lock while running. As a result, although the core of windows 95 contains a preemptive 32-bit multi-threaded scheduler, applications often run single threaded because so much of the system is still implemented in nonreentrant code.
  • Windows NT provides an option to run 16-Bit windows applications in their own address space, Windows 95 always run 16-bit windows applications in a shared address space, in which they can corrupt ( & hang ) each other .
  • Process shared memory on windows NT is visible only to the process that are mapping in the same shared memory section. On Windows 95, all shared memory is visible & writable from all processes. thus, any process can write to & corrupt shared memory being used by other cooperating processes .
  • Windows 95 has some critical operating system pages that are writable from user-mode, thus allowing a user application to corrupt or crash the system .
The one thing windows 95 can do that windows NT-Based systems will never do is run all older MS-Dos and Windows 3.1 applications ( notably applications that require direct hardware access ) as well as 16-bit MS-Dos device drivers .
Whereas 1000 percent compatibility with MS-Dos and Windows 3.1 was a mandatory goal for windows 95, the original goal for windows NT was to run most existing 16-bit applications while preserving the integrity and reliability of the system .

Windows Internals, Forth Edition. Mark E.Russinovich, David A.Solomon. 2005

No comments:

Post a Comment