KSE Progress On FreeBSD SMP Environment
Dan writes "This is a significant milestone to be shared with everyone! Khairil Yusof reports that libkse is now running quite well on his FreeBSD 5.1+ current based SMP system. He has tested a bunch of apps on his system, taking the approach of enabling kse one app at a time. He reports a current uptime of 23hrs with these apps running with libkse.so.1, and basically a usable Gnome 2.2 desktop environment. He says that with recent updates, you can now see the threads with top(8). Kernel Scheduler Entities (KSE), is a kernel-supported threading system similar in design to Scheduler Activations [Anderson, et. al.]. It strikes a balance between user-level (1:N) and kernel-level (1:1) threading models, giving most of the advantages of both, and few of the disadvantages of either."
Maybe.
I know OpenBSD has a group in a totally different project working on SMP for OpenBSD. The different BSDs have fairly different kernel internals as far as I know. It certainly wouldn't be a cut and paste job.
Well something must have changed in recent psutils, because now 'ps' correctly collapses threads within processes when they are not active (I assume). When my site gets a hit, I see the threads expand, and once the request is served, they are collapsed back under a single process line.
It's 10 PM. Do you know if you're un-American?
It would have been nice for you to mention that you're using a Mac, instead of obtusely implying it (8600, BBEdit Lite).
The section of OSX that copying a file involves is not BSD-related, as I understand it. It's Mach. (People who know more about OSX than I do, feel free to pipe up.) The kernel of OSX is not very BSD-based, and most of what you're talking about (HDD access, scheduling) takes place in the kernel. (To be fair, the scheduler that FreeBSD uses was adapted from Mach.)
The 8600 (which was discontinued over a half decade ago, by the way) is not even compatible with OSX. The minimum requirement for OSX is the Beige Power Mac G3. (See Apple's requirements page.) So, I'm guessing you put in a G3 daughterboard. (Find out about the 8600 and available daughterboards at lowendmac.com.) But OSX doesn't support processor upgrade cards. (First paragraph of the requirements page.) Maybe you didn't put in an upgrade card, and are using the mach_kernel for the 604 from the Darwin project like this guy did. Either way, you're still not using a supported system.
So, you're using unsupported hardware, and a BSD-related OS in an operation that's not related to the BSD bits, and using this to say that BSD sucks. Hmmm.
I'm surprised an 8600 w/ daughterboard (which one, by the way? The 233MHz with 512k of cache?) works at all with OSX. As for why it's slow for you, I can only hypothesize, since I'm not a Mac guy. (That's right, anybody can find this stuff out with a quick google search or two!) The G3 upgrade card is going to need an L2 cache enabler. Do you have one installed? Okay, how about this idea. I'm guessing that your old, discontinued, unsupported hardware uses a bus controller (or other critical chip) that is not being programmed optimally by OSX. Why? Because the programmer writing that code knew that the chip wasn't going to be supported!
My advice is to stick to using 9.1 on your 8600. And don't generalize about BSD from your situation; it's an extreme.
I'm not sure about OpenBSD, but there's not much shared code in those areas between NetBSD and FreeBSD. On NetBSD, Bill Sommerfeld did most of the i386 SMP code, and Nathan Williams is the guy who's working on scheduler activations. SA is a M:N implementation, not much different from FreeBSD's KSE, which was developed mainly by Julian Elisher. SMPng is the work of many people, specially John Baldwin. Note that KSE is only really finished on i386, Alpha and Sparc64 are still missing some bits.
SA is not as advanced as KSE, though, but it looks very promising. AFAIK, kernel assisted threading and SMP have never been priorities for the OpenBSD people, ergo, little work has been done in those areas.
From what I understand, SMP opens all kinds of possible race conditions and other such nasty potential security holes, so OpenBSD doesn't want to implement something like this until they can be sure they can do it securely. Which may not be for a while, hard to tell.
At least mafia-owned pizzarias make excellent pizza. Compare to Bill Gates.
Linux (2.5) implements a 1:1 kernel threads model. KSE is a much more complex N:M threading model. FreeBSD also has brand new 1:1 kernel threads (similar to what Linux and Solaris have). You can choose (per application!!!) which threading library you like to use :-)
To do this you need to recompile ld-elf.so.1 to support dynamic lib mapping:
/usr/src/libexec/rtld-elf/
/etc dir. Details of it can be accessed by reading the man pages libmap.conf(8).
l aF irebird-bin]
cd
make -DWITH_LIBMAP
make install
Then you need to have a libmap.conf in your
Here is a sample with mozilla firebird mapped to libkse:
[/usr/X11R6/lib/firebird/lib/mozilla-1.4b/Mozil
libc_r.so.5 libkse.so.1
libc_r.so libkse.so
Just add more entries if you wish. You can test out whether an application is using libc_r or libkse by running ldd(8).
Note the library mapping can be done as Scott mentions also for libthr also for 1:1 threading.
You know, under BSD (or any other Unix) you could have used the "sed" utility to do the search and replace on that file automatically with a single command, instead of deleting each occurance of "Mac" by hand and typing out "BSD" in its place in Notepad (even if you have discovered the search-and-replace facility in Notepad, you have to admit sed is much easier).