Date: Fri, 13 Dec 2002 14:41:03 -0500 From: Craig Rodrigues <rodrigc@attbi.com> To: Nathan Arun <nathan_arun@hotmail.com> Cc: arch@FreeBSD.ORG Subject: Re: Threads in FreeBSD Message-ID: <20021213144103.A3790@attbi.com> In-Reply-To: <20021213133306.U31761-100000@alpha.yumyumyum.org>; from culverk@yumyumyum.org on Fri, Dec 13, 2002 at 01:35:28PM -0500 References: <F38gRzpPWywCP6K8CAC0001443d@hotmail.com> <20021213133306.U31761-100000@alpha.yumyumyum.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 13, 2002 at 01:35:28PM -0500, Kenneth Culver wrote: > > I'm currently reading the book "Modern Operating Systems" by Tanenbaum, > > where he says there are 2 kinds of threads. user-level and kernel-level. > > What type of threads is implemented in FreeBSD? user, kernel or both? > > FreeBSD-STABLE's threads are currently totally in userland. ....and the source code is in src/lib/libc_r/uthread > FreeBSD-CURRENT's threads will eventually be a sort of a hybrid design, > with kernel support for multiple threads so that different parts of the > kernel, and different userland threads can be run on different processors. > The FreeBSD implementation in -CURRENT is similar to the Scheduler > Activation method. The thread scheduler is in userland with an upcall into > the kernel that can cause threads to be scheduled across multiple > processors. I'm not sure that's quite working yet, but work is progressing > in -CURRENT, and from what I hear, should be ready in time for 5.1-RELEASE ...and you can read more about the status of Kernel Schedulable Entities in FreeBSD at: http://www.freebsd.org/kse/ Work is ongoing for that project. You can read the original Schedular Activations paper also: http://citeseer.nj.nec.com/anderson92scheduler.html I don't have any good references offhand for Win32 threads, since the original poster asked for Win32 threading information. You can try reading stuff from MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_multithreading_with_c_and_win32.asp Here is an article which mentions how to implement POSIX-style condition variables on Win32: http://www.cs.wustl.edu/~schmidt/win32-cv-1.html That may also give you an idea of some of the differences between pthreads and Win32 threads. -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021213144103.A3790>