Today is a good day to code

The Trouble with Xenon / Cell and all Those Threads

Posted: December 31st, 1969 | Author: | Filed under: Uncategorized | No Comments »

The Trouble with Xenon / Cell and all Those Threads

Picture of Irv Owens Web DeveloperA long time ago, a company thought that if they created a game console with three CPUs it would be an incredible success. That company was Sega, and the console was the Saturn. The Saturn was extremely powerful, but it was very difficult to write code for. The reason was the RISC CPUs at it's core. Microsoft is headed down this path again with the XBox 360 (Xenon), and Sony is headed even further down this path with their PlayStation 3 (Cell).

The first challenge to a programmer is that in writing code that can take advantage of multi-core, multi-threaded hardware, one has to spin their code off onto as many threads as is beneficial. This leads to a code readability and dependency nightmare, since it is more difficult to look at any several modules of code and determine which has to wait for which to complete to continue processing. The result is often that programmers just don't use threads.

The second issue is that RISC is really stripped down when it comes to self-optimization of code. The logic behind this approach is that a CPU manufacturer can use more transistors for cache, SIMD processing, an onboard memory controller, etc… That, however puts the ownus for performance on the developer. They must spend more time optimizing and profiling their code to get it to the same level of performance that one would see with a more CISC CPU like the Pentium 4.

The Cell uses 7 PPC style cores, with a single controller core, and the Xenon uses 3 PPC style cores. Of the two CPUs, Microsoft's Xenon has a slight edge because of its larger L2 Cache, 1 MB compared with Sony's Cell having 512 KB. You can bet the reason the Cell has less cache is because of the extra cores. To make matters even worse, both CPUs presumably have deep pipelines so that they can more easily ramp up to over 3 GHz. The problem with this is that in order to accomidate the other cores, IBM had to butcher the PPC 970's front end, which means that most of what Intel had to put into the Pentium 4 in the way of branch prediction is reduced or gone. That means that stuff like in game AI will be much harder to implement well. For gaming, I would have much rather seen, in both systems, dual P4 Xeon 3.2 GHz CPUs both hyper-threaded, and SLi enabled dual nVidia 6800 512MB cards running on PCIe. The memory should have been 1 GB or DDR3. The unfortuate side of this type of system, while it would have been murder, is that it would cost $500, even after it was subsidized. Well, for games with quality story-lines and quality characters, it looks like the PC will remain the platform to beat.

That being said, however since the majority of gamers seem not to be so interested in the quality of games, but rather in the way they look, both systems will do graphics and sound like the world has never seen. Much of Intel's advantage in benchmarks over AMD, until the release of the FX-55, has been due to the Pentium 4's deep pipelining stage. This long pipeline does really well on video encoding and decoding, streaming video, ripping, and 3D graphics.

Mac users who have been upset by the release of the Xenon shouldn't be too upset. The PowerPC 970 in the G5 is way more advanced than the Xenon. According to Ars, developers who have been writing code for these systems have claimed that their performance has been disappointing. This could be, and probably is, because of the difficulty in profiling the code. Sega failed because of their lack of ability to create easy to use software programming interfaces that would optimize the developer's code behind the scenes for the hardware. They made it so tough for people to write software for their system that they just didn't. It is here that I believe that Microsoft holds a slight edge over Sony. The DirectX API is very mature, and obviously Microsoft has figured out how to get it to operate with the Xenon. Still, a lot depends on how much Microsoft has optimized their developer tools, and whether they have optimized DirectX to the point where no further optimizations are necessary to get the maximum performance from the system, or whether this is up to the programmer.

Sony on the other hand has a tougher battle. With a new system architecture, no mature API, and an existing software toolkit that is difficult to use properly, it is unclear just how easy it will be for developers to get every ounce of power from the new system, and with both systems, it will be the gameplay that will suffer. Initial games will probably look great, but the opponents will either have to be really stupid, or the graphic quality will have to come down. I'd still bet on the PlayStation 3, if Sony can get their grid processing together and a couple of PS3 systems can be combined for an even more powerful system, or better yet if it can use other computers around the house for extra cycles then it may be able to best the XBox 360 in the AI department.

Either way, the compiler will be slow or profiling will take much longer than before, the development cycle for games on these systems should be longer than gamers are used to, unless companies decide to hire more developers, which would be fantastic for the industry. These systems are more about getting a media center into the living room for both companies, that is clear. Looking at the hardware, they would be able to record High Definition TV using H.264 with absolutely no trouble, in fact you may be able to play a game while the system is ripping your favorite TV show. The sky is the limit as far as media is concerned with both systems. The only real question is how good the games will be.

Read More from Ars Technica
Read More about the Sega Saturn