Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
BSD Operating Systems

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."
This discussion has been archived. No new comments can be posted.

NetBSD Now Has Native pthreads!

Comments Filter:
  • Also, how is this different from what they were doing?
  • If the corporate world picks up a bazzar approatch we will see developments like this in spaids
  • Does this mean that NetBSD can now support SMP, or am I just way off here... ?
    • by sporty ( 27564 ) on Sunday January 19, 2003 @01:49AM (#5111771) Homepage
      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.
    • by Anonymous Coward
      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.
    • by beholder77 ( 89716 ) <dungeonsNO@SPAMgmail.com> on Sunday January 19, 2003 @02:12AM (#5111838) Homepage
      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

      • by Webmonger ( 24302 )
        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.
    • by orangesquid ( 79734 ) <orangesquid.yahoo@com> on Sunday January 19, 2003 @04:30AM (#5112220) Homepage Journal
      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.
    • by hubertf ( 124995 ) on Sunday January 19, 2003 @10:17AM (#5112906) Homepage Journal
      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
  • kick ass! (Score:1, Informative)

    by Anonymous Coward
    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! :)
  • Good news. (Score:2, Informative)

    by noselasd ( 594905 )
    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.
  • Well done !! (Score:1, Informative)

    by Anonymous Coward
    Scheduler Activations are nice, and sort of classic for BSD systems too. I wonder how they compare with FreeBSD's KSE.
  • 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
  • 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...

The system was down for backups from 5am to 10am last Saturday.

Working...