OpenBSD Hackathon 2005: Parts I and II

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Link.

The threading effort by tedu seems to be interesting. Does anyone know how that compares in theory to Linux or FreeBSD? Does NetBSD have kernel threads? :p

He laughed, "they're keeping secrets of 15 year old technology."
:laugh: Jason Wright's a great guy.

I still want a Zaurus. :(

EDIT: The main kerneltrap site has a number of other articles on the hackathon too. And there are some pictures Linked to in this article on undeadly.org.

EDIT: Part 2
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
good stuff.

Don't know much about threading and stuff like that. With Linux 2.6 series they've introduced a NPTL threading model, which is suppose to be posix compatable. It's a in-kernel thing, always has been for Linux.. I think.

FreeBSD 5.x implimentation is suppose to be close to were Linux 2.4 was in terms of performance or something like that. I know FreeBSD's 4.x threading model completely blew... It was realy bad. They even imported Linux's threading model into FreeBSD to fix performance and compatability issues.

Most notably you had to do it for MySQL, which isn't suprising because it's so Linux-centric, but there were other more fundamental issues with FreeBSD as I understand it.

The new FreeBSD 5.x threading model is KSE and is suppose to be fairly nice. It's also one of those things you have to be aware of when going from FreeBSD 4.x to 5.x. The native threading models are incompatable and code compiled for 5.x is not going to be backward compatable. (seen issues of this when a person was trying to update a third-party web app because of a security issue)

It's not 1:1 kernel threading, or 1:N user-space threading, it's a mixture of both. See their man file:
http://www.freebsd.org/cgi/man.cgi?quer...anpath=FreeBSD+5.0-current&format=html

More about FreeBSD threading here. Kinda goes into the limitations of the old model, which was a userspace 1:n setup. For instance one limitation is that with userspace threads you can't use more then one cpu at a time with a single proccess.

(Looks like OBSD's experimental 1:1 threading is most closest to LinuxThreads in FreeBSD)

Old linux threading (pthread in FreeBSD) was 1:1 kernel threads. The new one, NPTL is 1:1 kernel threading also..

So it looks like if OBSD adopts 1:1 kernel threading then that should go a long way to improving SMP performance and support, which is nice because soon almost all machines will be SMP-like in one way or another.

I beleive the 1:1 vs 1:N refers to:
one kernel thread for one user-space thread vs one kernel thread for N number of user space threads. And with 1:N it is difficult to handle multithreaded apps in a intellegent manner. (how do you scedual resources and stuff like that).


 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: drag
good stuff.

Don't know much about threading and stuff like that. With Linux 2.6 series they've introduced a NPTL threading model, which is suppose to be posix compatable. It's a in-kernel thing, always has been for Linux.. I think.

FreeBSD 5.x implimentation is suppose to be close to were Linux 2.4 was in terms of performance or something like that. I know FreeBSD's 4.x threading model completely blew... It was realy bad. They even imported Linux's threading model into FreeBSD to fix performance and compatability issues.

Most notably you had to do it for MySQL, which isn't suprising because it's so Linux-centric, but there were other more fundamental issues with FreeBSD as I understand it.

FreeBSD 3 used libc_r(I think?), which was a userland threading implimentation. That's what OpenBSD uses now. I just thought it was interesting that tedu was inspired by plan9 instead of Linux or one of the other BSDs. :p

I've been watching a few of the CVS commits during the hackathon and it seems like they've been trying to help improve SMP support. A few things were changed recently at least. I'd love to see a bit more performance out of my dual 2ghz athlon. :D

And I still want a zaurus. :(
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Plan9 itself is interesting.

As is a Zaurus.

Although I think the real things to look forward for is when they figure out the whole wifi thing. I think that it would be nice to have a miniture computer that would be a terminal to my systems at home (or work), but be able to cary it were ever I went and get connectivity.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: drag
Plan9 itself is interesting.

As is a Zaurus.

Although I think the real things to look forward for is when they figure out the whole wifi thing. I think that it would be nice to have a miniture computer that would be a terminal to my systems at home (or work), but be able to cary it were ever I went and get connectivity.

It's being worked on. :p Zaurus + cellphone = administation from anywhere. Toss a bluetooth adapter on the zaurus and get a bluetooth enabled phone, and you might just get something usable.

Other than that, OpenBSD has some nifty wifi support. I wish they would go into some of the other technologies (WPA, 802.1x), but I'm cool with what they have so far.