NetBSD Now Has Native pthreads! 37
jschauma writes, quoting the NetBSD changelog, was one of several people to point out that "Jason Thorpe has merged the nathanw_sa branch with -current. NetBSD
now has a high performance, modern kernel thread implementation using
Scheduler
Activations in the main source tree. This work was performed by
Nathan Williams with contributions by several other developers."
One More Thing. (Score:1)
This shows dedication: Good job! (Score:1)
Does this mean...? (Score:2, Interesting)
Re:Does this mean...? (Score:4, Interesting)
Threads are the ability for a process to run more instance of itself, sharing all data without starting a new process. With fork, all data is seperate.. two forked processees, for the most part, cannot affect each other.
Re:Does this mean...? (Score:1, Informative)
The Alpha and VAX ports have had SMP for a long time, i386 was added a couple of months ago, and Sparc was just recently incorported into the -current tree. PowerPC Macs also have SMP support, and maybe some other ports I don't recall at the moment.
Re:Does this mean...? (Score:5, Informative)
Even with SMP support, I don't think you get a really high degree of concurrency unless you have a threading implementation that involves the kernel.
FreeBSD 4.x on a dual processor machine, for example, will take each process currently running, and assign it to a free CPU (either 0 or 1). This works great if you have more than one process running on your machine with a good division of labour (i.e. Apache + MySql).
However, there are times when you want your box to be dedicated to a single purpose like being a datbase server only. That database engine might be a single process application like Oracle, and was written to break it's own internal tasks off into threads.
A kernel thread implementation means you don't waste the second CPU of your SMP capable OS in this situation.
Way to go NetBSD team, for implementing this. I hope I get to see this in action in 1.7
Re:Does this mean...? (Score:3, Informative)
Re:Does this mean...? (Score:1)
The leaps and bounds in design that these guys are doing is impressive.
Re:Does this mean...? (Score:5, Funny)
In other news, Fig Leaf Linux Corp.'s stocks took a major dive, while Thimble+Needle Webhosting Co. skyrocketed. Red Hat Linux is holding steady, although this may change with conditions in the felt market.
Re:Does this mean...? (Score:4, Informative)
Threading means splitting up a process into several (well
Many applications today use a threaded software architecture (over the classical Unix "fork"ed processes), and so having some efficient threads implementation is very important.
With the Scheduler Activations based work that Jason and Nathan made, this is a very efficient implementation as you can map N userland threads to M kernel threads, and you don't have one kernel thread for each userland thread, like some other systems (used to?) have, and which kills performance if you have many threads.
- Hubert
Re:Sorry, off topic, (Score:1, Offtopic)
kick ass! (Score:1, Informative)
it can never figure out why I don't have any type of threading
in my system. NetBSD Rulz!
Good news. (Score:2, Informative)
While (native)threading support has taken quite some time to come to NetBSD one
can be assured that the implementation is done right, as always with NetBSD.
Well done !! (Score:1, Informative)
Nathan Williams (Score:1)
Regards, Tommy
Time to burn some karma! (Score:2)
Amusingly enough lack of pthreads is what drove me away from FreeBSD some time back when I wanted to use it for a desktop OS. I got it installed and I was mucking with it but it had no pthreads at the time, and pthreads were required for xmms.
So this is a good and important step for FreeBSD! pthreads are a requirement for a ton of software these days for some reason...