![]()
For the longest time multicore macs have unfortunately been held back by old and un-optimized code that was designed for single core CPUs. If you have any sort of system monitoring device on your computer you may notice that your mac is often using 100% of one core and 0% of the other. The release of Snow Leopard and the inclusion of GCD (Grand Central Dispatch) hopes to change all of that.
More cores, not faster clock speeds, drive performance increases in today’s processors. Grand Central Dispatch takes full advantage by making all of Mac OS X multicore aware and optimizing it for allocating tasks across multiple cores and processors. Grand Central Dispatch also makes it much easier for developers to create programs that squeeze every last drop of power from multicore systems.
How it works:
GCD has a multicore execution engine that reads the queues created by each application and assigns work from the queues to the threads it is managing. GCD manages threads based on the number of cores available and the demands being made at any given point in time by the applications on the system. Because the system is responsible for managing the threads used to execute blocks, the same application code runs efficiently on single-processor machines, large multiprocessor servers, and everything in between.
Without a pervasive approach such as GCD, even the best-written application cannot deliver the best possible performance on any given system, because that single application doesn’t have full insight into everything else happening in the system. GCD understands the entire system and automatically maps the blocks of work a you write to individual threads and cores as appropriate.
Get the full story over at Apple’s GCD page.
Tweet