Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Apple Freezes Snow Leopard APIs

Posted by kdawson on Tue May 12, 2009 04:25 AM
from the see-you-at-the-base-camp dept.
DJRumpy writes in to alert us that Apple's new OS, Snow Leopard, is apparently nearing completion. "Apple this past weekend distributed a new beta of Mac OS X 10.6 Snow Leopard that altered the programming methods used to optimize code for multi-core Macs, telling developers they were the last programming-oriented changes planned ahead of the software's release. ...`Apple is said to have informed recipients of Mac OS X 10.6 Snow Leopard build 10A354 that it has simplified the`... APIs for working with Grand Central, a new architecture that makes it easier for developers to take advantage of Macs with multiple processing cores. This technology works by breaking complex tasks into smaller blocks, which are then`... dispatched efficiently to a Mac's available cores for faster processing."
+ -
story

Related Stories

[+] Technology: Apple To Ship Mac OS X Snow Leopard On August 28 647 comments
okapi writes "Apple announced that Mac OS X v10.6 Snow Leopard will go on sale Friday, August 28 at Apple's retail stores and Apple Authorized Resellers, and that Apple's online store is now accepting pre-orders."
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by Anonymous Coward

    Haven't video game programmers been doing it forever, doing some things on the CPU, some on the graphics card?

    And I heard functional languages like Lisp/Haskell are good at these multi-core tasks, is that true?

    • by A.K.A_Magnet (860822) on Tuesday May 12 2009, @05:11AM (#27919525) Homepage

      Haven't video game programmers been doing it forever, doing some things on the CPU, some on the graphics card?

      The problem is shared-memory, not multi-processor or core itself. Graphics card have dedicated memory or reserve a chunk of the main memory.

      And I heard functional languages like Lisp/Haskell are good at these multi-core tasks, is that true?

      It is true, because they privilege immutable data structures which are safe to access concurrently.

      • And I heard functional languages like Lisp/Haskell are good at these multi-core tasks, is that true?

        It is true, because they privilege immutable data structures which are safe to access concurrently.

        Only partly true. Even in pure functional languages like Haskell, the functional-programming dream of automatic parallelization is nowhere near here yet; in theory the compiler could just run a bunch of thunks of code in parallel, or speculatively, or whatever it wants, but in practice the overhead of figuring out which are worth splitting up has doomed all the efforts so far. It does make some kinds of programmer-specific parallelism easier; probably the most interesting experiments in that direction, IMO, is Clojure [clojure.org]'s concurrency primitives (Clojure's a Lisp-derived language with immutable data types, targeting the JVM).

        Lisp, FWIW, doesn't necessarily privilege immutable data structures, and isn't even necessarily used in a functional-programming style; "Lisp" without qualifiers often means Common Lisp, in which it's very common to use mutable data structures and imperative code.

        • by A.K.A_Magnet (860822) on Tuesday May 12 2009, @05:37AM (#27919655) Homepage
          I know it was partially true, I should remember not to be too lazy when posting on /. :).

          Note that I was not talking about automatic parallelization which is indeed possible only with pure languages (and ghc is experimenting on it); but simply about the fact that is is easier to parallelize an application with immutable data structures since you need to care a lot less about synchronization. For instance, the Erlang actors model (also in other languages like Scala on the JVM) still requires the developer to define the tasks to be parallelized, yet immutable data structures make the developer's life a lot easier with respect to concurrent access and usually provide better performance.

          My "It is true" was referring to "functional languages" which do usually privilege immutable data structures, not to Haskell or Lisp specifically (which as you said has many variants with mutable structures focused libraries). As you said, Clojure is itself a Lisp-1 and it does privilege immutable data structures and secure concurrent access with Refs/STM or agents. What is more interesting in the Clojure model (compared to Scala's, since they are often compared even though their differences, as functional languages and Java challengers on the JVM) is that it doesn't allow unsafe practices (all must be immutable except in variables local to a thread, etc).

          Interesting times on the JVM indeed.
          • Yeah that's fair; I kind of quickly read your post (despite it being only one sentence; hey this is Slashdot!) so mistook it for the generic "FP means you get parallelization for free!" pipe dream. :)

            Yeah, I agree that even if the programmer has to specify parallelism, having immutable data structures makes a lot of things easier to think about. The main trend that still seems to be in the process of being shaken out is to what extent STM will be the magic bullet some people are proposing it to be, and to what extent it can be "good enough" as a concurrency model even in non-functional languages (e.g. a lot of people are pushing STM in C/C++).

      • Re: (Score:3, Insightful)

        only the CRAPPY video cards use any of the main memory. Honestly, with how cheap real video cards are I cant believe anyone would intentionally use a memory sharing video card.

        It's like the junk winmodems of yore. DONT BUY THEM.

        • by AndrewNeo (979708) on Tuesday May 12 2009, @08:19AM (#27920779) Homepage
          Unfortunately that's not the issue at hand. You're referring to the video card using system RAM for it's own, but the issue they're talking about (which only occurs in the 32-bit world, not 64-bit, due to the MMU) is that to address the memory on the video card, it has to be put into the same 32-bit addressable block as the RAM, which cuts into being able to use it all, rather than using it physically. At least, that's how I understand it works.
    • No, they haven't, with few exceptions. Doing multiple things at the same time isn't really the issue here, we're trying to figure out how to effectively split one task between multiple 'workers'. Video games are one of the harder places to try to apply this technique to, because they run in real time and are also constantly responding to user input. Video encoding is the opposite. One of the big problems with multicore is coordinating the various worker threads.

      You could learn a lot by taking the time to re

      • I see a lot of talk about programming data structures, but what if their tackling this at a much lower level? Taken to a simple extreme description, each core is simply processing a single task at a time for X number of clock cycles or less (although I understand they can process multiple tasks via piping or somesuch). There is already a balancing act between the CPU and memory as it has to sync I/O between the two due to differing clock speeds. What if they are doing something similar here?

        By that I mea
        • by DrgnDancer (137700) on Tuesday May 12 2009, @07:17AM (#27920213) Homepage

          I'm by no means a multiprocessing expert, but I suspect the problem with your approach is in the overhead. Remember that the hardest part of multiprocessing, as far as the computer is concerned, is making sure that all the right bit of code get run in time to provide their information to the other bits of code that need it. The current model of multi-CPU code (as I understand it) is to have the programmer mark the pieces that are capable of running independently (either because they don't require outside information, or they never run at the same time as other pieces that need the information they access/provide), and tells the program when to spin off these modules as separate threads and where it will have to wait for them to return information.

          What you're talking about would require the program to break out small chunks of itself, more or less as if sees fit, whenever it sees an opportunity to save some time by running parallel. This first requires the program to have some level of analytical capability for it's own code (Let's say we have two if statements one right after the other, can they be run concurrently? or does the result of the first influence the second? What about two function calls in a row?). The program will have to erect mutex locks around each piece of data it uses too, just to be sure that it doesn't cause dead locks if it misjudges whether two particular pieces of code can in fact run simultaneously.

          It also seems to me (again I'm not an expert), that you'd spend a lot of time moving data between CPUs. As I understand it, one of the things you want to avoid in parallel programing is having a thread have to "move" to a different CPU. This is because all of the data for the thread has to be moved from the cache of the first CPU to the cache of the second. A relatively time consuming task. Multicore CPUs share level 2 cache I think, which might alleviate this, but the stuff in level 1 still has to be moved around, and if the move is off die, to another CPU entirely, then it doesn't help. In your solution I see a lot of these moves being forced. I also see a lot of "Chunk A and Chunk B provided data to Chunk C. Chunk A ran on CPU1, Chunk B on CPU2, and Chunk C has to run on CPU3, so it has to get the data out of the cache of the other two CPUS".

          Remember that data access isn't a flat speed. l1 is faster than l2 which is much faster than RAM, which is MUCH faster than I/O buses. Anytime data has to pass through RAM to get to a CPU you lose time. With lots of little chunks running around getting processed, the chances of having to move data between CPUs goes up a lot. I think you'd lose more time on that then you gain by letting the bits all run on the same CPU.

    • Haven't video game programmers been doing it forever, doing some things on the CPU, some on the graphics card?

      Yeah, and they sync an unknown (but often quite large) amount of "cores" (ie, the shaders, etc in the GPU) quite easily too.

      Of course, the only reason it's so easy for video game programmers is that raster graphics are one of the easiest things ever to parallelize (since pixels rarely depends on other pixels), and APIs like OpenGL and Direct3D make the parallelism completely transparent. If they had to program each individual pixel pipeline by hand, we'd still be stuck with CPU rendering. The purpose of Gra

  • G5? (Score:5, Interesting)

    by line-bundle (235965) on Tuesday May 12 2009, @04:30AM (#27919361) Homepage Journal

    what is the status of 10.6 on the PowerPC G5?

    • Its working well, thanks for asking...
      • Thanks for Playing (Score:4, Informative)

        by Anonymous Coward on Tuesday May 12 2009, @07:11AM (#27920167)
        I'm one of the seed testers, and even posting anonymously, I am concerned not to violate Apple's NDA. So, I'll put it like this: I have 2 PPC machines and an Intel machine. I have only been able to get the SL builds to work on the Intel machine due, I'm pretty sure, to no fault of my own.
    • Re:G5? (Score:5, Informative)

      by chabotc (22496) <chabotc AT gmail DOT com> on Tuesday May 12 2009, @09:00AM (#27921299) Homepage

      Snow Leopard is going to be the first version of Mac OS X that only runs on Intel Macs, so I'm afraid you're going to be stuck on plain old leopard

      • Re:G5? (Score:4, Interesting)

        by DECS (891519) on Tuesday May 12 2009, @02:53PM (#27926873) Homepage Journal

        The main feature of Snow Leopard is its 64-bit kernel and an upgrade across the board to 64-bit apps.

        The problem for porting this to PowerPC is that the move to 64-bits only makes things slower on PPC because, as it is based on a modern 64-bit architecture with plenty of registers, it's already gained most of the benefits of 64-bits even when using 32-bit apps. Moving to 64-bit apps just means it has to move around more memory.

        On the other hand, 32-bit Intel CPUs are register starved, so the additional memory overhead of the move to 64-bits is far outweighed by the improvement in moving to the 64-bit "Intel" architecture (developed by AMD).

        So faced with spending twice the efforts to optimize SL for PPC machines that Mac users have known to be marked for death since 2006, resulting in a product that only runs 64-bit versions of PPC apps slower than Leopard, Apple decided to target its modern 2009 operating system to its modern hardware platform.

        There are probably some G5 owners who might like the idea of being able to upgrade to SL, but they probably don't realize that it would only result in some new trim and slower overall performance. And if you compare the number of G5 machines Apple was selling in 2005-2006 with the number of Intel machines it has sold since, you'll see another reason why Apple is supporting Intel exclusively.

        FYI:

        Apple sold 0.8 to 1 million PPC Macs per quarter in 2005-2006.
        Apple sold 2.3 to 2.6 million Intel Macs per quarter in the last year.

        Why Windows 7 is Microsoft's next Zune [roughlydrafted.com]

        • Re: (Score:2, Interesting)

          I just hope the Optical Drive goes the same way on notebooks. Most people use it very few times a year (not more than 4 or 5 in my case), and it is more than 250gr (~ half a pound) to carry every time the notebook is moved.
            • Re: (Score:3, Insightful)

              Just tell me this: How is an average user without a DVD/CD drive going to install an OS? Even I have problems with this, and I am pretty experienced.
              (Booting from an USB stick never quite worked. Also I already need the one that I have, as a keyfile storage.)

              • Re: (Score:3, Informative)

                Apple's solution was to enable Remote DVD sharing, so that the "BIOS" (EFI) of the disc-less MacBook Air can install its OS from scratch via the DVD drive of another computer on the local network.

                But yes, a generic PC would have a problem installing Windows without a local DVD drive, because generic PCs have a completely retarded, ancient BIOS firmware that rarely offers any functional network boot support, and Windows makes 70's-era assumptions about what CPM drive letters it is installing on.

                  • by DECS (891519) on Tuesday May 12 2009, @03:14PM (#27927265) Homepage Journal

                    No you're thinking of the Zune.

                    The MacBook Air is very popular, even though it costs a lot. People pay extra for "cool, sexy" Mac products (those are Microsoft's words used in its advertising about how cheap low end generic PCs are).

                    Actually I'm surprised by how many starving student types I see with an Air. I decided against buying one (which would have come in handy while traveling), but apparently the cool kids buy what they like, not what they "can afford."

                    They also buy expensive skinny jeans and $400 iPod touches and other stuff that Microsoft billionaires don't seem to think that they will. Of course, there are people who like to "save money," who go out and buy $700 PCs and then spend thousands of dollars putting GPU cards in them every six months to play the latest PC game.

                    And then there are those guys who saved money buying the Xbox 360 because it was so much cheaper than the PS3, except that it was only cheaper because it left off a lot of things like wireless and a hard drive. Plus they got a great deal on HD-DVD! And they ended up saving 80% on the Zune after it tanked and Microsoft dumped the extras on the market in a fire sale.

                    Microsoft is all about saving money! Except for the whole thing about Vista costing more than XP, and introducing a whole bunch of new licensing levels to force generic PC users to pay for features through software upgrades that "unlock" features for hundreds of dollars.

                    But yeah, your joke about there being two Zunes was funny stuff man, we should get together and play Halo in your mom's basement.

        • by Ash-Fox (726320) on Tuesday May 12 2009, @05:58AM (#27919749) Homepage

          Alas, as when Apple stopped putting floppy drives in Macs, others followed.

          Not really, PCs had disk drives for many more years. It was only when DVD writers became standards did it stop appearing in models.

          Also, what other PC manufacturers even use PPC?

          • Re: (Score:3, Insightful)

            by Anonymous Coward

            The Rewritable CD drive is not what killed off the floppy. The USB stick did.

          • Re: (Score:3, Informative)

            Not really, PCs had disk drives for many more years. It was only when DVD writers became standards did it stop appearing in models.

            I would argue that when USB flash drives became cheap is when floppy drives became discontinued. By the way, many MB manufacturers and PC makers still include PS/2 connections when most keyboards and mice are USB these days. Backwards compatibility is hard to break even when the technology is obsolete.

        • They refused to provide custom chips without large binding orders. They were willing to provide Apple with chips just not à la carte.

      • Re: (Score:3, Insightful)

        I'm sure it won't.

        I tried upgrading to Leopard on my G4 iBook. Tried it for a couple months, then downgraded back to Tiger.

        Some of the UI decisions they made in Leopard, like folders in the Dock that display as all of their contents stacked in a pile instead of a folder icon, were completely brain-dead. There was enough public outcry (and third-party workarounds) that Apple added options to fix the behavior in newer versions, but they still go with the stupid options by default. Did they forget to do usa

  • Spread your tiny wings and fly away,
    And take the snow back with you
    Where it came from on that day.
    The one I love forever is untrue,
    And if I could you know that I would
    Fly away with you.

    In a world of good and bad, light and dark, black and white, it remains very hopeful that Apple still sees itself as a beacon of purity. It pushes them to do good things to reinforce their own self-image.

    I can't wait to try this latest OS!

  • by BlueScreenOfTOM (939766) on Tuesday May 12 2009, @06:20AM (#27919871)
    Alright guys, I know the advantages (and challenges) of multi-threading. With almost all new processors coming with > 1 core, I can tell there's now a huge desire to start making apps that can take advantage of all cores. But my question is why? One thing I love about my quad-core Q6600 is the fact that I can be doing so many things at once. I can be streaming HD video to my TV while simultaneously playing DOOM, for example. However, when I fire up a multithreaded app that takes all 4 of my cores and I start doing something heavy, like video encoding for example, everything tends to slow down like it did back when I only had one core to play with. Yeah, my encoding gets done a lot faster, but honestly I'd rather it take longer than make my computer difficult to use for any period of time...

    I realize I can throttle the video encoding to a single core, but I'm just using that as an example... if all apps start using all cores, aren't we right back where we started, just going a little faster? I love being able to do so much at once...
    • by jedidiah (1196) on Tuesday May 12 2009, @07:23AM (#27920275) Homepage

      Yup. If applications start getting to good at being able to "use the whole machine"
      again then that's exactly what they will try to do. The fact that they really can't
      is a really nice "release valve" at this point. As an end user managing load on my
      box I actually like it better when an app is limited to only 100% cpu.
      (IOW, one core)

      • Re: (Score:3, Insightful)

        That only works because you have few cores.

        Once we get to the point where a consumer desktop has 32 cores, you're not going to be able to use even half of that CPU by running independent tasks simultaneously. You'll need to have apps that can take advantage of many cores. The more cores you have, the more power a single core application fails to take advantage of.

    • You ought to be able to set your program to only run on certain processors. I know Windows has this feature (set affinity in task manager) so I assume Linux/Mac does as well.

      I'd recommend putting heavy tasks on your last core or two, and anything you particularly care about on the second core - leave the first for the kernel/etc.

    • Re: (Score:3, Informative)

      One area: Graphics rendering. And I'm not talking about games, but Lightwave et al. especially when one is rendering a single very large image (say billboard). Currently most renders allow splitting of that frame across several machines/core where each one renders a smaller block and then reassembles the larger image. However, not all the rendering engines out there allow the splitting of a single frame. Also, if the render farm is currently being tasked for another project (animation) and you need to

    • Re: (Score:3, Interesting)

      Applications shouldn't be concerned with limiting themselves so that they cannot under any circumstances slow down other applications. It's the job of the OS to provide the tools to prioritize applications according to the desires of the user.

      OS X, by virtue of its Unix underpinnings, should support nice/renice to alter the priorities of processes. One would hope that with additional support for developers to make use of multiple cores, Apple would also provide users with increased ability to easily alter t

  • by Anonymous Coward on Tuesday May 12 2009, @06:44AM (#27920019)

    I always read it as "Slow Leopard"

  • My biggest problem with this upgrade is that it seems more like a Windows Service Pack than a true Mac OS X upgrade. Are we going to have to pay for "new APIs" and "multi-core processing"?

    How does all this help the average user (i.e. my Mom)? WooHoo! They are building a YouTube app and you can record directly off the screen! Big whoop. You can do that today without too much trouble with third party applications. Is the Mac OS X user interface and built-in apps already so perfect that they can't find things to improve?

    I'm usually a pretty big Mac fan-boy but I just can't seem to get excited about this one. Hell, I'm even thinking (seriously) about ditching my iPhone and getting a Palm Pre. sigh...how the world is changing. Has Apple lost it's Mojo?

    • Cleanup (Score:5, Interesting)

      by copponex (13876) on Tuesday May 12 2009, @10:46AM (#27922937) Homepage

      From what I've read, they are cleaning up the code and optimizing it for the Intel platform. Supposedly it will take up less hard drive space and memory, but I'll believe that when I see it. Even if they fail, I'm glad they attempted this cleanup, even if it just inspires Microsoft to do some similar scrubbing with Windows 8. It's about time someone stopped and said, "Hey, instead of shiny feature 837, can we make sure that our web browser isn't leaking memory like a paper boat?"

      It's not really for your mom - it's so she doesn't call you as often.

      I'm usually a pretty big Mac fan-boy but I just can't seem to get excited about this one. Hell, I'm even thinking (seriously) about ditching my iPhone and getting a Palm Pre. sigh...how the world is changing. Has Apple lost it's Mojo?

      I had the same thought. Apple is getting too greedy with their hardware prices, and they continue to screw customers over with their overpriced parts for repair. Plus, the computer world is changing, and they don't seem to understand what's happening.

      Try remotely controlling a Mac with VNC over a cellular broadband connection. It's like sucking a watermelon through a straw. Try creating a virtual network of virtual machines for testing before deployment, which is illegal under Apple's TOS except for their server software. You'll be dragging your toaster into the bathtub by the end of the day.

      Netbooks are evidence that people want computers for convenient access to information, usually located on the internet, and to have something to sync their iPod to. I'm not sure how much longer Apple can charge twice what their competitors are charging and get away with it. And they still have no chance of entering the enterprise market with their hardware costs and licensing restrictions.

      I'm due for a laptop upgrade, and given the choice of a Dell Precision, RGBLED screen, and a dock that supports legacy ports and dual 30" displays, or a slower MacBook Pro with a crappier display for the same price, they're really making the decision for me. I'll continue recommending Macs for friends and family that may call me with technical questions, but if Windows 7 offers the same kind of robustness for half the price, what's the point?

      • Re: (Score:3, Informative)

        Supposedly it will take up less hard drive space and memory, but I'll believe that when I see it.

        I think it's safe to believe the part about less hard drive space, because Apple will save a lot of space with a very simple method. According to AppleInsider [appleinsider.com], Snow Leopard will trim the standard install size by "several gigabytes" (4GB according to Ars Technica [arstechnica.com]) by only installing printer drivers for currently connected printers. Drivers for newly attached printers will install over the network and Software Update, so this works best with an always-on connection.

        Personally, I'm blown away by the fact tha

    • by yabos (719499) on Tuesday May 12 2009, @12:06PM (#27924113)
      Your mom will upgrade when new software requires Snow Leopard. Mac developers are pretty quick to adopt new APIs since they are usually making things really easy to do compared to the previous OS(such as Core Animation, Core Audio/Video etc.)
        • Re: (Score:3, Informative)

          Erm, so what is this Windows XP installation that I have been using since XP Service Pack 1 that I have *incrementally upgraded* through to Service Pack 3 with all the additional Microsoft updates then?

          Apple does "updates" as well.

          You can't deny that the move from XP to Vista is a big one. SP1 to SP2 may have affected some business users or home power users, but most users didn't really notice a difference... the overall XP experience was mostly unchanged. SP3 was even more slight. Apple updates tend to add marketable features. For instance, Leopard added Time Machine and Spaces along with the service-pack style under-the-hood stuff.

          but I wish you Apple fanbois would occasionally go read a technical book or something so that you can at least have some degree of intelligent conversation with those of us who do.

          Considering that I run XP, Ubuntu, and Apple stuff I think you might be b

            • by Homer1946 (1160395) on Tuesday May 12 2009, @12:29PM (#27924491)

              My impression of most Apple users is that they want not to use Microsoft products and do hide inside an elitist little club where there is no need for most of them to be concerned about technical issues. That's fine if that is what they want but those same people should not try to argue with people who do know what they are talking about when it comes to OSes - at least, in my case, when it comes to UNIX, Linux or Windows.

              Most Apple people I know are very knowledgeable about other operating systems and make informed choices to use Macs. What does drive us nuts are those who criticize our choices but also freely admit...

              I don't use Apple.

              and

              I know nothing about OSX.

          • Re: (Score:3, Informative)

            Version 7.2 - download it, it's free from evil Apple, and even works with 10.4 - and it's been available for almost 2 years now

            Oh, and it looks like PRO is gone with Snow Leopard - more for you to whine about.

    • by Anonymous Coward on Tuesday May 12 2009, @04:45AM (#27919407)

      Perhaps the editor doesn't know how to edit?

      Oh wait, kdawson, never mind.

    • by Fex303 (557896) on Tuesday May 12 2009, @04:51AM (#27919427)

      Why... is there... there so much... punctionations in the summary?

      Because the summary is directly quoting the article and using ellipses [wikipedia.org] to indicate that certain party of the quotation have been omitted. Usually there would be a space on either side of the ellipsis when this was done, but this is /. so I'll let this one slide.

    • by noundi (1044080) on Tuesday May 12 2009, @05:04AM (#27919483)
      Because it's a qoute. You see there are rules to any language and one of them in the English language is regarding quoting. When you quote a source the text written must be matching every word of the source. When the quote contains unnecessary text to the topic at hand you cut out that part and replace it with three periods. This indicates that there's a piece missing from the original quote, in case e.g. someone is questioning the quote at hand. So you see quoting is not interpreting, and must be, at all times, matching every word of the source.

      Turn to side B for the next lesson.
      • Re: (Score:2, Offtopic)

        Slashdot is kind of an in-between case, though; when the editors post a story by submitters, it's sort of formatted as if they're "quoting" the submitters, but it's not quite like quoting a book or speech or something. It's expected that when submitting a piece to a site with editors (assume for the sake of argument we can call Slashdot editors that), that your text might be, well, edited before publication. The Economist, for example, edits letters to the editor before publication for style and brevity, wi