+ Reply
Results 1 to 12 of 12

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Grand Central Dispatch: building for the future

is a discussion within the

Mac News

forums, a part of the

General Apple/Mac

section;
...
  1. #1
    MMi Staff Writer Paul Daniel Ash's Avatar
    Join Date
    Aug 2009
    Location
    Union Square, Somerville, Mass.
    Posts
    919
    Thanks
    6
    Thanked 995 Times in 401 Posts

    Default 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

  2. The Following 2 Users Say Thank You to Paul Daniel Ash For This Useful Post:

    AAAARRRRRRGGGGG (09-01-2009), b3nny (09-01-2009)

  3. #2
    My iPhone is a Part of Me rwin84's Avatar
    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.

    1
    This is getting a lil' ridiculous...

  4. #3
    My iPhone is a Part of Me
    Join Date
    Nov 2007
    Location
    Los Angeles
    Posts
    813
    Thanks
    417
    Thanked 108 Times in 80 Posts

    thank god for apples

  5. #4
    iPhone? More like MyPhone mdc929's Avatar
    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



  6. #5
    Green Apple J_Marley's Avatar
    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?

  7. #6
    Developer n00neimp0rtant's Avatar
    Join Date
    Feb 2008
    Location
    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.

  8. #7
    Livin the iPhone Life sziklassy's Avatar
    Join Date
    Jan 2008
    Location
    Iowa (ISU for Vet School!)
    Posts
    3,920
    Thanks
    69
    Thanked 310 Times in 264 Posts

    Quote Originally Posted by J_Marley View Post
    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?
    It has to start with the OS... "if you build it they will come" LOL
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
    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

  9. #8
    Livin the iPhone Life Poseidon79's Avatar
    Join Date
    Jan 2008
    Location
    Austin, TX
    Posts
    8,265
    Thanks
    819
    Thanked 1,681 Times in 1,159 Posts

    Quote Originally Posted by J_Marley View Post
    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?
    Isn't a need? Every (new) computer on the market being sold these days has a multi-core chip. I would say the need has never been greater. 2 years ago it would have been ridiculous when multi-core was cutting edge... but main stream now.
    [SIGPIC][/SIGPIC]

  10. #9
    iPhone? More like MyPhone smuggler's Avatar
    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

  11. #10
    iPhone? More like MyPhone
    Join Date
    Jul 2008
    Location
    Yonkers, NY
    Posts
    126
    Thanks
    10
    Thanked 9 Times in 7 Posts

    Quote Originally Posted by Poseidon79 View Post
    Isn't a need? Every (new) computer on the market being sold these days has a multi-core chip. I would say the need has never been greater. 2 years ago it would have been ridiculous when multi-core was cutting edge... but main stream now.
    and to drive this home even further, our calculations per second per dollar average has been increasing pretty much exponentially since the beginning of computing. we need to strap in for increasingly accelerating advances in how we handle information.
    Last edited by AAAARRRRRRGGGGG; 09-01-2009 at 12:04 PM.

  12. #11
    Green Apple nevarDeath's Avatar
    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

  13. #12
    What's Jailbreak?
    Join Date
    Jun 2008
    Location
    CA
    Posts
    15
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by J_Marley View Post
    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?
    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.

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts