Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 1996 09:58:51 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        koshy@india.hp.com (A JOSEPH KOSHY)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: FreeBSD vs. NT Stability
Message-ID:  <199608121658.JAA25522@phaeton.artisoft.com>
In-Reply-To: <199608120651.AA091782688@fakir.india.hp.com> from "A JOSEPH KOSHY" at Aug 12, 96 12:21:27 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> Sometime back there was a posting comparing the behaviour of FreeBSD and
> NT wrt a test program that created lots of processes and stressed the OS.
> (I've unfortunately lost the original mails).
> 
> It struck me that the NT version of the program was using `CreateThread()' 
> while the Unix (FreeBSD) version was using `fork()'.
> 
> Now I don't know much about NT internals, but it seems to me that the NT 
> approach wouldn't lead to as many process context switches since the threads 
> would be sharing the same address space.  Therefore the load on the VM system
> would be no different from having 1 process.

Assuming all thread context switches as the result of blocking operations
were only to other threads in the same process, this would be true.

Unfortuantely (for the process) it is not... a happy thing for the user,
who may have other processes he wishes to run instead of starving all
but the threaded process for quantum.


> The poster reported a slowdown on NT with many threads but no crashes, which
> seems logical since multiple threads would consume CPU time, and not placing
> a load on the VM would mean it wouldn't crash :-).

There are many ways to thrash NT to death.  The test program that sparked
this debate thrashes the buffer cache significantly because of the lack
of per FS object working set restrictions.  In VMS, this would be a
tunable.


> So my question is: how does NT behave when it has to schedule between a 
> large number of processes each with its own process context, VM, page tables 
> etc?  Conversely how does the unix program behave when linked with -lpthreads
> and with `fork()' replaced with `pthread_create()'?

I have no relevent data for this question.  Please see my other posting
inre: threading models to get an idea of what the answer should be on a
UP vs. and SMP system.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608121658.JAA25522>