Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacRumors

macrumors bot
Original poster
Apr 12, 2001
65,675
34,294


Daring Fireball's John Gruber noted yesterday that Apple has released libdispatch, the source code for the user space implementation of Grand Central Dispatch, taking a significant portion of the company's technology for more efficiently utilizing multicore processors open source. While some may consider the move a surprise due to the technology's key role in the core of Mac OS X Snow Leopard, MacResearch points out several reasons why the move may not be all that risky for Apple.
So why did they do it? Only Apple knows for sure, but there are compelling arguments for open sourcing Grand Central Dispatch, even for a commercial enterprise. First, Apple will of course reap the rewards of any development that takes place, just as they have with WebKit. Second, it is unlikely that Grand Central would be used by any direct competitor to Apple, like Microsoft. Grand Central is more likely to be added to other UNIX and Linux systems, none of which really pose a threat to Apple's consumer-based business.
Opening up Grand Central Dispatch for broader distribution into the UNIX community could ultimately serve to spark new innovations using the technology that could make their way back to the Mac platform. In addition, wider distribution of the technology could drive the adoption of other technologies such as blocks, the non-standard extension to the C programming language upon which Grand Central Dispatch is based.

Article Link: Portions of Apple's Grand Central Dispatch Go Open Source
 

mattwolfmatt

macrumors 65816
Jun 7, 2008
1,088
203
As an avid mac user and an absolute programming idiot, all I have to say is "HUH?" :eek:

This is all over my head, but it sounds good (I think.)
 

nagromme

macrumors G5
May 2, 2002
12,546
1,196
It will also increase awareness/mindshare, which may spur developers to do more with this great tech even in its existing form.
 

Corrosive vinyl

macrumors 6502
Sep 22, 2006
473
0
Grand central from what I have read basically is a way to make more use of multiple core CPUs. This is great because apple has made something new, and to make it more useful they have open sourced it so that regular programmers can take it and use it to make more and better performing mac apps.
 

Stetrain

macrumors 68040
Feb 6, 2009
3,550
20
Grand central from what I have read basically is a way to make more use of multiple core CPUs. This is great because apple has made something new, and to make it more useful they have open sourced it so that regular programmers can take it and use it to make more and better performing mac apps.


Programmers making Mac apps don't need the source to use GCD, its a framework that's available to anyone developing on the platform for 10.6+

I think the benefit will be in continued development in the unix/linux community as a whole as computer hardware changes in the future.
 

shawnce

macrumors 65816
Jun 1, 2004
1,442
0
Grand central from what I have read basically is a way to make more use of multiple core CPUs. This is great because apple has made something new, and to make it more useful they have open sourced it so that regular programmers can take it and use it to make more and better performing mac apps.

GCD is part of Snow Leopard. Mac developers already have access to its facilities, they don't need access to the source code.

This is simply as Apple states to make it available to expand it use outside of just Mac OS X to benefit developers and as a result Apple. Also to see what extensions, enhancements people can think of.
 

ltcol266845

macrumors regular
Aug 25, 2006
217
0
Elgin, IL
Out of curiosity, are there any applications taking advantage of OpenCL and GCD? I know its early, just wondering. What about Apple's new creative applications like Final Cut Pro, Motion, Compressor and the gang? Seems those would have the most to gain with OpenCL especially and GCD to a lesser extent (I assume they are already pretty well multi-threaded).
 

Spades

macrumors 6502
Oct 24, 2003
461
0
This is the Apple that I love. The one that provides lots of nerd goodies for us to play with. I wish this Apple showed up more often than the control freak Apple.
 

VoR

macrumors 6502a
Sep 8, 2008
917
15
UK
They do seem to champion open source in many regards.

I think a fair few oss advocates would disagree :p Apple's history is hardly great, with like two exceptions...

They're just using it to their own advantage as they have done many times in the past - any commits from apple to any oss is a 'positive' in some respects, little more.
 

SpinThis!

macrumors 6502
Jan 30, 2007
480
135
Inside the Machine (Green Bay, WI)
For the average Mac user this doesn't mean much.

To make this ultimately useful, other OSes would need to bake this into the kernel so we'll see if and when that happens. It took years for WebKit to mature and end up being used by others besides Apple; we'll see how this project fares.

The next step would be for people to actually start using it and that's where it'll get interesting. Say, if projects like x264 adopt this, the trickle down effect would happen and apps like HandBrake would be able to take advantage.
 

larrylaffer

macrumors 6502a
Aug 1, 2009
697
1,308
Los Angeles
For the average Mac user this doesn't mean much.

To make this ultimately useful, other OSes would need to bake this into the kernel so we'll see if and when that happens. It took years for WebKit to mature and end up being used by others besides Apple; we'll see how this project fares.

The next step would be for people to actually start using it and that's where it'll get interesting. Say, if projects like x264 adopt this, the trickle down effect would happen and apps like HandBrake would be able to take advantage.

I feel WebKit took "years" to mature largely because it took a while before major players decided it was a project worth using for their own needs. Sure it's nice to have the KDE and Symbian folks hacking away at it, but once Google started contributing, the growth accelerated substantially. In the last 6 months of running WebKit nightlies I've seen huge performance gains everywhere. It's very exciting stuff!

I think technologies like GCD are going to play a big role in netbooks and mobile devices since it's intended to allow an application to make use of every available resource efficiently. With Google developing an OS I wouldn't be surprised to see them considering using GCD for themselves, and then contributing great improvements to it (though it may be too late in their dev cycle to make such a big change).
 

Spades

macrumors 6502
Oct 24, 2003
461
0
What does this do for you that pthreads don't?

I saw a good analogy for GrandCentral earlier today. pthreads is to GrandCentral as assembly is to C. It's just far easier to do parallel programming with GrandCentral than it is with pthreads. Except GrandCentral is system wide, so it can tune threads even better than the programmer could.

However, one of the features required for GrandCentral, blocks, is a major new feature for C and C-derived languages. Blocks are closures for C, and closures are a powerful little tool. Apparently, Apple's block extension has been open source and in LLVM for awhile.
 

shakenmartini

macrumors 6502
Apr 29, 2008
432
0
This is awesome news. If this filters into Linux, you can bet the Linux and OSX will be even stronger contenders for high performance computing.

Already OSX is becoming a popular platform for scientific computing because it is easy to port Linux programs to OSX.
 

mserrano303

macrumors newbie
Oct 19, 2007
7
2
What does this do for you that pthreads don't?

Each application (and therefore the application programmer) has to maintain his own threads with pthreads.

With GCD, the operating system dynamically determines the optimal way to thread all of the currently running applications for you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.