Slashdot Mirror


Why Apple Went 64-Bit With the iPhone 5s

Hugh Pickens DOT Com writes "Adrian Kingsley-Hughes says it's not just because Apple likes bragging about being first and because a 64-bit processor sounds cooler than 32-bits that Apple used the 64-bit A7 chip in the new iPhone 5s. A shift from a 32-bit processor to a 64-bit part paves the way for iPhones to be fitted out with 4GB+ of RAM down the line, but more importantly the move brings iOS and OS X apps much closer. The architecture for 64-bit apps on iOS will be almost identical to the architecture for OS X apps, making it easy to create a common code base that runs in both operating systems. 'Apple has slowly been bringing iOS-like features to Mac OS for years now: think of Launchpad and Gatekeeper,' writes Sascha Segan. 'The ultimate prize, of course, would be to bring the million-plus iOS apps to Macs. Apple could do that with an ARM-compatible virtual machine on Mac hardware, but it would want the VM, the OS and the associated apps to play nicely in the much larger memory space available on Macs. That means moving the whole system over to 64 bit.' By unifying iOS and Mac OS with Xcode developer tools in a 64-bit space, Apple could once again leap ahead of Microsoft and Google, says Segan. Microsoft hasn't yet been able to leverage its desktop strengths to achieve success as a mobile OS. The 64-bit chips for Android devices aren't ready, and neither is Android itself."

40 of 512 comments (clear)

  1. Debian by kthreadd · · Score: 4, Insightful

    If it's such a big deal in order to get the same software to run on both systems then how does the Debian project manage to bring 37 000 packages to all eight architectures that it's currently running on? Magic?

    1. Re:Debian by dkleinsc · · Score: 3, Insightful

      If I had to guess, a large number of people put in a large amount of effort. A really fine cross-compiler probably helps immensely.

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
    2. Re:Debian by Morpf · · Score: 3, Insightful

      Well, if I would interpolate from the code I saw in open source projects to closed source projects, being closed source because of bad code... oh boy.

      I am always fascinated of our software driven society still working, despite our often really bad, ugly, bug ridden, ill-documented codes.

    3. Re:Debian by smittyoneeach · · Score: 5, Funny

      I tell people that admitting to knowledge of VBA is like confessing expertise in box wines.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    4. Re:Debian by CastrTroy · · Score: 3, Interesting

      I code in VB.Net as my day job, and I have to say, I don't mind the verbosity one bit. End If is a lot more self explanitory that "}". Who knows if you're ending an "if", a function, a class, or some other construct. Next i lets you know what you are at the end of without scrolling up to see what's above it. I will never get why people want programming languages to be so terse. Given the choice between extremely verbose, like VB or even Cobol, and extremely terse like Perl or J, I would choose more verbose. Sadly though, it autocorrects "Wend" to "End While" At least let me shorten things a little.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  2. Comment removed by account_deleted · · Score: 4, Interesting

    Comment removed based on user account deletion

  3. No. by symbolset · · Score: 4, Insightful

    If they wanted they could just throw their ARM chip into the Mac. Cross platform both ways. The reason why Apple went 64bit ARM is: it was time.

    --
    Help stamp out iliturcy.
    1. Re:No. by AmiMoJo · · Score: 4, Interesting

      It's more like they didn't have much else for the iPhone 5S, just the fingerprint sensor. Everything else is either the same or a slight improvement, like the camera.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    2. Re:No. by Savage-Rabbit · · Score: 4, Insightful

      It's more like they didn't have much else for the iPhone 5S, just the fingerprint sensor. Everything else is either the same or a slight improvement, like the camera.

      Really? I could say the same about the last two iterations of a whole gaggle of Android devices. Is the point you are trying to make that that we have reached 'Peak Smartphone'? If that is the case the obvious follow up question is: Did that just dawn on you? (because the rest of us have known this for a while now)

      --
      Only to idiots, are orders laws.
      -- Henning von Tresckow
  4. Moronic by AmiMoJo · · Score: 3, Insightful

    4GB RAM? Current iPhones have 1GB, and since they don't have real multitasking there is little need for 4GB+.

    As for bringing OS X and iOS closer, clearly this guy doesn't understand what a compiler does or why the difference between 32 and 64 bit is irrelevant for porting 99.9% of apps.

    --
    const int one = 65536; (Silvermoon, Texture.cs)
    SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    1. Re:Moronic by phantomfive · · Score: 5, Informative

      He doesn't understand. Here's a picture and bio of the guy who wrote the article. He's mainly focused on hardware, as in books about assembling PCs from parts, so it looks like his career path was PC-repair-guy-to-author. He's obviously never written any substantial cross-platform software. He was looking through new iPhone documentation (which is right here), and he saw a line that mentions it's easy to write code that is shared on iOS and OSX. He thought that was something new, he didn't realize that it's already easy, and has nothing to do with 64bit.

      --
      "First they came for the slanderers and i said nothing."
  5. Re:Android is finished. by kthreadd · · Score: 4, Informative

    I forget how many cat versions Apple used to say was finally ready for 64 bit. I think it started in 10.2, 10.3 definitly had it. But Cocoa didn't go 64 bit until 10.5 and the kernel was still 32 bit until 10.7. So I don't know about this "designed from the ground up", more like "bolted on in the last minute."

  6. Re:64-bit BS by sribe · · Score: 3, Insightful

    Phones are not going to have more than 4GB or RAM any time soon.

    Right, because they don't already have 2GB.

    64-bit is Marketing BS at this point.

    Right, because there are no algorithms, none whatsoever, not mmapped in-memory databases, not modern runtimes, which benefit from having a large address space that will not be exhausted by fragmentation. Yep, none at all.

  7. Re:RISC (iPhone) vs. CISC (OSX) by myurr · · Score: 5, Interesting

    Several journalists have made this mistake, such as the drivel posted here: Trusted Reviews

    They seem to think that the register size being equal means that software written for them is somehow much more similar. In reality the CPUs and the software they run are no closer to each other than before. The main benefit of this move to the latest ARM CPU design is ironically much the same as the advantage brought by x86_64 - more registers are now available and some floating point operations are more efficient. This will translate into a small performance increase but it won't be night and day.

  8. Re:Android is finished. by AmiMoJo · · Score: 4, Informative

    Android is ready for x64, TFA doesn't have a clue. It's just a recompile away. In fact, because most Android apps are written in Java they will take advantage of 64 bit CPUs without even a recompile.

    --
    const int one = 65536; (Silvermoon, Texture.cs)
    SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
  9. Re:Bring the million-plus iOS apps to Macs... by mspohr · · Score: 4, Funny

    I don't want a fart app for my desktop.

    --
    I don't read your sig. Why are you reading mine?
  10. Re:64-bit BS by Xicor · · Score: 3, Informative

    the ubuntu edge was going to have 4gb of ram, but it only got 13 million out of the 32million funding goal

  11. It's about jailbreaking. by Anonymous Coward · · Score: 5, Interesting

    Apple's move to the 64-bit ARM platform isn't about compatibility with OSX, support for over 4G of ram (per process, the 32-bit ARM processor can handle 1TB of RAM already) or for performance reasons (the additional memory load will almost undoubtedly overpower the slight increases in the 64-bit ARM processing improvements).

    If you read through ARM's announcement of it's 64-bit platform a large portion of it is dedicated to the new security layer allowing for better segmentation between applications and a more in-depth security layer in between the segments. This will allow Apple to sit a hypervisor below the kernel and protect the system from "attacks" and if we can get through the hypervisor there is an additional ARM security layer before you can run in the top processor privilege layer.

    64-bit ARM isn't about anything other than preventing jailbreaking.

  12. Re:Planned obsolescence by zidium · · Score: 3, Insightful

    The same way Windows 7 x64 made all Windows 7 installations and 32-bit programs worthless, huh?

    Oh...wait...

    --
    Slashdot Valentines Beta Massacre: iT WORKED! The boycotts killed Beta!!
  13. 32bit ARM - 1024GB RAM with LPAE by viperidaenz · · Score: 4, Informative

    Cortex A15 has 40 bit addressing and can access 1TB of physical RAM.

    The 32 bit limit is per process.

  14. More intriguing possibility by Anubis+IV · · Score: 3, Interesting

    This analysis of the switch presented a more intriguing idea than the one proferred here. They suggested that the switch to 64-bit is a case of Apple laying the groundwork for later devices. Specially, their thesis is that because it's ridiculous that a phone will need 4GB+ of RAM anytime soon, the chip has actually been designed with a different product in mind, such as Apple's rumored TV product. The thinking is that something designed to be on more even ground with the likes of the PS4 or Xbox One will need to match the 8GB of RAM that each of them has, and with Apple adding game controller libraries to both iOS 7 and OS X 10.9, it looks like they're paving the way for an entry into that field, perhaps with a new class of more powerful iOS devices that use your TV as a screen and run apps from the AppStore.

  15. Re: 64-bit BS by jedidiah · · Score: 5, Insightful

    I did. The whole thing is nonsense. You don't have to enforce a single architecture to have common code. Neither do you need to have a virtual machine running the same bit-ness as the host operating system. This is just the usual kind of cluelessness that comes from a community that is proud of being stupid.

    Yeah. 64-bit BS.

    --
    A Pirate and a Puritan look the same on a balance sheet.
  16. Re:app store lockin on top of high cost hardware w by BasilBrush · · Score: 4, Interesting

    You're not important enough to add to this list.

    http://www.macobserver.com/tmo/death_knell

  17. Re:Android is finished. by Anonymous Coward · · Score: 3, Interesting

    Android is ready for x64, TFA doesn't have a clue. It's just a recompile away. In fact, because most Android apps are written in Java they will take advantage of 64 bit CPUs without even a recompile.

    And apparently it isn't just a recompile away on iOS. For anyone who didn't watch the iPhone 5S announcement, one of the big things they mentioned during the presentation was "how easy it was" to enable an app for 64-bit: it took them "only two hours" to port an existing app to 64-bit!

    Uh, what?! It takes me "changing a compiler switch" to do that for everything I've ever written. I can't wait to find out how Apple managed to fuck that up with iOS 7!

  18. Re:Planned obsolescence by whisper_jeff · · Score: 4, Funny

    You're right. They shouldn't have done anything to move their hardware forward. They should have just released the exact same device they did last year to ensure nothing ever became obsolete.

    And, by "you're right", I of course mean "you're a moron."

    Mod away.

  19. Re:RISC (iPhone) vs. CISC (OSX) by jedidiah · · Score: 4, Insightful

    You're funny.

    Are you seriously suggesting that Apple migrates their desktop machines to hardware that's about 10 years behind the curve in terms of performance when compared to x86?

    Stop swimming in the kool-aid.

    --
    A Pirate and a Puritan look the same on a balance sheet.
  20. Re: 64-bit BS by MightyYar · · Score: 5, Informative

    You are absolutely right. The whole summary doesn't make any sense at all... first of all, the Macs run 32-bit applications just fine. Second, if you can emulate a 64-bit ARM, you can emulate a 32-bit ARM. Third, phone apps would suck on a laptop or desktop.

    I suspect they went to 64-bit for the simple reason that it is the direction ARM is going. This processor design is likely to show up in their lower-end products for years after it leaves their flagship device, and the sooner they go to 64-bit, the sooner they can depreciate the 32-bit stuff. Unless the 64-bit chip cost significantly more to design, produce, or unless it has a significant performance penalty, there is no reason to delay making it.

    --
    W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
  21. Re: 64-bit BS by petteyg359 · · Score: 4, Funny

    There is a depressing depreciation in total knowledge of the word "deprecation".

  22. Re: 64-bit BS by UnknowingFool · · Score: 3, Insightful

    You don't have to enforce a single architecture to have common code.

    But it makes it easier. In this case Apple will have 64-bit ARM and 64-bit Intel to maintain instead of 32-bit ARM and 64-bit Intel. I think there's a longer term strategy here. I'm not sure what it is.

    --
    Well, there's spam egg sausage and spam, that's not got much spam in it.
  23. 64-bit is simply next evolution of embedded chips by JoeyRox · · Score: 3, Informative

    There's no grand scheme or plan for 64-bits vs 32-bits. They went 64-bits simply because it's the next evolution of chip design. 64-bit processing doesn't strike at a a need today but eventually it will be beneficial and even necessary so if you're going to spend millions on an ARM design you might as well make it 64-bits.

  24. Re:64-bit BS by newcastlejon · · Score: 5, Funny

    Seriously, has no one here heard of Physical Address Extension?

    Yes. Let us never speak of it again.

    --
    If God forks the Universe every time you roll a die, he'd better have a damned good memory.
  25. Re:64-bit BS by sribe · · Score: 4, Informative

    Parent wasnt making an absolute statement, he was (correctly) stating that 64-bit will have almost no benefit on a cellphone for a very long time;

    That statement is unequivocally wrong. It will have a benefit very soon. It is exactly what I have been waiting for, and I know other developers in the same position. I was hoping for it in 2014, getting it a year early is incredibly sweet.

    ...and that the author of the article has no idea what they're talking about (since ARM being 64-bit has no relevance to compatibility with a 64-bit Intel processor.

    But that's not what the article said. It talked about using the "same codebase", meaning same source code, and thought it didn't state it explicitly, it sure sounded like he was implying same backend data-handling code, not UI. And yes, this is important. If you use algorithms that need a large virtual space on OS X, and you have to completely back off that and use something else on iOS, what a pain--oh, and in some cases, the iOS version is lower-performance as well because of that change. And that sucks. Having to go to lower-performance algorithms on a mobile platform is a double hit to performance.

    But hey, if you don't actually have a clue of all the things a 64-bit address space enables, then the above will sound like gibberish...

  26. Re:Android is finished. by UnknowingFool · · Score: 4, Informative

    Android could be 64 bit. Right now the hardware is not. It will take some coordination between Google and the OEMs to make it 64-bit. An obstacle is that the chipmakers haven't released a 64-bit ARM chip yet. Most likely it will be based on the Cortex 50 series.

    --
    Well, there's spam egg sausage and spam, that's not got much spam in it.
  27. Re:Bring the million-plus iOS apps to Macs... by im_thatoneguy · · Score: 4, Informative

    Yeah I'm a little confused by this statement:

    Apple could once again leap ahead of Microsoft and Google, says Segan. Microsoft hasn't yet been able to leverage its desktop strengths to achieve success as a mobile OS.

    If anyone is well positioned for apps to run on both operating systems it's... Microsoft. They have one kernel running on phones and tablets and laptops. They also haven't arbitrarily delineated PCs and Tablets like OSX has.

    You literally already can run an x86 or metro app on most windows 8 tablets. And with Metro almost all of the apps already run on ARM and x86-64. Not to mention Windows 8.1 works really well on my tablet and my home desktop. My work machine hasn't been upgraded yet but I just saw that MacDrive now supports Windows 8 so I think it's safe.

    When OSX attempts to bridge the gulf between OSX and iOS it's going to run into the exact same challenge that Microsoft has in Windows 8. And like Windows 8 it'll have teething issues. The difference is that Windows has already been at it for over 2 years and it already has a 64 bit ready tablet OS with proven multi-tasking etc. I don't see how Apple is any kind of position to leapfrog Microsoft in development since Microsoft is *already there*.

    Google is also well positioned with existing products that allow you to run Google Apps on x86 windows tablets. Intel is also investing a lot of money to port Android over to x86 natively for their phone x86 chips. So while a little behind Microsoft in porting their OS to a desktop environment between Intel's efforts and the Transformer book (which is very much like a desktop/laptop experience) Android could very easily cross over.

    Apple could feasibly leapfrog Android if they doubled down on enabling keyboard/mouse input and OSX runtime but they can't by any definition leapfrog Microsoft which has already finished the transition.

  28. Advantages and Disadvantages of 64-bit code by AaronW · · Score: 3, Interesting

    There are advantages and disadvantages of 64-bit mode. In the case of ARM, having double the number of registers should add a noticeable improvement. The main disadvantage of using a 64-bit ABI is that now pointers consume twice as much memory and in the case of RISC processors, loading 64-bit constants into registers can take more instructions. There is ongoing work with ARM to provide a 32-bit ABI using the 64-bit mode, much like how MIPS has the N32 and N64 ABIs (most of my experience is with 64-bit MIPS but much of it applies to ARM). In the case of ARM, having twice the number of registers should make a noticeable improvement since unlike X86 most instructions don't operate on memory locations directly except via load/store.

    One weakness of 64-bit ARM is the instruction set is very new and the tools are still maturing. It was not necessarily the best thought out instruction set either and the instruction binary encoding is overly complex, making a lot more work for the toolchain developers. The difference between ARM 32 and ARM 64 is far greater than the difference between X86 and X86_64.

    --
    This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
  29. A7 technology more for iPad? by MtViewGuy · · Score: 3, Interesting

    I think the A7 SoC (system on a chip) may be more intended for the iPad than the iPhone. 64-bit memory may make it possible for iPads with as much as 4 GB of RAM, which may become important as iOS apps become more and more sophisticated in future years.

  30. Re: 64-bit BS by samkass · · Score: 4, Informative

    The article is BS, because it assumes there are no legit technical reasons to go to ARM's 64-bit standard. To name a few:
    1. Twice as many general purpose registers
    2. Twice as wide general purpose registers (so 4x the number of bytes in the register file)
    3. Twice as many SIMD registers
    4. Double-precision SIMD
    5. On-chip encryption
    6. Sparse address space for security
    7. Memory mapping huge files (49-bit virtual address space)
    8. A64 cleaned up the old instruction set quite a bit

    And yes, tablets will probably have 8GB of RAM in the next couple of years. The XBox One and PS4 will both have 8GB, and Apple is rumored to be gunning for the living room soon as well, so putting this in the 5s gives them economies of scale before they even release a product.

    Besides, the iPhone Simulator has always run on the Mac in x86, so most iPhone software has already shown a high degree of Mac interoperability. In short, having the bittedness in common with the Mac is probably way, way down the list for why they went 64-bit so early.

    --
    E pluribus unum
  31. Re: 64-bit BS by Tough+Love · · Score: 4, Interesting

    Your washing machine doesn't even need a 32-bit processor.

    You would be surprised The question is, do you want to put up with 8051 weirdo nastiness or a nice clean arm design. The original 8051 was about 30K transistors, so was the ARM 2. Which would you rather program?

    Since those days, transistor density increased more than a factor of a thousand, essentially wiping out the cost advantage of 8 and 16 bit processors, they all cost less than a buck. And see this coherent argument for why a 32 bit arm may be more efficient than an 8 bit 8051 variant: it takes way fewer cycles to get things done.

    Finally, there is productivity. Quick to market counts for a lot, and low engineering costs means shorter, more agressive product cycles. The modern manufacturer just can't afford to have expensive engineers futzing around with processor limitations.

    I don't know about you, but my new LG washing machine seems to put a lot of thought into what it's doing in order to get the clothes clean using the least amount of power and water, with dozens of different options. They probably saved some parts cost by implementing the motor controller in software. I would not be surprised at all to learn that they spent a buck to put a 32 bit arm core in it. My next washing machine will be on my home network and when it's done it will notify my cell phone. Probably running Linux.

    --
    When all you have is a hammer, every problem starts to look like a thumb.
  32. idiot by Tom · · Score: 3, Informative

    Author is an idiot.

    'The ultimate prize, of course, would be to bring the million-plus iOS apps to Macs.

    Which is what will definitely not happen, because Apple is about the only company on this planet that really understands that mobile and desktop are two different animals, with different needs and patterns of interaction.

    Microsoft's "surface" isn't a fail because the hardware sucks, you know?

    The ultimate prize is that developers will have an easier time writing stuff for both iOS and OS X, because they can share the backend code between the two and only have to write a new frontend.

    That way, instead of getting a million crap apps that work badly on OS X, you will get a few thousand quality apps with a true OS X interface.

    --
    Assorted stuff I do sometimes: Lemuria.org
  33. Re:RISC (iPhone) vs. CISC (OSX) by TheRaven64 · · Score: 3, Interesting
    Very little iOS software is written in assembly. It's mostly written in Objective-C, with some C and C++. From the perspective of these languages, architecture differences are:
    • Size of various primitive types.
    • Alignment of primitive types.
    • Endian.
    • Ability to do unaligned loads and stores.

    Between x86-32 and ARMv7, these are all the same (well, the cost of unaligned loads and stores is more on ARM). Between x86-64 and ARMv8, they are the same. This also means that you can trivially share memory-mapped data between the two. If you were to ship a laptop with some ARMv8 cores and some x86-64 cores on cache-coherent memory interface, then you could trivially translate system calls made on the ARM chip into system calls delivered to the x86-64 operating system - you'd need to tweak the call frame, but any of the data passed by pointer would be readable by the kernel (actually, this doesn't necessarily require cache coherency, as the OS X kernel always explicitly copies data in and out via some well-defined code paths). You could also use shared memory and Mach ports to communicate between the application and the window server.

    In fact, given the comparatively stateless nature of the OS X window server, it would be conceivable to have the ability to dynamically switch between a window server running on the ARM core (when in low-power mode, checking email or whatever) or the x86 core (when doing real work).

    --
    I am TheRaven on Soylent News