(long) Re: OFFTOPIC: Regarding NT vs Linux

Stephen Williams (steve@icarus.icarus.com)
Sat, 20 Sep 1997 00:54:49 +0800


sachin@cdacb.ernet.in said:
> What I would like to know is how much of this hype surrounding NT is
> true?

I am in the unenviable position of being able to compare NT and Linux side-
by-side on the exact same hardware. I write device drivers for the hardware
my company designs, and I support (usually) both Linux and NT. (kernel mode.)

NT is in fact multitasking. The kernel is multi-threaded and it is possible
(indeed reasonable) to create driver specific threads. However, the structure
of the kernel is really intended to be event based. A request to the kernel
generates an IRP (I/O Request Packet) that represents the context of the
operation. Kinda like winmain().

In Linux, and any other Unix, there is a kernel ``thread'' for every process
running, and the I/O operation context is carried with this process. You can
actually program a Unix driver in a more thread-like manner. This in spite
of the fact that the NT kernel supports proper kernel threads.

NT device drivers are typicaly 2-4 times larger (compiled code) then the
equivilent Linux device driver. There is a severe gap between reality and
the NT DDK, which takes lots of code to cope with. HAL: "Sorry Dave, I can't
let you do that." Programming Linux drivers, you can get right to the point.

NT 4.0 response to interrupts is 2-4 times slower then Linux 2.0 on exactly
the same hardware. Not 2-4%, 2-4 *times* as long. These latencies usually
translate to poor hardware performance. (This I measured with an oscilliscope.)
Generally, I find that NT is an order of magnitude slower then Linux.
Interrupt latency is just the beginning.

I had no idea that 16meg was a restriction for my 75MHz Pentium, until I
installed NT. Compiling on NT, the disk is going crazy, and the performance
meter is reporting >100 page faults/sec. Under Linux, compiling the same
program causes no page faults. 16Meg is a lot of memory if you use it
properly.

NT is as multitasking as any Unix. NT is most certainly NOT a practical
multiuser sytsem, however. It can be done, but it is extremely cumbursome.
User ownership is not obvious, and software packages are difficult, if not
hopeless, to install for use by the entire community. If "Administrator"
installs MSVC++ on the machine, it may take several days of hacking before
you get the environment variables right so that "JoeUser" can compile a
program. Some programs must be installed by Administrator, yet install
Registry/environment in a user specific way, and do not tell you what
has been done. It's not fun.

For all the percieved anarchy of the Unix world, there is actually far more
convention and cooperation. There are places for libraries, and binaries,
and config files, and data/spool files, and local products, etc.

sachin@cdacb.ernet.in said:
> NT runs on Intel, MIPS, Alpha and PowerPC.

PPC and MIPS ports are reportedly dead. Current MS products still include
support for them, but the word on the street is, Alpha and Intel only from
now on.

I have run it on Alpha and Intel. The alpha port is 32 bit. All integers
and pointers are 32 bit, etc. MS claims "true 64bit" on the Alpha, a
bold faced lie. The int64 type does use hardware support, and this is
probably where they get "true 64bit" from.

Getting programs for non-intel NT is next to impossible.
On the alpha, you can run Intel binaries with FX!32.

In the linux world, there are often problems with apps not being 64bit
clean (xplaycd, for example) but generally you can get things compiled for
whatever you are using. Trouble is, it is sometimes hard to find what you
need. I think Xilinx will never port their design tools to Linux for me.

*sigh*

sachin@cdacb.ernet.in said:
> Administration: is NT really superior in ease of use and
> administration.

Really? It barely runs on my Pentium. I click on the "NT Explorer" icon
and it takes a few seconds to change the pointer to the hourglass!

NT, like any other MS product, is very much oriented to the nieve beginner.

I have had cases where the installation of an MS product on NT/alpha has
trashed the system, rendering the NT O/S unbootable. Stay far away from
Internet Explorer, for example, it is unusually predatory. It installed intel
binaries over top of my alpha kernel system files, forcing me to reinstall
the kernel. (I had to boot from the CD-ROM.)

Networking under NT is slow and unreliable. Volumes disappear, sometimes
fail to mount, and when then do mount take take minutes to become available.
This compared to interactive mounting of amd, where you can barely tell.
Also, network administrators generally banish MS products to a LAN of their
own, off the important lans, because of the traffic they generate just
sitting idle.

If with NT you want to do something other then one of the dozen or so canned
tasks, you are in for an uphill battle. Unix takes a little convincing no
matter what you do (novices cringe) but it is a shallow slope, and not so
restrictive. This is true even when writing device drivers. If you have
a device that is not a disk, tape, keyboard, video or mouse, you are in for
a fight in the NT world.

sachin@cdacb.ernet.in said:
> Lots of people there were predicting the demise of Unix and the
> dominance of NT.

When it must work, and *my* reputation is on the line, I choose Linux.
Customers, however, are often not skilled engineers, and choosing NT is
risk free: if it fails miserably, you can't be blamed, if Linux works
marginally you are close to being fired.

-- 
Steve Williams
steve@icarus.com
steve@picturel.com

"The woods are lovely, dark and deep. But I have promises to keep, And lines to code before I sleep, And lines to code before I sleep."