Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 1996 12:40:03 +0200 (MESZ)
From:      "Hr.Ladavac" <lada@ws2301.gud.siemens.co.at>
To:        igor@jabber.paco.odessa.ua (Igor Khasilev)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: FreeBSD vs. NT Stability
Message-ID:  <199608121040.AA063596403@ws2301.gud.siemens.co.at>
In-Reply-To: <199608120912.MAA21871@jabber.paco.odessa.ua> from "Igor Khasilev" at Aug 12, 96 12:12:33 pm

next in thread | previous in thread | raw e-mail | index | archive | help
E-mail message from Igor Khasilev contained:
> 
> > 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()'?
> 
> One bad thing with user level threads (actualy pthreads that I used):
> sheduler which runs on user lever ALWAYS consume processor time (even wnen

Only when *really* poorly implemented.  Otherwise it waits in select(2) to
be awaken by the incoming traffic or that the timeout fires (condition timed
wait, for instance.)  When all threads are blocked, no VTALRM's should be
scheduled (I don't know if CAP's pthread implements the last optimization.)

> all threads sleeps), and permanenly keep part of code in memory. If it is
> true (maybe I misunderstand something), then pthreads is bad solution for
> heavy loaded systems.

See above.  It *is* true, as long as there are threads capable of running
(i.e. not blocked), but this is the outcome one desires: runnable threads
run.

As soon as all threads are blocked, the scheduler goes to sleep, so to say,
and is eligible for LRU paging.

Naturally, for really heavy bursty I/O, kernel based threads would be better,
but there are very many instances of potential threading where kernel based
threads are just too heavyweight.

The VIPER project for Linux produced some interesting documentation on the
matter and contains pointers for further reading, if anyone is interested
(it never came to bloom, AFAIK, for political reasons)

/Marino
> 
> 					Igor
> 




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