Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: Grand Central Dispatch: building for the future
is a discussion within theMac News
forums, a part of theGeneral Apple/Mac
section;...
-
08-31-2009, 08:41 AM #1MMi Staff Writer
- Join Date
- Aug 2009
- Location
- Union Square, Somerville, Mass.
- Posts
- 919
- Thanks
- 6
- Thanked 996 Times in 401 Posts
Grand Central Dispatch: building for the future

Much has been made of the fact that there are not a lot of new features in Snow Leopard from a user point of view. While it's true that from a marketing standpoint Snow Leopard could have made a much bigger splash, especially this close to the Windows 7 release, Apple deserves some real credit for doing the right thing from an engineering point of view. Snow Leopard fixes a lot of what was broken in Leopard, provides real speed and usability improvements, and most importantly builds in solid support for technology - such as multi-core processors - that will be central to computing in the years to come.
I want to take a brief look at one of the most significant new "under-the-hood" elements of Snow Leopard: the Grand Central Dispatch (GCD) model. GCD provides a set of extensions to common programming languages - specifically C, C++ and Objective C - that make it easier to take advantage of the multiple cores on modern processors. Cores are essentially separate computing engines located on the same chip that allow tasks to be handled in parallel - simultaneously - rather than one at a time.
The problem with this approach in software - called task parallelism - is that it requires a lot of challenging work for the programmer. Computing jobs need to be broken up intelligently into tasks, and these tasks need to be farmed out to separate cores. That's being handled in threads by modern code. Programmers need to ensure that each thread has the resources it needs, that it locks the data that it's using and releases it when it's done, and that no other threads are using the resources at the same time. Complicating all of this is the fact that the programmer has no way of knowing whether the code will be run on a dual-core or quad-core chip... or some future William Gibson thousand-core black-ice über-mainframe.
GCD allows the programmer to define units of code and data into Blocks, which can then be put on Queues for scheduling. The system then handles execution of all the scheduled Queues in an efficient, coordinated way, rather than letting individual programs grab resources willy-nilly. Apple's clearly invoking Grand Central Station to suggest the efficient flow of large volumes of traffic. It's an apt metaphor: the amount of parallelizable code will likely grow enormously to take advantage of faster chips with more cores. Leaving thread management up to individual programs, as in the status quo, will likely lead to worse and worse pile-ups.
The Windows 7 release will certainly be a big media splash. Hopefully, we'll also see real improvements in the underlying technology on which most of the world's PCs depend. It will be interesting to see which architecture best takes advantage of future processors as the technology continues to advance.Last edited by Paul Daniel Ash; 08-31-2009 at 08:47 AM. Reason: typo
-
The Following 2 Users Say Thank You to Paul Daniel Ash For This Useful Post:
AAAARRRRRRGGGGG (09-01-2009), b3nny (09-01-2009)
-
08-31-2009, 09:08 AM #2My iPhone is a Part of Me
- Join Date
- Nov 2007
- Location
- Orlando, FL
- Posts
- 679
- Thanks
- 3
- Thanked 16 Times in 16 Posts
Snow Leopard, arguably one of the best OS of all time. Well thought out and executed.
1This is getting a lil' ridiculous...
-
08-31-2009, 09:40 AM #3My iPhone is a Part of Me
- Join Date
- Nov 2007
- Location
- Los Angeles
- Posts
- 815
- Thanks
- 417
- Thanked 108 Times in 80 Posts
thank god for apples

-
08-31-2009, 09:41 AM #4iPhone? More like MyPhone
- Join Date
- Jul 2007
- Location
- Buffalo
- Posts
- 290
- Thanks
- 10
- Thanked 5 Times in 3 Posts
interesting especially since this stuff is going to be covered in my computer science class
thanks paul i never wouldve known what this meant for snow leopard without you


-
08-31-2009, 11:02 AM #5Green Apple
- Join Date
- Jun 2007
- Location
- Central WIsconsin
- Posts
- 69
- Thanks
- 5
- Thanked 7 Times in 6 Posts
Yes, I agree this is great news, but the issue still stands that there are so few companies and programmers willing to take the time to put together a decent multi-core utilized application that at this point there isn't a need. Kudos for aaple thinking ahead, but where is this truly going to lead without companies stepping up the quality of their products?
-
08-31-2009, 11:08 AM #6Developer
- Join Date
- Feb 2008
- Location
- Oakland, Pittsburgh, PA
- Posts
- 1,341
- Thanks
- 25
- Thanked 600 Times in 136 Posts
Honestly, I thought OpenCL, the idea of using a graphic processor for non-graphic tasks whenever it is in low to no usage, was a totally revolutionary idea. Think about how big of a waste it is to have a superfast graphic processor, capable of performing trillions of operations a second, and only using it for 3D gaming or intense video editing.
Can I Jailbreak? | Can I Unlock? | Ensure iDevice Downgrades | Download ANY iPhone IPSW | StatusNotifier on iOS 4 | Defeat apps that block jailbroken devices | Quick Reply SMS (and more) FREE
Want to say "Thanks?" Check out my Gigs on Fiverr!
-
08-31-2009, 04:20 PM #7Livin the iPhone Life
- Join Date
- Jan 2008
- Location
- Iowa (ISU for Vet School!)
- Posts
- 3,920
- Thanks
- 69
- Thanked 310 Times in 264 Posts
------------------------------------------------------------------------------------------------------------------------------------------------------------------
I once prayed to God for an iPhone, but quickly found out He didn't work that way...so I stole an iPhone and prayed for His forgiveness.
A dog is the only thing on earth that loves you more than you love yourself. - Josh Billings
-
08-31-2009, 08:57 PM #8Super Moderator
- Join Date
- Jan 2008
- Location
- Austin, TX
- Posts
- 8,269
- Thanks
- 819
- Thanked 1,670 Times in 1,158 Posts
-
08-31-2009, 10:52 PM #9iPhone? More like MyPhone
- Join Date
- Jul 2009
- Location
- atlanta, ga
- Posts
- 192
- Thanks
- 11
- Thanked 3 Times in 2 Posts
'pretiate it, very informing, good arguing tools when bragging about sn0w le0pard
-
09-01-2009, 12:02 PM #10iPhone? More like MyPhone
- Join Date
- Jul 2008
- Location
- Yonkers, NY
- Posts
- 126
- Thanks
- 10
- Thanked 9 Times in 7 Posts
Last edited by AAAARRRRRRGGGGG; 09-01-2009 at 12:04 PM.
-
09-02-2009, 04:20 PM #11Green Apple
- Join Date
- Jun 2007
- Location
- Sand Springs Oklahoma
- Posts
- 84
- Thanks
- 8
- Thanked 3 Times in 3 Posts
I definately think modmyi could benefit from more slightly technical articles like this! Thanks for the interesting read, I had no idea!

When asked what he would say to the columbine killers, Marilyn Manson said, "I would say nothing to them. I would listen to what they have to say, because that's what nobody else did" from the movie Farenheit 9/11
-
09-02-2009, 11:04 PM #12
Yes i see, its a problem i see as well. todays focus is looking good not doing good. This tech is in its infancy and i am certain that in due time it will blossom like many other ideas from apple into something bigger. we dont have the answer yet but its coming. and i see it coming soon.




LinkBack URL
About LinkBacks
Reply With Quote



