Not too long ago, Apple open sourced its Grand Central Dispatch library, which aids in developing multithreaded code. It was suggested that it could be ported to other platforms, and the FreeBSD team has done exactly that. They have also done a lot of work related to getting GCD to work in a POSIX environment.
Apart from actually porting the Gand Central Dispatch framework, a number of other things needed to be done do adapt the library for use outside of Mac OS X:
- Added new kqueue primitives required to support GCD, such as EVFILT_USER and EV_TRIGGER
- Created autoconf and automake build framework for libdispatch
- Modified libdispatch to use POSIX semaphores instead of Mach semaphores
- Adapted libdispatch to use portable POSIX time routines
The other important aspect of getting Gand Central Dispatch to work optimally is a blocks-aware compiler. Jordan Hubbard has worked on providing a blocks-aware clang compiler package for FreeBSD. “When compiled with clang, libdispatch provides blocks-based, as well as function-based callbacks.”
You can find the current port in the ports collection, but for the future, it’s going to work out-of-the-box. “After FreeBSD 8.0-RELEASE has shipped, the new kqueue primitives will be MFC’d so that libdispatch works out of the box on FreeBSD 8.1-RELEASE.” They are also investigating any possible benefits it might bring to modify FeeBSD base operating system tools to use GCD.
It’s great to see this happening. When GCD first came out, I thought it was cool, but I feared that this Apple-only thing wouldn’t go very far. Fortunately, Apple have realized that to get wide adoption of GCD, they would have to open-source it.
I’m a Linux user, but this also demonstrates one of the advantages of the BSD projects. Unlike Linux, which is just a kernel, FreeBSD is a whole OS distribution with tighter coupling between kernel and userspace devs. For Linux to get this, some distros devs will have to step up and port it, and I’m sure there will be some challenges getting the right hooks added to the kernel. Despite the FreeBSD folks doing most of the porting work already, I fear that it’ll be a while before this starts to appear in Linux distros.
Still, it’s nice to see this kind of really cool infrastructure being developed and spreading.
I would agree with you if it was integrated into the kernel and userland all in one deft move, but they aren’t doing that yet. They are looking into the performance benefits of doing that after just having ported over the library. And from the sound of it, most of the work was getting the library to speak Freebsd kernel not modifications to the kernel itself.
Also of note is that Apple not only open-sourced the GCD library, but it’s also Apple’s intention to submit blocks as an official extension to one or more of the C-based languages.
This, however, is *much* more controversial than GCD. I don’t expect to see much love for the feature in C programming circles, as it turns C into something completely different…
There seems to be plenty of love in C with the interest the LLVM project has going on with blocks and C programming.
Not completely different.
AFAIK, “blocks” is a bit of syntactic sugar that makes it much easier to write:
struct anon_func_1_state_s {
scope_var_a_type a;
scope_var_b_type b;
int c;
int d;
};
void anon_func_1(void *state)
{
…
}
const struct anon_func_1_state_s anon_func_1_state = {scope_var_a, scope_var_b, 3, 4};
dispatch_async_f(queue, &anon_func_1_state, &anon_func_1);
But behind the scenes a block is exactly the same as the above, and a heck of a lot easier to write.
Again, AFAIK.
I thought that – and that seemed like an extension I’d be happy to have. But then I read something about the closure structure getting automatically copied to the heap if necessary, in certain circumstances. You can see you’d need to do this if you wanted to pass someone a closure to be called on completion, then return from the function you’re currently running in.
The question is whether the C runtime is doing this or whether it’s some kind of magic in GCD. If it’s magic in GCD then I’m happy. If it’s magic that’s added to the C runtime then I’m not – C does not do heap memory allocations behind your back in basically any other context. so the addition of such would be highly disruptive. I’d really like clarification on how this blocks feature works!
Assuming it *is* just syntactic sugar then I would be all for it, I think that would be a fantastic feature for cutting down on code verbosity whilst still remaining close to the hardware.
Theres plenty of info here:
http://clang.llvm.org/docs/BlockImplementation.txt
http://clang.llvm.org/docs/BlockLanguageSpec.txt
Aside from the closure structure, there’s a second structure for __block variables (which are shared and mutable). There may also code generated for calling c++ copy constructors/destructors and Objective C retain/release-ing.
Blocks are never magically moved from the stack to the heap. There are two runtime function calls — Block_copy(block) and Block_destroy(block) — for managing block lifetime. (Objective C people can use [block copy] / [block release]).
If the block is stored on the stack, Block_copy will copy it to the heap (and return a pointer to the new heap block). Otherwise, it just increments a reference counter.
If you pass your block to a function that keeps it around for later, then it will get copied to the heap (if necessary). C is not doing anything behind your back, though.
Edited 2009-10-14 05:14 UTC
Thanks for the info! I had researched it a bit when I first heard about it but didn’t find any solid references. If nothing happens automagically then it sounds a) great and b) inoffensive. There’s so much code that would benefit from a form of closures. I’ll take a llok at the docs you linked.
‘m a Linux user, but this also demonstrates one of the advantages of the BSD projects. Unlike Linux, which is just a kernel, FreeBSD is a whole OS distribution with tighter coupling between kernel and userspace devs. For Linux to get this, some distros devs will have to step up and port it, and I’m sure there will be some challenges getting the right hooks added to the kernel. Despite the FreeBSD folks doing most of the porting work already, I fear that it’ll be a while before this starts to appear in Linux distros.
That’s because it’s not actually that useful in the real world, just like Mono turned out to be not really all that useful.
Lot of white noise being generated here,but nothing of any real substance.
What’s so wrong about having a decent, unified threading framework? Granted, GCD has been kinda overhyped lately, but that doesn’t make it any less useful.
You my friend have never done any multi-threaded development. Otherwise you would appreciate this development.
The paranoia about Mono is justified. However, while Apple is evil too, but they have a vested interest in spreading this technology and have released it under a proper FOSS license.
Being a Ph.D. student specializing in computer architecture, I have experience that tells me that something like GCD can be very helpful. It’s not a slam-dunk solution, but it is a nice solution to the problem of system-wide resource allocation. Before GCD (or equivalent), parallel processing people either assumed they would have the machine to themselves, or they would have to guess about what other processes are going to be running at the same time.
You, on the other hand, seem to be making a blanket statement about GCD being useless. I’d like to know your qualifications to make that statement and your justification.
I fully agree with you that he should provide arguments and fact-based reasoning.
But I really don’t like your call for “qualifications”. It reminds me of academic dumb arrogance.
Being a Ph.D. student specializing in computer architecture, I have experience that tells me that something like GCD can be very helpful. It’s not a slam-dunk solution, but it is a nice solution to the problem of system-wide resource allocation. Before GCD (or equivalent), parallel processing people either assumed they would have the machine to themselves, or they would have to guess about what other processes are going to be running at the same time.
The fact that you are a Ph.D. student specializing in computer architecture is the exact proof that this is basically a useless solution.
We’ve seen this kind of nonsense spewed from the mouths of KNOW-NOTHING-IDIOTS like yourself over the decades concering GUI’s,Filesystems,Computer Hardware/Software,AI,ect,ect,ect, and 90% of the time you clowns have been *FLAT-OUT-WRONG* about both what the problem was and the soloution to the problem.
Edited 2009-10-13 20:14 UTC
So, what is the solution, because the problem exist?
Processors have growing number of core and those core are not that much faster, there is just more of them. Normal code will run only on one of the, taking advantages of only 1/${number_of_core} of the power. “real world” applications need this power. I am not talking about IM client or your favorite text editor, but application used to do what a computer is aim to do, computation.
Edited 2009-10-13 20:20 UTC
Wow. I’m absolutely amazed how someone could use EDUCATION as a reason to doubt someone’s intelligence. You know, before I went back to grad school, I worked for nearly a decade developing Linux drivers, X11 drivers, designing chips, developing web sites, and among other things, writing parallel applications for real products used in the real world. So I also have plenty of practical experience.
But you probably wouldn’t know much about practical experience either, being an uneducated toothless hick from the backwoods of the Appalachian mountains, living in a tattered wooden shack and using readin’ ritin’ and ‘rithimitic books from the 1850’s.
Ha! How do you feel now? You don’t like it when the ad hominem attack comes in your direction, do you? You don’t like it that I assume you’re an idiot because you make ignorant comments, do you?
And really, I would love to see someone make a real, logical argument that explains why system-side knowledge of CPU resource allocation is “useless”. Or why developing a tool that makes it more convenient for developers to use parallel resources is “useless”. What do you consider to NOT be useless anyhow?
I can’t help it. Sometimes I just HAVE to feed the trolls.
Edited 2009-10-13 20:27 UTC
What’s area are you focusing on in Grad School?
And, how has the transition been back after being gone so long? [I’m contemplating a masters or two and want to know]
I’m doing Computer Architecture. Actually, I started out doing AI, but by the time I finished the core courses, all of the people in the AI lab I wanted to join had graduated, and I found myself alone. So I fell back on my professional background and switched to architecture.
The transition wasn’t terribly easy. I hadn’t been in school in a little over 9 years. I knew how to work hard, but I had forgotten what it was like to study and take classes, so I had to redevelop my study habits. My first quarter back, I didn’t have financial aid, so I worked 20 hours/week and went to school. Of the two courses, I took, I got an A in one, and a B+ in the other. The B+ was in distributed operating systems, which is my weakest area anyhow, so some of it was that I was rusty, and some because I’m not strong in that area.
Thanks for the reply. This is good information to know and something I suspected will creep up on myself as well.
just because someone is a PhD doesn’t mean they are totally clueless. Obviously. But I can understand why people have had it to here with the Andrew Tannenbaums and other academics who seem to live in a theoretical world.
Ok, this I can totally get on board with. Many of the professors I know and most of the grad students have no “real world” experience. And you can really tell the difference between those who have experience and those who don’t. Those without experience are often idealists who really can be clueless about what it is that it really takes to implement something practical, while those with industry experience tend to be more grounded and willing to compromise for the sake of tractability. Note that by the time a professor is in their 60’s the probability that they’ve been involved in one or more startups is quite high, so it’s not as bad as you might think. There are a lot of old professors here.
I don’t know if I’m a scientist in engineer’s clothing or an engineer trying to pretend to be a scientist, but my industry experience has given me massive advantages over many if my colleagues. My engineering skills give me the tools to actually implement things that others would try to estimate, and as a consequence, my results are generally more precise and convincing in publication. (It turns out that a lot of reviewers for top CS conferences have significant industry experience and can be very demanding about authors proving that their idea is actually practical to implement.) My practical bias has also been a disadvantage in some circumstances where I find myself unfamiliar with the politics. I can fall back on general knowledge of psychology (egos, money, etc.), but there are peculiarities of CS that I still have to learn. Fortunately, my advisor is better at the politics, so we make a good team.
Now, keep in mind, that in any field, the scientists are always decades (or more) ahead of the engineers. Consider what we KNOW about chemistry and physics and what’s actually been used to make practical products. It’s a small fraction. Computer Science is absolutely no different. Parallel computing is now becoming a ubiquitous reality, but the computer scientists already explored the hell out of it, got bored of it, and moved in in the 90’s. Today, Intel and AMD are only just beginning to implement primitive forms of the things that the academics came up with long ago.
It’s important to recognize, though, that many many things that are cool in theory are highly impractical to implement. Someone who can distinguish this has a major advantage, and very many academics can’t.
Of course, there are some things that are SO impractical that even the academics don’t bother. For instance, there’s this really interesting O(N) solution to finding the median of an unsorted set of numbers. The algorithm is described in detail in textbooks. But no one has ever implemented it. It’s just too hard. Moreover, the constant factor is so large that for most situations, applying an O(N log N) sort and then picking the middle is not only much simpler but also significantly faster.
Anyhow, here’s the deal about academics. You can never have too much knowledge. When I came back to school, I learned a hell of a lot of theory that I didn’t know. And that knowledge has turned me into a better engineer. If I have 5 options to engineer a solution, I now know more about things like algorithmic complexity that will help me decide in advance that one is better than another, or perhaps that the problem is NP-complete and so I already know in advance that I need an AI solution. I was already good with multithreaded programming with pthreads, but studying distributed operating systems taught me a lot of approaches that I didn’t know, ways to visualize solutions to problems, and the sorts of pitfalls (data races, etc.) that one can run into. In each of the areas where I was already good, I am now better.
Good practical industry experience can make a person very competent. Academic knowledge of theoretical computer science can make one insightful. Their combination can make a person brilliant, with a a deeper understanding of the field combined with a stronger ability to actually build things that work. (I hope some day to become brilliant.)
What’s with the attitude? There isn’t any reason to be calling people names just because you disagree with them. I think you’ll find that sort of crap doesn’t fly around here
I don’t know why people still get surprised when someone acts like this. It IS “the Internet”, after all.
Best to just ignore them.
I don’t know. I can’t make a lot of sense out of ciel’s attitude either.
I find that when emotions enter a technical discussion or dispute the facts disappear.
Not really, it would have been better that Apple was a minor partner in a sea of Open Source and Free Software contributor.
Is APPLE own GCD fully Open Source ? We sadly have been down this road before with Apple, they release minor part as Open Source, where the entire complete solution is kept by them because they think the can do so.
You mean you use GNU/Linux and the Linux kernel in some capacity. Yes, I make the distinction between casual or technologgical tool user and GNU/Linux user, because there is a real one.
The fact they can’t develop any new technology on there own ? Because Apple is stiffling all there technolgy advancment and stealing code for it’s own advantage ?
Crap, we need to tell everyone who is employed by GNU/Linux distribution and company and project to pack it in if they are not working on the kernel …
FreeBSD is an incomplete , broken , insufficient, un-manned not financed, BSD project who relly on others ( GNU/Linux, other BSD projects, Apple , Sun/Oracle ) for it’s technological advancement.
Must be why they relly on other people softwares userspace tool and dev tools …
Your trying to say that Apple people did this for FreeBSD ?
Your a kernel expert too now ?
Why would they need to port it since MAc OS X is BSD and FreeBSD is BSD ? Do you mean both are not completely compatible and equal in the first place ?
You failed to explain why GNU/Linux distro would need this at all.
Not really , it’s the same old , you can have our crumb we don’t feel like developing or keeping to ourselve that you can improve for us in order to get more marketshare because the project are all stiffled by Apple presence and the BSD protection clause …
Linux kernel is developed In Open Source …
KDE is developed in Open Source …
Gnome is developed in Open Source …
Apache is developed in Open Source …
Apple GCD let’s you have what they consider is worthwile for them that other projects get.
Right, point out that the OS Linux users use is more than just Linux the kernel, it’s Linux plus GNU tools (plus a load of other stuff that you seem to want to ignore). Par for the course from you, nothing unexpected. But then…
when someone says the same thing (that Linux is just the kernel) you argue with him? WTF. Isn’t that what you were just saying?
What a terrible post. FFS
Edited 2009-10-14 06:57 UTC
A bit harsh don’t you think? (particularly with the kernel related comments)
OS X isn’t BSD.
While it’s true that OS X has a kernel based on Mach and contains BSD code, OS X isn’t BSD.
I fear that it’ll be a while before this starts to appear in Linux distros.
Just as you’ve failed to explain why they wouldn’t need it.
OK, we get it: BSD is evil and GPL is Jesus Christ himself.
Meanwhile, in the real world, FreeBSD gets dtrace, ZFS and jails while Linux is stuck with a half-built BtrFS.
Don’t get me wrong, I love Linux to bits (I use Arch as my primary OS) – but seriously, GPL isn’t the saviour of software licenses. It’s just one of many good licenses available.
OS X kernel is based on Mach _and_ BSD/FreeBSD kernel.
“I’d be a bit cautious about saying XNU is a Mach kernel. XNU is not a microkernel, but it contains a lot more Mach code than FreeBSD does. However, XNU contains massive amounts of FreeBSD code, including countless IPC models, security parts, VFS, network stack, distributed file systems, etc. Saying that “Mac OS X is just FreeBSD with an Apple GUI” is certainly false on face value, but it’s not correct to say that the kernel isn’t in significant part FreeBSD-derived.”
from Robert Watson (FreeBSD)
http://lists.freebsd.org/pipermail/freebsd-advocacy/2008-August/003…
It sounds like a lot of work was with the library itself and not so much modifying any FreeBSD kernel code. I would hope all of their work (probably a buch of #ifdef __freebsd__’s) is put into the official GCD codebase.
This is so cool, I wonder if the Debian based on FreeBSD kernel would have this one?
I’m so looking forward to having Debian Linux and Debian FreeBSD leveraging the strengths of both to do work.
Indeedly do, bring it on!
FreeBSD has ZFS, FreeBSD has DTrace, FreeBSD has GCD… hey, It sounds too sexy…
indeed.
what makes me excited is when we have a PC-BSD release based on FreeBSD 8.1, with a nice KDE GUI and all that great tech that is being encorporated into FreeBSD. mmmm happy thoughts…
ZFS : Developer Sun Microsystems
DTrace : Developer Sun Microsystems
GCD : Developer Apple Inc.
Seem to me BSDs and FreeBSD in particualr is unable to develop anything on it’s own. It as to relly on hand out and little crumb given to them instead of real partnership and complete contribution both ways.
Sounds like FreeBSD is all about trying to incorporate best technology that is legally possible. That, and not suffering NIH syndrome.
It’s a port, not an incorporation or technology, not a development of new technolog , not a starting partnership and attribution of developer to make the technology better and improve it. Not the start of a joint project.
To have a NIH syndrome, you have to invent something of your own or develop something of your own.
Why is BSD subpar to everything else and not a mainstream OS like GNU/Linux , MAc OS X and Apple, if it is as you say incorporating all the best technology an dnot suffering from an NIH syndrome ? Why are most BSD’s technology not in FreeBSD.
As much as I appreciate all the GNU/Linux developers for their generous work, how could you possibly accuse FreeBSD for not innovating when GNU/Linux itself is just another UNIX clone with GNU claiming that GNU is not UNIX?
What do you have against a friendly competition in the free UNIX arena, especially against a true UNIX (in terms of where the source code started, not the UNIX trademark)?
I, for one, am glad that there are other open alternatives that work toward the evolution of the UNIX environment. (such as the new malloc which apparently sped up memory allocation).
I also wonder where GNU/Linux would be without all the funding it receives from commercial entities.
As far as NIH, a few that comes to mind in recent years would be…
dtrace->SystemTrap
ZFS->btrfs
GCD->(I wonder if this will be re-invented also…)
I’m sure plenty of GNU and Linux developers would like their works to speak for their quality instead of flame-inducing comments overriding their significance.
Because FreeBSD make nothing worthwile of it’s own accord … Otherwise you would have named them by now.
There is nothing Friendly or competitive about anything BSD. One BSD out of all of them as ported this Apple technology.
GNU/Linux receive all it’s funding by it’s own commercial entity and those that work on it, we would be in the place of all irrelevant BSD if we received no funding and made nothing commercial or our own.
The real difference is our commercial entity work at making GNU/Linux better and share the work and profits with all others.
You showed that BSD’s don’t include all the better technology, just the one it likes. as opposed to GNU/Linux who use Free Software.
GNU/Linux will never be insignificant, irrelevant, dependent on other crumb for the majority of it’s advancements or in better words BSD.
Geez, Moully. Your *BSD hatred is becoming (or actually, has long become) very tiresome. I usually just ignore you. But *please* stop slavering and frothing so. I happen to prefer Linux to *BSD for my particular use cases. As a user, I happen to prefer copyleft to more permissive licensing. But I’m glad that the *BSDs are there. And the *BSD guys are doing a great job for the folks they serve. You are an embarrassment to those of us who like Linux but respect authors and users of other OSes. You are an embarrassment to those of us who prefer copyleft, but respect authors who choose other licenses under which to release their works.
You have preferences, as most of us do. But you lack the *respect* for others that most of us learned in kindergarten. In fact, sometimes I feel that you got stuck in kindergarten and are forever posting from there.
Some might tell me to stop feeding the troll. But you are not a troll. I’ve known you too long to think that. You are simply overenthusiastic and tactless.
Edited 2009-10-14 02:32 UTC
Moulinneuf is my actual real name, not a coward like some ( namely you ), and as no Y in it …
Actually, it’s not hatred, but then as one who is defined and live according to is hatred you would not know it.
The real point you miss is that even do it’s a nice addition, it would be much better if that application had came from a BSD project, shared amongst all BSD and was complete.
Not like you have anything relevant or accurate to say anyway …
I have no master and I don’t suffer from any rage sickness …
It’s GNU and RMS you hate, out of your own made up fantasy world … So you think because you hate him and it, I am doing the same with BSD …
There is no “more permissive licensing.” , A license when one is, is defined by the language it contain. It’s either permissive like the GPL or it’s not like most proprietary license, protection clause like BSD only allow usage and are not license at all as you have to be the onwer of the code to license something.
Also the BSD protection clause is copyleft.
Good for you, me I don’t like thieves , traitor, cowards and liar, nothing personnal I know they can’t be trusted.
They don’t serve anyone … not even themself.
I have respect for auhtors and other OS user’s. If I am embarassing to things like you, it’s an honor I will gladly do every single day.
Copyleft people, witch of course you are representing, even know you clearly indicate here not knowing what it is and a member of, you have a very limited set of definition of what an embarassement is :” Everyone who disagree with Steve Bergman aka sbergman27″ Same as Troll for other’s here.
BSD is not a license …
You would have to be people to have preference …
I don’t know respect start with oneself, by using one real name it’s a basic respect, so , no I don’t have the same respect or was tought what respect is by the same people who taught you in kindergarden, what “this” is.
Wishfull thinking on your part … Or worst projection.
Well some are as educated as you are about troll … BTW this mean you never seen one in reality or in writting, or know what it would look like.
Stop complimenting me, I am beginning to think you want me to feel better about myself …
What _exactly_ was your problem again? You’ve been bitching about so many people and so many projects in a single thread that it just doesn’t make any sense anymore.
So the *BSD crowd are thieves. Why is that? Because they cherry-pick as much public available code they like to port it to their project? Seriously, that’s the idea? If it’s available and they think it could be useful, it actually makes sense to make use of it, that’s all.
It’s just a bunch of code FFS, it’s just text files containing intructions to be executed one after another by a CPU, wich happens to be unencumbered of license restrictions. My guess is that it was released that way on pourpose for others to integrate as they see fit, don’t you think?
I think it’s about time you stopped Moulinneuf before we have to step in. This is off topic and you will never win.
Just for you Kroc, I am gonna stop writting in this thread. But I am gonna need clarification and precision on your comment here. Private MSG or E-mail are fine with me, when you have the time to get around to it off course.
Kroc, you should really learn to do the same as most of us here do; just ignore Moulinneuf. Most of the time he is just trolling around, claiming things without any arguments to support him and then calling anyone who disagrees with him with insulting names. And his obsession with using one’s real name.. Ugh.
Yeah, yeah, I know; but as an editor I have to step in at some point to stop the bottomless discussion threads.
Just to degrade things, I might point out that Steve Bergman lists his (presumably) real name in his profile. Not that that’s a particularly good thing to do on the net in the first place, or a reasonable demand to make on your part, but…
Edited 2009-10-14 15:31 UTC
Because you are a Linux user you must bash the nice work being done in the BSDs arenas?
AFAIK, jemalloc was born inside of FreeBSD, this is one of the best memory allocators found currently and is being used in Firefox since 3.0. FreeBSD does not aport anything?
The “ports” package manager was born in FreeBSD and similar technology is being used in OpenBSD (port collection), NetBSD and DragonFly (pkgsrc), MacOSX (MacPorts and DarwinPorts) and in Linux (Gentoo’s Portage)…
“Jails” is another good contribution of BSD implementing similar technologies in Solaris (Zones).
HammerFS is a nice filesystem written by the main DragonFly developer.
OpenSSH was born in OpenBSD.
No, because I am a BSD user’s who able to face reality as it is, not how I wish it to be …
Apple crumb taste like shit. You can put all the cream , butter and sweet on it that you want, I prefer real BSD pie made in real BSD oven , by real BSD people.
I don’t care that they partner with Apple to make it, or that Apple pay or len developer to make it, I prefer the original to ported crumb.
No. Because he is a whiny asshole he must bash the nice work being done in the BSDs arenas. There’s a big difference.
I’m a Linux user. And I very much appreciate the work done in the *BSD world. And I think that most of us do.
Of course, the *BSD communities have their own vocal wackos, as do we. Best to just ignore both.
-Steve
Sorry for feeding your negativity, but FreeBSD did create jemalloc which is now used in Firefox 3 for increased multithread memory allocation performance.
To be fair, ZFS vs btrfs (and probably dtrace vs SystemTap too) was not just NIH but a licensing issue. I don’t mean to open up the question of whose fault this was but it’s worth noting that the code for ZFS and Dtrace could not be included in the mainline Linux kernel because of the interaction between licenses.
That’s not to say that Linux folks wouldn’t have gone all NIH and tried to reinvent the wheel even if the code could be incorporated directly, there are surely some examples of that out there. But in this instance they really did have a valid reason not to just use the existing code.
The valid reasons go beyond that. Kernel code is hard to transplant. Could the kernel portion of Dtrace really have been ported to Linux more easily than starting from scratch? They are *very different* kernels. Sure, a map of Denver and Houston are very similar; They *are* both maps, aren’t they? It’s just the streets and intersections that differ. Just move the proper stop lights from one to the other and everything will work just fine, right?
Systemtap was not NIH. It was just what made sense. (I won’t comment on the user space portion since I feel I’d be talking out my ass if I did. Fact is, I don’t have an informed opinion on it.)
ZFS vs btrfs is a little different. ZFS was a radical change in layering philosophy for Sun. The Linux kernel devs are not at all convinced that they would want to follow Sun down that path. And even if it weren’t for that… I’m not sure that I would want to see our default filesystem “bolted on” like that. No matter how good ZFS may be.
So am I a compulsive Linux Kernel apologist? Not really. I am currently watching in mild horror as the formerly vanquished DevFS, defeated by the FUD-slinging efforts of Greg Kroah-Hartmann, to be replaced (accompanied by much user pain) by udev… is now coming back, in the form of DevFS II, which is to replace (also surely to be accompanied by much user pain) udev. And did I mention that Greg is co-author or DevFS II?
It’s not really called DevFS II. But that’s how I think of it. I don’t recall its real name.
Edited 2009-10-14 17:41 UTC
I imagine this would also be the case, although I’ve never transplanted kernel code between significantly differing kernels myself.
However, Linux kernel policy is that the driver in kernel.org should be natively Linux-ified, which would make it hard to have a common source code project and hence make it harder to share code. It could be done if there was a reason, I’m sure.
Licensing issues just meant that there was simply no chance of anyone having the motivation to tackle these other problems in the first place.
Sure. Although it would still be nice if ZFS could be supported somewhat for compatibility reasons. Looks like the best we’ll do on that is either the existing FUSE port, or a kernel port based on the code in GRUB.
devtmpfs, something like that? It’s not a complete replacement for udev AIUI, which either makes it nicer or nastier depending on your perspective. Possibly even both. I’m not entirely keen on it, it smells a bit funny to me. But maybe I will be proven wrong.
Oh nooo!! Not again 🙁 I sure hope Red Hat, KDE and other teams have developed solid and flexible enough hardware abstracting layers to keep us from smashing to badly into that transition. Make sure to enjoy your easily pluggable hardware while it lasts 😉
Yeah, because the whole of GPL as a wider community consists of just the Linux guys (Do you refuse to use CUPS because it’s owned by Apple?)
Or that Linux just runs GPL software (You run apache on your Linux webservers right?)
It’s all open source so stop the f*c£!ng flame-wars!!!
I’m not entirely sold on GCD; it’ll be interesting to see what the results of doing this are. If lots of FreeBSD application developers start using GCD, or if lots of application development moves to FreeBSD to get GCD, then I guess I’ll just have to admit that I really don’t get it.
Edited 2009-10-13 23:29 UTC
As King Koopa would say: This is gonna’ be excellent.
Read between the lines on this one.
libdispatch was “ported” to FreeBSD. Which means that Mac OS X is NOT FreeBSD.
The FreeBSD team have done work to “get it running on a POSIX environment”. Which means that Mac OS X is NOT a real POSIX environment. And presumably, not really UNIX.
Which is what I’ve been saying all along.
Mac OS X has also a different interface than POSIX to the system internals: Mach. If I remember the source and docs of GCD correctly it uses those Mach interfaces. This example says nothing about if Mac OS X is POSIX compliant, it just indicates there is a different interface.
I guess that almost no OS is 100% posix compliant, not even FreeBSD or Linux (but I’m not sure about that). Almost every Unix OS is to a certain degree Posix compliant, even Mac OS X.
Except you’d be wrong. OSX IS POSIX compliant and is more Unix than even Linux.At the end of the day what really separates OSX from other unices is the interface it uses which is machlike. In fact if you read this http://en.wikipedia.org/wiki/POSIX you would see that OSX conforms almost 100% with one or more of the POSIX standards and is considered Fully POSIX compliant. Linux on the other is considered Mostly POSIX compliant, because it isn’t compatible with the full or even most of the standards. OSX also has received the UNIX 03 certification which means for all intents and purposes OSX is UNIX.
Aside from that POSIX doesn’t really mean much if you really think about it. Even Windows can be considered mostly POSIX compliant with the right software installed. The real Unix standards are actually being set by projects like FreeBSD and Linux, they usually are the first to implement new technology and usually their brethren follow suit to conform to what is currently happening.
Technically, the interface is POSIX. Mach is the underlying kernel which is pretty hidden under the BSD personality layer.
Being Fully Compliant is not necessarily much different from being Mostly Compliant. Even if you are 100% compliant you are only Mostly Compliant until you have been certified, which involves paying a fee. This is why Linux is not and never will be Fully Compliant.
That said, I understand that Linux is more like 99% compliant in that it (and GNU utilities) sometimes differ from the spec when it is felt that the spec is crazy. FreeBSD does the same kind of thing in a few places.