Apple and x86 Questions, Part 1
I've been chewing my way through your x86 questions (there are a few pages of them), and as we learned in Under the Iron, ask me a question and you can kill an afternoon. Yes, it's that way in real life, too. So I'm going to break them up, in order of the ones that help kill off others.
For warning, I have a habit of lumping things together when it's just easier that way, so 'x86' will be used to denote the instruction sets that make up, well, x86 chips, and IA-32 and the 64-bit extensions added on will be broken out only when necessary.
First of all, thanks for your great blog. After someone pointed it out to me last year, it quickly went from being one I sometimes read, to one where I read all the articles posted. :-)Quick question when you're looking into the whole Intel situation: will Classic be supported? In my (cursory) reading of various information, no one seems to have addressed this. On current Macs, I can still run both OS 9 and even _68k_ binaries (from they System 7 or maybe even 6 era).
Will one or both of these abilities be removed? I certainly hope not (it comes in useful sometimes). Beyond this, I personally don't care what processor a computer is using. I just don't want to lose functionality.
Jolin M. W.
Classic appears to be dead on x86 hardware, and already going cold. Apple didn't come out and say it, and people don't really want to confirm it, but you can read between the lines in their documentation. Rosetta just won't be able to handle it, or anything below Mac OS 10.0, and that's the only way you'd end up with bits of PowerPC assembly running on x86.
It's going to make things a little interesting as the transition goes on. Personally, I haven't used OS9 nor classic on any of my computers in years, but I know people who do. Just the other day someone I know bought a new book to study for an upcoming test, and the software disc that came with it only ran in Classic which meant I had to get it back on their computer.
I know a lot of schools make heavy use of it, and it's not something I discount as people using Classic are part of the 'long tail' of the userbase. They do add up.
It's a situation where Apple cares very little about people using Classic, and developers at this point don't care about people using Classic at all as they're more interested in the software they have than the software they'll be buying for it. Only users do, because they don't want to lose that investment, or what they want to use isn't available anymore.
Apple only cares because people could well put off sales of newer hardware if they know they'll also be buying new software, but I think they're very much less interested in their traditional base and much more interested in being a Remora on the Windows base.
If running older software is important to you for some reason, you probably won't be running it on an x86 Mac -- except perhaps through a third party emulator -- and should probably plan accordingly.
Something everyone seems to be overlooking: Steve's demo at WWDC Keynote was done on a Pentium-IV. Last time I checked, those are 32-bit chips. Nobody's said anything about any 64-bit "roadmap" (to steal a phrase).'ledge'
People aren't saying much about it because there:
- Isn't that much known, so there's not much to say, and to my knowledge if you have a 64-bit app that you're trying to get working on Apple's preview release for Intel you're banging your head against the wall.
- The answer is probably going to kinda suck, and no one really wants to talk about it right now.
Here's a dirty little secret that surprises more people than it should: Mac OS X is already fairly warped when it comes to 64-bit computing. It works, and it's there if you're willing to jump through a bunch of hoops, but you'd have to be remarkable in your definition of what a 64-bit OS was to give the moniker to OS X as it currently stands.
A quick breakdown:
- On a 32-bit Mac OS X, a process can suck up 3-ish gigabytes of RAM and the entire system can address 4 gigabytes... My understanding is that the limit is more of an artifact of the OS and other things rather than what can be done. There can be ways to fudge around this, but they're enough trouble that people rarely deal with it.
- On a 64-bit Mac OS X, a process can suck up anywhere from 4 gigabytes of RAM to more than 16 million terabytes, otherwise known as 'God's Box'. Apple currently limits their machines to 8 or 16 gigabytes of RAM, something like that, while others that are more high-end can go up to terabytes. All the limits are artificial, because the supporting chips to deal with that much RAM would be... pricey.
(I actually clipped out about a page's worth of text here, as breaking down why theoretically a process can address 4GB on a 32-bit system, but can't in practice is beyond the scope of this so don't get on me about it)
Now, it's worth noting, Mac OS X isn't really a 64-bit OS. The kernel itself, through a type of 3-card monty is able to address bunches of memory so if you stack your shiny PowerMac G5 with eight gigabytes of memory you can fill it up, but you can't launch Photoshop and tell it to use 6 gigabytes of RAM because the majority of the libraries and frameworks and such are not 64-bit.
I've encountered people that bought a PowerMac and threw in four gigabytes of RAM, then realized Photoshop or Final Cut wasn't going to be able to use all their RAM. Then they'll generally rant at Adobe, which is strange as they rarely rant at Apple's app for the same problem... but perhaps I've just been exposed to the wrong people. Anywho, in order for Adobe to be able to address more than 4 gigabytes of RAM in their apps, they would need:
- Apple would need to update their frameworks for GUI apps to be able to be 64-bit. To be fair, Adobe probably has some pretty custom stuff going on and would possibly need to do some tweaking and give it recompile, but most of the onus is on Apple here. Without 64-bit frameworks for Cocoa and Carbon, the onus is on the developer...
- Rearchitecture Photoshop so you have an app running as the GUI and an app running as a Unix app, which would communicate with each other. Since the 'unix' layer is generally 64-bit compliant, it would do all the heavy lifting in its now gargantuan RAM space. Well, I'm pretty sure this was what Apple was recommending developers do originally, although someone the other day told me they're telling people to spin it out as a process or something.
As you can imagine, the above doesn't make sense to the vast majority of developers, and most of the apps that people need that memory for don't support addressing it. If you're starting from scratch, you can pursue it as an option, but thats a pretty small amount of people and having to create your app around limitations in Apple's software that will probably go away as soon as possible seems a little goofy.
Now, Apple's side of the story is that:
- If they made everything 64-bit, things would slow down! You'd use up more memory, more cache, etc. It's a valid point, you certainly wouldn't see performance increase across the board with the PowerPC as you do with x86 (as it got architectural improvements at the same time).
- We updated a few of our libraries to be G5-optimized for an improvement! (You can do 64-bit math on a 32-bit PowerPC, but its slower than having it go native because of 3-card-monty-stuff)
- Well, you still have eight gigabytes of memory, so even though none of your GUI apps can actually use it all, you can run more apps at the same time.
Alright, so the last one is usually how other Mac users try to spin it into a positive when someone gets upset. The only one that has any real validity is [1], and it doesn't have that much validity. Sure, taking a speed hit is real, and using more memory (and hence, cache) is real, but not nearly as bad as some make it out to be on a system like the G5.
And really, not having a fully 64-bit system causes so many problems (in addition to the above) for developers that it just isn't happening. Buying a G5 gets you very little in the way of 64-bit goodness right now, although you do get some goodness from the other enhancements in the G5 for your 32-bit apps and code. And yes, Apple really is behind the curve here, as even Microsoft put out a 64-bit version of Windows awhile ago and Linux has lead the vanguard.
The point is, Apple isn't exactly at the vanguard of 64-bit computing as it is, and that mostly just came along with the MHz bump of the G5 and 64-bit hasn't been all that important. They'll eventually have a fully 64-bit system, probably sooner rather than later, and most developers (even those that really need 64-bit goodness) have chosen to wait for that. When Apple wants to, x86 has it.
AMD was at the vanguard with this with the Opteron (high end workstations and servers that need multiple CPUs), and pushed it into the Athlon (similar to the Opteron, but few hypertransport links). Eventually it'll make it into the Semprons (consumer). Intel has been shipping P4s with 64-bit extensions for awhile, although its been turned off by default for the most part, and will be incorporating it into its 'cooler' chips well within Apple's timetable.
Now, x86's 64-bit solution isn't anywhere near as 'smooth' as the PowerPC's, as the PowerPC really was designed to move to 64-bit as anyone who remembers the original PowerPC roadmap (and the mythical PowerPC 620) can attest to. With x86, its much more 'tacked on' and brings with it some headaches, but they wisely used it as an opportunity to flesh out some of x86's capabilities so its generally well worth a developer's time.
Basically, don't worry about it.
Apple's current support for 64-bit is somewhat weak right now, and few developers are actually jumping through the hoops to use it, and while it's unknown which product lines will first receive Intel chips, just as its unknown whether Apple will be pushing out Mac OS X as a fully 64-bit OS by then, or whether or not they'll be using 64-bit Pentiums when they do ship, but if they want to use 64-bit chips, they should be available across all the products lines Apple would want to use them for.
Now that I've fulfilled my quota for run-on sentences for the day...
I don't understand why Apple felt the need to switch, and wonder what else there is to it. The PowerPC is just hitting its stride, and everyone else is switching to it. XBox, Sony, Nintendo. What about the CELL? That is supposed to have higher FLOPS than any chip now. It doesn't make sense.John W.
In short, the CELL was never a realistic option.
In long...
Technically this is a statement and not a question, but we'll roll with it. I think I covered most of this @ Under the Iron (search for pentium or something), but it's worth catching the end.
This talk about the CELL being an uber-chip is somewhat misguided and on a bad day could be called retarded. I don't blame you, I blame the marketing materials you read and the lack of other things you read that would have corrected what was fed to you by the marketing materials. This stuff becomes so generalized for mass consumption that comparisons become relatively worthless.
An example would be when Jobs was on stage saying that CPUs have hit a wall, but GPUs are just adding speed, so the computer is going to use the GPU more. Now, GPU chips are covered by the same laws of thermodynamics that CPUs are, so your mind should start tripping over that. GPUs are very good at what they do, but very poor at what they're not meant to do. I.E., there was a time when working with 3D meant doing all the stuff on the CPU.
Then hardware accelerators came out, and accelerated specific functions in some 3D APIs. Over time, they added more functions that were accelerated, like specific types of lighting, and people built those into their software. It's no cooincidence that almost every 3D game had a very similar 'look' to it, nor that almost every tree you'd see in a playstation game looked the same.
The heart of these chips is passing pixels through hardwired (and hence, speeded up) functions and spitting them on the screen.
The new 'programmable' GPUs allow a developer to upload a very small custom bit of code that the pixels are run through instead of what is hardwired. For more on this, I'd point you to an older post, but suffice to say a database server they ain't.
Which brings us back around to the CELL. A FLOP is a FLOP until you ask what is flopping, and while I won't beat you over the head with specifics, think of the CELL as a relatively weak PowerPC core (by today's standards) holding together a bunch of Altivec units.
That's bastardized, but you should get the impression: It will be very good at some things, and very weak at others, but it'll be very good in the areas Sony cares about and weak in many of the areas Apple cares about.
The CELL was never a realistic option.
Comments (37)
Posted by: Melkor at June 26, 2005 12:41 AM
Sure, taking a speed hit is real, and using more memory (and hence, cache) is real, but not nearly as bad as some make it out to be on a system like the G5.
Do you have any hard numbers? I recall reading a Slashdot comment by a supposed Apple employee (yes, the infamous "As Seen On TV") to the effect that the performance hits even on a G5 were significant, and that not that many developers would benefit from such a move. I don't have a subscription to Slashdot, so I can't relocate the comment easily through his user page, but care to comment, DB?
Posted by: drunkenbatman at June 26, 2005 12:59 AM
When you say IA-64, are you referring to Intel's ISA that is used on the Itanium, or do you really mean EM64T/x86-64 as it appears on the Pentium D and AMD's chips?
'x86-64'. Sorry about that, my bad. Last night I was going through a bunch of EPIC stuff, actually trying to find a quote from Jobs saying Apple was excited about Itanium and looking to support it with Rhapsody... Must have had it on the brain. :)
I think Intel has pretty much written off IA-64, and HP has announced their intentions to no longer actively develop the ISA,
I wouldn't say it's on life support, but I wouldn't look for it to replace the P4 anytime soon...
Posted by: Anonymous Coward at June 26, 2005 01:06 AM
"Do you have any hard numbers? I recall reading a Slashdot comment by a supposed Apple employee (yes, the infamous "As Seen On TV")"
I've seen him too, I think he is a shill. That is why he never gives hard numbers. Apple is astroturfing slashdot, or slashdot would recieve subpoena for his IP address because if he has really knowledge he would be violating agreements with Apple by saying it.
Posted by: Mac-arena the Bored Zo at June 26, 2005 01:21 AM
- Rearchitecture Photoshop so you have an app running as the GUI and an app running as a Unix app, which would communicate with each other. … Well, I'm pretty sure this was what Apple was recommending developers do originally, although someone the other day told me they're telling people to spin it out as a process or something.
if you have two apps, you have two processes. I wonder, though, if the IPC wouldn't reduce any speed gains from the ability to address all that RAM down to around nil.
Posted by: sift at June 26, 2005 01:28 AM
Good breakdown. Note that on this:
"Well, I'm pretty sure this was what Apple was recommending developers do originally, although someone the other day told me they're telling people to spin it out as a process or something."
That would be difficult, but possible. 32-bit apps and 64-bit apps do not like to communicate well on OS X. You can do it if you are careful about how you transfer the information to and from them, but it is not elegant.
Posted by: Jim Cantrelli at June 26, 2005 02:02 AM
Imagine my surprise: A drunkenblog post I finishing reading in under ten minutes.
We picked up an XServe thinking to use it for a MySQL server. It was a disaster, and would corrupt trying to give it more memory. MySQL support for the G5 and extra memory. It works now and has 6 gigabytes given to it, but something is still wrong because our single P4 whitebox keeps up with the dual G5 Xserve defeating the reason for upgrading.
-Jim
Posted by: brian at June 26, 2005 02:15 AM
Phil Schiller has stated that getting Classic to work on x86 is a 'low priority' [i.e., not happening] Google for the exact quote.
Posted by: Iljitsch van Beijnum at June 26, 2005 04:00 AM
The stuff on Apple's 64-bitness is confusing.
The way I understand it, Linux and Windows take the approach that the whole system is either 32 bit or 64 bit. So you need 64 bit function calls and 64 binaries on a 64 bit system. For Linux this isn't a problem as you compile all your own stuff there. So as long as the right abstractions are used, everything nicely compiles to the same size. For Windows it's more difficult but people are probably only going to use Win64 for servers so you only need a few apps anyway. (And free malware protection until that cruft starts coming in 64 bit variations too.)
Apple on the other hand, wants to maintain a single OS that can run all apps. That means a 64 bit capable system must be able to run 32 bit applications right alongside 64 bit applications. That's exactly what you get on the G5: 32 bit processes are limited to 2 GB (or close) virtual memory, and by extension also to using 2 GB (or close) physical memory. 64 bit processes on the other hand, can use whatever memory you can shoehorn into the system. However, 64 bit processes can only call on the BSD subsystem. So a 64 bit process can't display any graphics on the screen and so on.
Note that most of the time, an application is a process and a (non-system) process is an application. However, if a developer is so inclined, there is nothing stopping her from using more than one process in her application. And that's exactly what Apple wants you to do when you want to take advantage of the 64 bit goodness on the G5: have one process that handles the user interface niceties, which is a 32 bit process, and then use a 64 bit process for the heavy lifting.
For server stuff this is not a problem at all: databases and the like don't even have a GUI most of the time. But I can understand this isn't entirely optimal for an application like Photoshop. I know nothing about that application, but I imagine that it does a lot of complex things with a lot of large image files. A good way to implement such an application in 64 bit Apple-style, would be to have the core processing stuff in one process, and have that process dump anything that should go on the screen in a nice big shared memory buffer (which doesn't incur any speed penalties if done correctly). The 32 bit process then only has to call the relevant OS functions and handle user interactions.
If Adobe is unwilling to do that, it can only mean one thing: that the added benefit of being able to use more memory and 64 bit operations and the subsequent increase in user satisfaction is less than the trouble of updating the application. Since it's a multi-OS app in the first place, it's 95% certain that there is a pretty well-defined distinction between core operations (that would go in the 64 bit process) and UI stuff (that would go in the 32 bit process) anyway so it should be doable, if not easy.
Also, the thing about extra overhead in 64 bits is not just spin. Having the CPU load value 00000001 at address 12345678 is more work than loading value 0001 at address 1234. Now of course when you need to add 456000 to that, you're basically done in 64 bits (or my not entirely correct representation) while with "32 bits" you get to get the second half of the 64 bit value and add the second half of 456000 to it. It's like buying in bulk: it's only cheaper if you're actually going to use all of it before it spoils.
Posted by: Rosyna at June 26, 2005 05:45 AM
Few things. 32-bit processes on OS X are limited to about 3.5gigs of RAM. Not 2. The system reserves some and frameworks reserve some of the 4gigs allocated to each application.
Going 64-bit on PPC has no benefit whatsoever except for the ability to address much more memory in a single process. In fact, it can cause some slowdowns in a general purpose application as it requires that pointers use more memory.
On x64, however, going 64-bit has a huge advantage, not because it runs 64-bit code "faster" or anything. (ie, it has nothing to do with the fact it is 64-bit) but that when you compile as 64-bit you are saying "I don't need backwards compatibility" and you get twice the amount of GPRs and registers for SIMD. Along with a few new instructions. This is where the huge speed boost comes from when you run Windows 64-bit for 64-bit Extended Systems.
And when I'm talking about the amount of memory available to a process, I'm talking logical addressing. Not physical. So if you have a G5 with 16gigs of RAM installed (the max hardware addressable as it is) then 32-bit processes will use as much of the available physical RAM as possible. That's why Virtual Memory is a good thing.
Posted by: mikeash at June 26, 2005 06:01 AM
Your understanding of process memory spaces on Mac OS X is a bit flawed.
"On a 32-bit Mac OS X, a process can suck up 2 gigabytes of RAM and the entire system can address 4 gigabytes..."
A process can address 4GB of RAM on 32-bit Mac OS X. Much of this address space is used up by libraries, and it's often not contiguous, but a bare-bones app that just links against libSystem can usually allocate around 3.5GB of memory. The remaining memory isn't magically out of reach, but rather already in use because of things that get mapped into the process's address space. A full-blown GUI app is likely to have significantly less than 3.5GB of address space free, because it's pulling in many more libraries.
"On a 64-bit Mac OS X, a process can suck up to 4 gigabytes of RAM, and the entire machine could theoretically support over 16 million gigabytes, otherwise known as 'God's Box'."
This is just wrong. 64-bit Mac OS X can support two types of processes, 32-bit processes for compatibility and 64-bit processes. 32-bit processes have the same limitations as on 32-bit Mac OS X, namely that they can address 4GB of RAM and have some of it eaten up by libraries.
64-bit processes, however, get the entire 64-bit address space to play with, meaning that they can address 16 exabytes (which is over 16 billion GB, not 16 million) of memory, even though the machine couldn't possibly hold that much at this point in time; hooray for virtual memory. And just as with 32-bit processes, libraries will eat into how much memory is really addressable, but when you start out with 16 exabytes of it, the amount taken up by libraries can be ignored.
Posted by: drunkenbatman at June 26, 2005 06:22 AM
Few things. 32-bit processes on OS X are limited to about 3.5gigs of RAM. Not 2. The system reserves some and frameworks reserve some of the 4gigs allocated to each application.
Good point, which would explain why a bit of errant C code I hacked went wonky at about 3gigs and not 2gigs. Changed.
Mike >>
Your understanding of process memory spaces on Mac OS X is a bit flawed.
My understanding of just about everything is a bit flawed.
A process can address 4GB of RAM on 32-bit Mac OS X. Much of this address space is used up by libraries, and it's often not contiguous, but a bare-bones app that just links against libSystem can usually allocate around 3.5GB of memory.
In my experience, it's been much, much less even if the limit isn't hardwired to 2 gigs as it is in Windows. Still, you raise a good point, and its been changed. :)
64-bit processes, however, get the entire 64-bit address space to play with, meaning that they can address 16 exabytes (which is over 16 billion GB, not 16 million) of memory
That shouldn't have been in there. Good catch, that.
Posted by: G.P.L. at June 26, 2005 09:18 AM
From your article, it appears your problem is more with Apple marketing than their solution to 64-bit?
Posted by: Finlay at June 26, 2005 09:25 AM
Classic appears to be dead on x86 hardware, and already going cold. Apple didn't come out and say it, and people don't really want to confirm it, but you can read between the lines in their documentation.
You don't really have to read between the lines, it's plainly there for all to see in the Universal Binary Programming Guidelines, which clearly states that Rosetta does not run "Applications built for Mac OS 8 or 9" or "The Classic environment".
Actually, the same page also says Rosetta does not run "Applications that require a G4 or G5 processor", and 64-bit binaries require a G5, so that clearly shows you that Rosetta won't run 64-bit PPC binaries. Whether or not there will be support for native 64-bit Intel binaries is another matter entirely, of course.
The next thing you said is verging on nonsensical:
Rosetta just won't be able to handle it, or anything below Mac OS 10.0, and that's the only way you'd end up with bits of PowerPC assembly running on x86.
At first I thought you meant that Classic was the only way you'd end up with "PowerPC assembly" but that's obviously nonsense, and then it seems that you mean that Rosetta is the only way to run PowerPC binaries on x86. Also, remember that Classic runs 68k binaries too...
Posted by: at June 26, 2005 09:52 AM
At first I thought you meant that Classic was the only way you'd end up with "PowerPC assembly" but that's obviously nonsense, and then it seems that you mean that Rosetta is the only way to run PowerPC binaries on x86. Also, remember that Classic runs 68k binaries too...
I cringed reading that too, I know what he meant, but to a layman it is poorly worded and needlessly confusing. Usually DB's strongsuit! You seemed more out of it than usual in this, get some sleep man!
Posted by: AnglHuntr at June 26, 2005 02:05 PM
If I remember correctly... The Pentium 4 600 series, and Pentium D use the same 64bit tech (EM64T). Meaning, the Developer Systems still should take advantage of 64bit addressing. Similar to a G5.
Posted by: at June 26, 2005 02:13 PM
Iljitsch van Beijnum at June 26, 2005 04:00 AM:
"The way I understand it, Linux and Windows take the approach that the whole system is either 32 bit or 64 bit."
That is wrong. Both Linux (the kernel supports it, some distros don't) and Windows support 32-bit applications and 64-bit applications running together on the machine. In fact, both can have graphical 64-bit apps running together with graphical 32-bit apps.
The issue is that you need to duplicate all the libraries, which isn't that bad since hard drive space is basically free these days. Nobody cares about a few hundred megs. Apple doesn't have 64-bit graphical libraries, but there's no reason they can't have them in the future just like Linux and Windows do. They probably will. Even on x86, 64-bitness isn't an unmitigated win, it's still significantly slower at a lot of things.
OSes like Solaris still support 32-bit binaries even though their entire hardware lineup has been 64-bit for a long time. Large chunks of the base system remain 32-bit. I expect to see 32-bit apps supported on all major OSes in perpetuity.
Posted by: FZ at June 26, 2005 02:26 PM
The Apple 64-bit situation is a bit weird indeed.
On 64-bit Windows:
- The OS is 64 bit and needs a 64-bit CPU to run.
- Device drivers are 64 bit. They're coming, albeit slowly. The usual ones you get on the CD with your webcam don't work. That's one of the reasons why MS isn't agressively pushing it - yet.
- 64 bit apps run natively.
- 32 bit apps run in a small emulation layer called WoW - Windows on Windows (similar to what wowexec.exe does now for 16 bit apps in XP). Based on feedback by people I trust seems MS actually got this right, so overhead is almost zero and nullified by the OS actually being faster.
Linux is probably the same minus the emu layer (no big deal when you can just recompile), but don't quote me on that.
All in all it's pretty clean-cut and architecturally sound.
OSX seems like a byzantine mess in comparison: DB, do you think that they'll steer towards a similar model with Leopard or there's something I'm missing about the pros of Apple's way?
Posted by: Dave Schroeder at June 26, 2005 07:27 PM
Folks may be interested in http://appleintelfaq.com/
Posted by: Jon H at June 26, 2005 07:36 PM
I suspect Apple will support customers who need Classic in the same way they supported customers who needed to boot OS versions prior to OS X, when new Macs stopped being able to do that:
They'll keep a single compatible Mac model available (ie, a PPC) for a while, perhaps only in the store for education, well after they've otherwise moved off of PowerPC entirely.
After a year or so, they'll stop selling it.
I wouldn't be surprised if Apple were quietly selling a PowerPC Mac through 2008.
Posted by: BaronVonMunchausen at June 26, 2005 07:56 PM
Bravo on the Cell comment. The cell has been way overblown. It looks like IBM repurposed its failed network processor and named it "cell". I was with Intel when it released spec on its "super duper" network processor (much more powerful than cell), and people's comments were...
We'll never be able to program that thing.
Scheduling threads was a monster for people, and scheduling it so that the code is extensible & able to be programmed by more than one person was nearly impossible. So that would be where I would put my hat on why it was never a serious contender.
I know people will dispute this, so I'll have to explain the above paragraph some more, but believe me, we've had a lot of very smart people look through multiprocessor problems, and it's not pretty.
Posted by: Anthony Roberts at June 26, 2005 09:08 PM
posted button Posted by: FZ at June 26, 2005 02:26 PM
"- Device drivers are 64 bit. They're coming, albeit slowly. The usual ones you get on the CD with your webcam don't work. That's one of the reasons why MS isn't agressively pushing it - yet."
This will be the same on Intel-based Macs. It's a shame they can't be 64-bit from the start, because 64-bit computers aren't going to be optional for much longer.
"Linux is probably the same minus the emu layer (no big deal when you can just recompile), but don't quote me on that."
Yes. When a binary is exec'd the kernel examines the ELF headers and determines whether the application is 32-bit or 64-bit. System calls from the application are handled appropriately within the kernel whichever it happens to be. You can even run a completely 32-bit userspace on a 64-bit kernel, it doesn't care. The linker exposes the correct libraries to the application whichever it happens to be.
Posted by: Apple Foot Soldier at June 26, 2005 09:46 PM
No one has really treated this question, but when Intel Macs run Windows at native PC speeds, why won't there be a disincentive to develop Mac software?
What if some developers start telling their Intel Mac customers to "just run our Windows version" which will run at the same speed as a regular Wintel PC.
I don't care if it says it's a Mac, if a computer can install Windows directly (as people are reporting they can do with the developer Mactels Apple is leasing) it IS a PC!
So that gives the option to software developers (ISVs) of dropping all their Mac native versions and just having Intel Mac customers run the Windows versions.
Why won't they?
Everyone I talk to says this won't happen, but no one has given me a credible reason for *why* it won't happen.
Would an ISV actually say, Our Windows version sucks compared to the Mac version, so you Mac customers ought to buy the native Mac version, or is the company line going to be that the Windows and Mac versions are just as good as one another.
And if they have that attitude, then why develop two versions of an application for ONE MACHINE!
This is a wasteful duplication of effort and costs mucho deniro.
That is why I think Apple should consider the option of disallowing Windows from being installed directly on Intel Macs, and offering Windows compatability that isn't *too* good -- like Virtual PC is today.
Otherwise you may start to see Mac software development dry up as ISVs steer their Intel Mac customers to the Windows versions of their apps which, company line, are just as good as the Mac version (sometimes better) and run at 100% of the speed of a non-Apple PC on Intel Macs.
So somebody please tell me, why won't Mac software development dry up when Mac can run Windows at 100% speed?
Why will ISVs continue to develop native Mac software and not just treat "Mactels" as any other Windows PC?
Posted by: Powerjack at June 26, 2005 10:16 PM
Apple Foot Soldier: Your questions all presume that people see no usability or desireability differences between the Mac OS and the Windows OS. You presume that the market thinks that "an operating system is an operating system is an operating system."
Personally, I woudn't use Windows as my main working environment, if it meant I had to hire somebody to write another operating system from scratch. thankfully, Apple's done a good job of that task, and, I can use OS X.
I doubt that I am alone in seeing multiple workflow and usability advantages in OS X over Windows.
Developers will write software that runs on the operating systems used by the customers they wish to sell to. And, OS X customers will scorn flawed "Windows" software trying to masquerade as OS X software, just as we already do today.
Posted by: Jasyn Jones at June 27, 2005 01:06 AM
Why not Windows on a Macintel? Hard drive partitioning. Windows has its own hard drive format- NTFS. The MacOS uses HFS+. In order to run Windows on a MacIntel, you need a disk image, to virtualize the file system (like VirtualPC does) or you need to partition the drive into an NTFS partition and an HFS+ partition (or use 2 different hard drives).
This sounds like a mess for the casual user.
Posted by: WinJoes at June 27, 2005 02:30 AM
Aside from its technical shortcomings, Cell was never an option for Apple because it was Sony's baby. Sony is clearly a long-term rival for Apple (the iPod IS the Walkman of the early 21st century) and Sony is in bed with IBM on the Cell's design, If Apple didn't like the inattention it got from IBM when it was the flagship customer for a CPU design, imagine how it would like to be begging for crumbs around the huge console market (not to mention whatever future home media implementations Sony has in mind for Cell)
With respect to 64bit comments (on/in x86 and Windows)
Clever application design can minimize the "overhead" from the sparseness of 64bit code, the impact of which is pretty minimal in most cases anyway. And the hardware itself is currently defined to only do 48bit addressing ("canonical addresses" on x86-64 have the upper byte all zeros or ones) though of course physical addressing is (currently) limited to 40bits or less.
Yes, running in 64bit on the x86 gives you some new instructions and twice as many GPR and SIMD registers, but this does not result in a "huge speed boost" unless you define "huge" as "10% or less." There are some big bumps in special cases (eg compute-bound code in which the number of inner-loop variables exceeded available registers in 32bit but not in 64bit, and of course 32bit code that was doing massive amounts of 64bit integer operations) but in general the same code recompiled for x86-64 sees single-digit percentage improvements. Nice, but not eye-popping.
Just to be clear: 32bit apps running on Windows x64 run natively but all calls to system code get marshaled across the "bitness boundary" by WoW and execute in 64bit. So there isn't a duplication of libraries within Windows (though there are some duplicated apps: most notably, Internet Explorer which exists in 32bit and 64bit versions). This doesn't apply to 3rd party libraries, however: DLLs have to be the same bittedness as the apps which call them. This can be a problem for applications which rely on 3rd party plug-ins: Adobe, for example, may release a 64bit Photoshop but you won't be able to use your existing filters with it -- you'll have to wait on 64bit recompiles of the filters (unless Adobe jumps through some hoops to glom up something that hosts 32bit filters and interchanges image data with the main 64bit app). This also means that things like shell extensions and ActiveX controls don't work (which is why the 32bit version of IE is included -- and why 64bit IE is much safer).
And yes, drivers are the thorn in the paw of Windows x64. There's drivers (in beta at least) for a lot of the mainstream stuff, but things like printers and scanners are pretty thin; in many cases the hw mfrs clearly didn't make any effort to do development until Intel committed to x64, and some of them still haven't (including some big names like HP). Of course Apple will have to convince them all to do Still Another Driver (at least it will be x86), though I suppose that the Mac market has been doing without a lot of this 3rd party hardware all along anyway.
Posted by: Killich van Muzteren at June 27, 2005 02:34 AM
So that gives the option to software developers (ISVs) of dropping all their Mac native versions and just having Intel Mac customers run the Windows versions. Why won't they?
Because even native versions of Windows applications that didn't feel and behave Mac-like have failed in the Market big time.
Why would anyone in his right mind as a Mac user run any Windows app, that sucks just a badly as the original and does neither look like nor behave like a Mac OS X application, for any other reason than there's no alternatives whatsoever on the Mac? If it's an application with a big user base on the Mac they will continue support, or they will loose that user base very quickly.
Posted by: nikster at June 27, 2005 03:05 AM
Ad MySQL: There are known problems with MySQL on OS X - basically, don't use OS X for MySQL. The problems have to do with thread performance and MySQL not using "tricks" Apple deems necessary to get decent performance. It's probably mostly Apple's fault for requiring these tricks in the first place. Google for it, it's well known.
Ad 64 bit: Not nearly as important as ppl think. 64 bits has minimal advantages beyond being able to address lots of memory so Apple has wisely decided to take a very soft approach.
Intel will be on 64 bit once Apple switches. It's very unlikely Apple will release _any_ machines based on the P4 - the P4 has been EOL'd by Intel a while ago. They are milking it for all its worth now, but all future developments will be based on the P-M architectures. A P4 would just melt a mac mini.
As for having to "adjust" applications: As senior software architect I can tell you that anyone needing more than a recompile did some really bad thing that they will now have to pay for, e.g. some hacks, assembler optimizations, pointer magic. Apple has very little regard for that and rightfully so - if they would make OS X compatible with every hack ever applied they would end up with something like.. Windows. Unstable and unmaintainable.
Classic is a prime example - OS 9 is basically one huge hack all by itself and so would not ever survive a processor transplant. It could not possibly be supported.
Posted by: Ed Nelson at June 27, 2005 03:11 AM
Ad 64 bit: Not nearly as important as ppl think. 64 bits has minimal advantages beyond being able to address lots of memory so Apple has wisely decided to take a very soft approach.
Intel will be on 64 bit once Apple switches.
I disagree, respectfully. Content professionals are a main part of Apple's core business. Many of their applications benefit from 64-bit, including: Imaging, Video, 3-D.
:Ed:
Posted by: Adrian at June 27, 2005 04:01 AM
Instead of lamenting about Photoshop not being able to use more RAM, why not just create a RAM disk and assign that to Photoshop as a primary scratch disk.
Posted by: Nick Dabner at June 27, 2005 04:57 AM
Jim - Your mysql server issues are due to FreeBSD thread level locks against the Mach kernel. Gutsy move to use OS X for mysql, but lobby apple to get their act together. I think there was an article on engadget or similar about it.
Posted by: Matt at June 27, 2005 06:44 AM
Re : MYSQL on MacOS X
This has come up a few times, and one of the answers that crops up is Apple ships hard disks that actually honor the "Write my data to physical media and get back to me."
Someone may have blown this theory out of the water, but there were a couple of incidents recently where major sites had power outages, *and* their UPSs didn't kick in for one reason or another. No sweat, we have battery backed up RAID.
BABOW! Hard disks had been lying. The standard write data to disk call was being ignored by manufacturers in order to get better performance. Half the stuff that the drive told the raid card had been written, actually hadn't, power comes back on, RAID writes remainder of outstanding data to disk. Lovely corruptions everywhere.
Apple apparently both ships drives that honor the write to physical media command, *and* use a second command to make sure the job gets done, but this makes disk access incredibly slow compared to something that doesn't do this. That, and the performance hacks an earlier reader mentioned.
So, if you are certain you'll always have power, be happy with your faster MySQL performance. If you have that slightest bit of doubt, and your data is *really* important, the OS X way is probably better.
Either that, or get yourself an EMC or something :-)
Posted by: Dave Schroeder at June 27, 2005 07:57 AM
Apple Foot Soldier:
If your line of reasoning was correct, there would be zero software for Linux, and zero increasing support for Linux from commercial and enterprise vendors (since Linux runs on "PCs" that also can run Windows).
However, the opposite is true.
It is incidental that Intel-based Macintosh systems will be able to, either directly or via virtualization or both, run Windows at near-full or full speed, and this is actually a huge advantage for these systems, not a liability. The main reason people buy Macintosh computers is because of the OS. The tight hardware integration that makes peripheral usage and OS interaction with hardware seamless also is another huge corollary reason; this also will not change.
In short, the reasons that software vendors make software for Mac OS X now WILL NOT CHANGE.
Posted by: Matt at June 27, 2005 11:18 AM
I'm fairly sure that the dev boxes sitting round for people to play with at wwdc were em64t capable according to the BIOS screen, and the HFS darwin code has a few "LP64todo" lines. I guess it's a work in progress.
Posted by: vaughn at June 27, 2005 03:35 PM
Re : MYSQL on MacOS X This has come up a few times, and one of the answers that crops up is Apple ships hard disks that actually honor the "Write my data to physical media and get back to me."Someone may have blown this theory out of the water, but there were a couple of incidents recently where major sites had power outages, *and* their UPSs didn't kick in for one reason or another. No sweat, we have battery backed up RAID.
Indeed, where do you come up with this stuff?
Anandtech recently got confirmation from Apple that this is a problem with how OS X works for server tasks, nothing like what you say. :) It is a byproduct of the arch of OS X.
Posted by: Matt at June 28, 2005 03:04 AM
>Re : MYSQL on MacOS X This has come up a few times,
>and one of the answers that crops up is Apple ships
>hard disks that actually honor the "Write my data
>to physical media and get back to me."
>Indeed, where do you come up with this stuff?
From emails I sent to another list, quoting discussions on ArsTechnica :
--
Posted June 05, 2005 @ 11:24AM by iljitsch
Turns out that Anandtech really bites the big one when it comes to
creating a decent test setup.
They used Apache 1.3 which uses a process for each connection. Context
switching between processes sucks the performance right out of a system
(apparently some systems more so than others, though). They should have
used Apache 2.0 with threads rather than processes and the G5 would have
held its own no trouble.
The database results are very likely skewed because MacOS actually does
what a database is supposed to do: park the data on the disk platter,
rather than live in the simplified Linux universe where the power never
fails so writing to the drive cache is good enough.
--
--
Posted June 05, 2005 @ 12:09PM by grayswandir
I believe iljitsch is quite right; from what I've read, OS X honors
fcntl() call with the full sync option, actually forcing the disk driver
to write out the data to disk, unlike say Linux. This takes more time,
but ensures data integrity (so your critical data won't be lost in the
event of a power failure for instance).
Take a look at this:
http://lists.apple.com/archives/darwin-dev/2005/Feb/msg00095.html
If linux actually ensured data integrity this way, the performance
would probably be comparable (assuming they used the same/comparable test
rigs).
Now I need to read more thoroughly :
Posted June 05, 2005 @ 6:47PM by grayswandir
Akula - I suggest you try and read the discussion at the URL I posted
earlier. OS X implements a FULL_SYNC option to fcntl which issues a
FLUSH_TRACK_CACHE command to the ATA drive. A few excerpts below. Also,
the very article you link to (through slashdot) seems to indicate that
the various drives tested by the writer don't in fact guarantee cache
syncs to disk on power failures. Your proof-by-assertion is incorrect.
It sounds like you're comparing apples and oranges (pardon the pun).
As Dominic pointed out, F_FULLFSYNC offers a level of synchronization
that's not available from fsync on Mac OS X or other platforms. If you
were to only rely on fsync, I imagine the performance between systems
would be comparable. One way to mitigate this issue for large
operations is to wrap your statements in a single transaction. I
believe this allows sqlite to sync only after the entire operation is
complete, instead of between individual statements.
I believe that what the above comment refers to is the fact that
fsync() is not sufficient to guarantee that your data is on stable
storage and on MacOS X we provide a fcntl(), called F_FULLFSYNC,
to ask the drive to flush all buffered data to stable storage.
Now, a little bit more detail: on ATA drives we implement F_FULLFSYNC
with the FLUSH_TRACK_CACHE command. All drives sold by Apple will
honor this command.
Posted by: encro at July 2, 2005 12:45 PM
Peter Ammon (Apple Appkit Team) discusses the Anandtech article on his blog:
http://ridiculousfish.com/blog/?p=17








When you say IA-64, are you referring to Intel's ISA that is used on the Itanium, or do you really mean EM64T/x86-64 as it appears on the Pentium D and AMD's chips? I think Intel has pretty much written off IA-64, and HP has announced their intentions to no longer actively develop the ISA, so it's probably not likely that Apple will want to redevelop their 64-bit Intel line around a dead ISA that requires extreme compiler optimizations and sacrificing IA-32 speed because of IA-64's lack (or, at minimum, a strong deficit) of out-of-order execution.