Slashdot Mirror


NetBSD Now Has Native pthreads!

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."

37 comments

  1. O factor? by hackwrench · · Score: 0, Offtopic

    But what's its O factor.

    1. Re:O factor? by Anonymous Coward · · Score: -1, Flamebait

      Your mom O factored about 5 times last night.

  2. Wow! by Anonymous Coward · · Score: 0, Flamebait

    I'm sure all five people that this applies to are very excited!

  3. One More Thing. by hackwrench · · Score: 1

    Also, how is this different from what they were doing?

    1. Re:One More Thing. by Anonymous Coward · · Score: 0

      If you have to whore for karma - please do it a bit less obvious.

  4. This shows dedication: Good job! by arcadum · · Score: 1

    If the corporate world picks up a bazzar approatch we will see developments like this in spaids

  5. Does this mean...? by SixArmedJesus · · Score: 2, Interesting

    Does this mean that NetBSD can now support SMP, or am I just way off here... ?

    --

    *slight crashing sound*
    1. Re:Does this mean...? by sporty · · Score: 3, Interesting

      You can have seperate processes running on seperate processors without the use of threads. All it means, is that there is native code within netbsd itself to support threads.

      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.

      --

      -
      ping -f 255.255.255.255 # if only

    2. Re:Does this mean...? by Anonymous Coward · · Score: 1, Informative

      Many NetBSD ports already have SMP support - SA is somewhat related, but mostly it a completely different thing.

      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.

    3. Re:Does this mean...? by beholder77 · · Score: 5, Informative

      NetBSD has had SMP support for a few platforms in the -CURRENT branch for a while now (sparc, vax and alpha for sure).

      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

      --
      Success is as dangerous as failure, hope as hollow as fear.
    4. Re:Does this mean...? by orangesquid · · Score: 5, Funny

      What's more important, NetBSD can now support pcloth natively, which means pclothes! And soon, pfashion! They're well on their way to stardom... as soon as NetBSD/catwalk takes off, we'll start seeing ports to The Limited, The Gap, Sears, J. C. Penney's, and T. J. Maxx... Boy, I can't wait for NetBSD/hottopic---I'll about that daemon about metal spikes yet!

      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.

      --
      --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
    5. Re:Does this mean...? by hubertf · · Score: 3, Informative

      SMP means running processes on more than one CPU in parallel. (With some care-taking from the kernel that both CPUs don't step on each other WRT writing to kernel data structures etc.).

      Threading means splitting up a process into several (well :) threads, and let them run on either one or more than one CPU. This is basically an application-layer thing, in contrast to SMP which happens inside the kernel. Of course having SMP available helps for performance in threads systems as you can run threads in parallel on several CPUs, but SMP is not strictly necessary for a threaded system.

      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

    6. Re:Does this mean...? by Webmonger · · Score: 2, Informative

      All that's true, but when you have a multithreaded process, there's an efficiency loss if two threads from the same process are running on different CPUs. Since threads from the same process tend to access the same memory addresses, you don't get the normal advantages of CPU memory caching.

    7. Re:Does this mean...? by Anonymous Coward · · Score: 0

      But what if each thread runs a different block of the code? Do the several processors in an SMP machine all share the same L2 cache?

    8. Re:Does this mean...? by Anonymous Coward · · Score: 0

      Do be quiet, you pperfumed ppuff.

    9. Re:Does this mean...? by Anonymous Coward · · Score: 0

      "I hope I get to see this in action in 1.7"

      Nope, because the next release will be 2.0 (mostly thanks to this and SMP support, I think).

    10. Re:Does this mean...? by beholder77 · · Score: 1

      Excellent, thanks for the info. I'm looking forward to NetBSD 2.0 now as much as I did for FreeBSD 5.0

      The leaps and bounds in design that these guys are doing is impressive.

      --
      Success is as dangerous as failure, hope as hollow as fear.
  6. Sorry, off topic, by Anonymous Coward · · Score: -1, Offtopic

    FreeBSD 5.0 has been released!

    1. Re:Sorry, off topic, by infonography · · Score: 0, Offtopic

      Thats FreeBSD 5.0, RC3 and it's almost off topic.

      --
      Sorry about the writing. Robot fingers, you know? Cliff Steele in DOOM PATROL #23
    2. Re:Sorry, off topic, by Anonymous Coward · · Score: 0

      Actually, no it isn't. FreeBSD 5.0-RELEASE has been released, but it's not official yet since there has been no announcement made.

    3. Re:Sorry, off topic, by Arandir · · Score: 0, Offtopic

      Shhhh! If we're lucky, we might actually get a release announcement before some Slashdot editor shoots his wad all over FreeBSD's bandwidth.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    4. Re:Sorry, off topic, by Anonymous Coward · · Score: 0

      /me starts two wget processes =P

    5. Re:Sorry, off topic, by infonography · · Score: 0, Offtopic

      ah, the wonders of ncftp got me the all three iso images while I slept. look up the man page for ncftp about bgget, you can log out and forget about it.

      --
      Sorry about the writing. Robot fingers, you know? Cliff Steele in DOOM PATROL #23
  7. kick ass! by Anonymous Coward · · Score: 1, Informative

    Now when I run configure I won't have to wonder why
    it can never figure out why I don't have any type of threading
    in my system. NetBSD Rulz! :)

    1. Re:kick ass! by Anonymous Coward · · Score: 0

      NetBSD has had pthreads for a while -- just not kernel level as I understand it. You just use the -pthread option when compiling. Many configure scripts are too stupid to figure this out though. FreeBSD and OpenBSD support -pthread too. AFAIK -lpthread is just used on systems other than BSD, such as Linux.

  8. Great by CableModemSniper · · Score: -1, Flamebait

    BSD is dying...but with 10x the efficiency!

    --
    Why not fork?
    1. Re:Great by Anonymous Coward · · Score: 0

      I was making a joke. Maybe it wasn't funny, but it certainly wasn't flamebait. And overrated is just cowardly.

    2. Re:Great by Anonymous Coward · · Score: 0

      Shut up you whiney little bitch.

  9. Some day soon by Anonymous Coward · · Score: -1, Troll

    Now that they've got threads down, I hear they are going to support something new called a "hard disk drive". Its based on the same technology as magnetic tape, but it supports random access to any sector (no more having to wait for it to spool around to the place where your files are!). I've got one of these for my computing machine, and I can't wait to use it with NetBSD!

  10. Good news. by noselasd · · Score: 2, Informative

    Glad to see NetBSD is keeping up with the rest of the world.
    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.

  11. MOD PARENT UP! (S�ore:+5, Informative) by Anonymous Coward · · Score: -1, Offtopic


    I wonder why you can't write (Score: ) in the subject... what an odd feature of the lameness filter.

  12. Well done !! by Anonymous Coward · · Score: 1, Informative

    Scheduler Activations are nice, and sort of classic for BSD systems too. I wonder how they compare with FreeBSD's KSE.

  13. *BSD is dying by Anonymous Coward · · Score: -1, Troll
    It is official; Netcraft now confirms: *BSD is dying

    One more crippling bombshell hit the already beleaguered *BSD community when IDC confirmed that *BSD market share has dropped yet again, now down to less than a fraction of 1 percent of all servers. Coming on the heels of a recent Netcraft survey which plainly states that *BSD has lost more market share, this news serves to reinforce what we've known all along. *BSD is collapsing in complete disarray, as fittingly exemplified by failing dead last in the recent Sys Admin comprehensive networking test.

    You don't need to be a Kreskin to predict *BSD's future. The hand writing is on the wall: *BSD faces a bleak future. In fact there won't be any future at all for *BSD because *BSD is dying. Things are looking very bad for *BSD. As many of us are already aware, *BSD continues to lose market share. Red ink flows like a river of blood.

    FreeBSD is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time FreeBSD developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: FreeBSD is dying.

    Let's keep to the facts and look at the numbers.

    OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of NetBSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.

    Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI who sell another troubled OS. Now BSDI is also dead, its corpse turned over to yet another charnel house.

    All major surveys prove that *BSD has steadily declined in market share. *BSD is very sick and its long term survival prospects are very dim. If *BSD is to survive at all it will be among OS dilettante dabblers. *BSD continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, *BSD is dead.

    Fact: *BSD is dying

  14. Nathan Williams by thallgren · · Score: 1

    Is this the same Nate Williams that contributes to the FreeBSD project? (I know contributes is a weak word since Nate was among the starters)

    Regards, Tommy

    1. Re:Nathan Williams by Anonymous Coward · · Score: 0

      I doubt it. nathanw is fresh out of college.

  15. Time to burn some karma! by drinkypoo · · Score: 1
    Congratulations FreeBSD, for once again catching up to linux in some very outdated way.

    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...

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    1. Re:Time to burn some karma! by Anonymous Coward · · Score: 0

      Why do people insist on calling NetBSD and OpenBSD "FeeBSD"? It makes them come off as ignorant and completely invalidates everything they have to say on the topic...