XBox 360 "operating system"?

Rolf N

Recurring Membmare
Veteran
Is there one?
There's the dashboard and the guide thing, that much I know, but can anyone shed some insight on how this is all structured?
Can a game throw the system software out of memory and assume full control?
Is there a firmware-supplied multithread scheduler running at all times, comparable to a Win32 system?
Is hardware access just hidden by APIs or is it genuinely disallowed for game processes, by whatever equivalence to protected mode the PPC cores may have?
 
zeckensack said:
Is there one?
There's the dashboard and the guide thing, that much I know, but can anyone shed some insight on how this is all structured?
Can a game throw the system software out of memory and assume full control?
Is there a firmware-supplied multithread scheduler running at all times, comparable to a Win32 system?
From what I've gathered, there is a very small, low level kernel based originally on Windows2000 and the Xbox Kernel, which is what the applications interact with. That in turn loads applications like the dashboard (which has a component that always stays resident for announcing messages and displaying the guide, I think Microsoft reserved 32mb of the 512mb for this) or the MediaCenterExtender (which unloads the main part of the dashboard).

Is hardware access just hidden by APIs or is it genuinely disallowed for game processes, by whatever equivalence to protected mode the PPC cores may have?
I think it'll be similar to what the older Xbox did, e.g. the DirectX-equivalent calls are linked as static libs, and these functions access the hardware directly.
So essentially, the application (at least on one core) is still running as the equivalent of ring 0, but above all that there is a so-called hypervisor, which is supposed to oversee all of that.
 
zeckensack said:
Can a game throw the system software out of memory and assume full control?

Can't find any links, but I don't think so.

The X360 handles all controller related stuff, networking, messages, etc. The second and third core are available for 95% because of this.

For example: the dev can decide where they want to put a message (e.g. Pipo sent you...), and it can be delayed for some time (max 1.5 minute? - e.g. cut scenes) but that's it.
 
Wasnt it 25% on one core(Audio and the other things)? Seems dumb to not have two "free" cores. But i also remember that only one is avaliable fully so you probably right in this case.
 
Found it: http://www.xbox360news.com/Blogs/News/hqs/blr_483.aspx

Among 3 cores in Xbox 360 CPU (codenamed "PX"), Core 0 is primary and Core 1/2 are secondary. Core 0 is fully usable by a game program. Core 1 and Core 2 are shared by a game program and the Xbox 360 system. Network stacks, services, drivers such as a USB driver run on those secondary cores. 5% computation usage of both core 1 and core 2 are reserved by the system.

Edit - in that link is your 25% too - but that's not really 'OS' related and devs are free to use their own sound processing routines too AFAIK. On the other hand it's a bit strange they state <it's always done on> Core 2... Maybe that's only true when you use MS's default libs (e.g. the 'helper-threads')?

The XMA (modified WMAPro) decoder in the southbridge chip can decode 256 XMA channels at the same time. Though the compression rate is variable, 1/8 is just enough for typical usage. After decoding, all software sound processing (multi-channel mixing, 3D surround sound, Dolby Pro Logic II/Dolby Digital 5.1 encoding) are done on CPU Core 2. When it processes 256 channels at the same time it costs 25% load of Core 2.
 
Last edited by a moderator:
What woul dyou guys assume is the max concurrent sounds we see in todays games? Even in BF2 on the PC i cant imagine more than 64-128 simultaneous?
 
expletive said:
What woul dyou guys assume is the max concurrent sounds we see in todays games? Even in BF2 on the PC i cant imagine more than 64-128 simultaneous?

As far as PC gaming goes, right now I don't think we ever see more than 128 simultaneous voices, and when it comes to 3D hardware acceleration, Creative's new X-Fi chips only support up to 128 different voices. But most games max out around there right now anyway, and I'm not sure any go over.

I'm thinking the 256 support of the X360 is a future proof type element...

I may be completely off my rocker and wrong about all of this, however.
 
It depends a lot on how in-game music is being done. Streaming a (stereo) track from disc is obviously going be very different from doing things real time (in 5.1).

And, although it depends on the type of game, real time is where it's at...

Having said that, 256 is a lot. ;)

Guden Oden said:
Interesting/great replies guys, thanks.

No prob.

Edit - A bit more info from: http://www.1up.com/do/previewPage?pager.offset=0&cId=3134711

One of the things we have right now that we didn't have on Halo 1 is a mixing console that we've built into our engine. We have what we call sound classes, [and] different elements are in different sound classes, which is essentially the same as having a giant mixing console and then bussing a bunch of stuff: here's a bus for violins, here's a bus for the woodwinds, and here you have these individual sub-mixed tracks that you can control while you're controlling other tracks. So when it comes to sound design, we have this thing called a mixing board that gives me...I can't even count them all. About 25 submixed classes -- projectile impacts, weapons fire, unit footsteps, unit dialogue, cinematic dialogue...these are all in separate tracks, so even though I might have 15,000 lines of combat dialogue, I can globally adjust those things how I want, adjust all the medic dialogue, and adjust all the footsteps globally.

I've seen more details, but *cough* can't find 'm *cough*. Might as well make that my .sig. ;)
 
Last edited by a moderator:
Some new info: http://blogs.msdn.com/xboxteam/archive/2006/02/17/534421.aspx

One of the first questions I get when someone hears I work on Xbox is "So, what operating system do you guys use? Windows 2000, right?" I am honestly not sure where the Win2K misperception comes from, but Xbox runs a custom operating system built from the ground up. While our operating system exports many of the same APIs found in Win32 (e.g. CreateThread or WaitForSingleObject), not everything is there. For instance, there is no use for CreateWindow on Xbox - all graphics are done through (our own flavor of) Direct3D.

There are a number of reasons both Xbox and 360 have their own OS. First, it gives Xbox a chance to own its own destiny in terms of architecture. When you have your own operating system, it's easy to go in and change things. Second comes performance. There isn't much of a hardware abstraction layer on Xbox - most stuff talks almost directly to hardware. This eliminates a lot of software overhead you might find on a PC. Third is security. With our own operating system, it also becomes a lot easier to design & implement our own security architecture. As the community is finding out, there is a lot of custom stuff.

The operating system is more than just the kernel. On Windows, you have critical components such as explorer.exe, shlwapi.dll, user32.dll, and others that are required for your system to function. On Xbox 360, we have similarly critical components. When you see a required system update from Xbox Live, we are mostly updating these critical components with fixes as well as new features.

Questions?

Let us know if you want to know more about the OS in the comments...
 
Still, I think it's the first time I see a comment from a MS guy on the subject. And he is pretty clear on the Win2K subject...
 
pipo said:
Still, I think it's the first time I see a comment from a MS guy on the subject. And he is pretty clear on the Win2K subject...
I think his stance on the Win2k comparison is both technically correct and totally irrelevant in the real world.
Sure he can say that it's not the Win2k kernel. Even the WinXP "kernel" isn't the Win2k "kernel" technically, but practically there's soo little difference. There are just a few algorithmic improvements to memory allocation and scheduling and stuff, and it has been run through a newer compiler. That makes it a different Kernel but it would be quite a stretch to claim it was "built from the ground up". Most people in software who claim that their newest version was "built from the ground up" are just flat-out lying. Just face it, total rewrites of a software on the scope of even a basic OS are an irresponsible waste of energy. Rewriting certain subsystems, improving some others, throwing stuff away and culling the dependencies etc, that is plausible. Rewriting the whole thing OTOH is just nuts.

But that really isn't the point either way.

The point about the Win2k comparison is in the fundamental architecture and concepts, not so much in single blocks of code that may look dramatically different but in the end do the same job.
The most interesting snippet of that quote, to me, was the revelation that there is a "CreateThread" function because it indicates that thread management and scheduling has at least some similarities to Win32. What I'd pretty much want to know next is whether or not the system applies the same scheduling rules as Win32/SMP (fixed time slice lengths, priorities don't do anything useful, use of affinities), and how the system is partitioned wrt system threads vs game threads, and if there are any measures in place (fixed quotas for "system tasks") to make the system more deterministic.
 
zeckensack said:
I think his stance on the Win2k comparison is both technically correct and totally irrelevant in the real world.
Sure he can say that it's not the Win2k kernel. Even the WinXP "kernel" isn't the Win2k "kernel" technically, but practically there's soo little difference. There are just a few algorithmic improvements to memory allocation and scheduling and stuff, and it has been run through a newer compiler. That makes it a different Kernel but it would be quite a stretch to claim it was "built from the ground up". Most people in software who claim that their newest version was "built from the ground up" are just flat-out lying. Just face it, total rewrites of a software on the scope of even a basic OS are an irresponsible waste of energy. Rewriting certain subsystems, improving some others, throwing stuff away and culling the dependencies etc, that is plausible. Rewriting the whole thing OTOH is just nuts.

But that really isn't the point either way.

The point about the Win2k comparison is in the fundamental architecture and concepts, not so much in single blocks of code that may look dramatically different but in the end do the same job.
The most interesting snippet of that quote, to me, was the revelation that there is a "CreateThread" function because it indicates that thread management and scheduling has at least some similarities to Win32. What I'd pretty much want to know next is whether or not the system applies the same scheduling rules as Win32/SMP (fixed time slice lengths, priorities don't do anything useful, use of affinities), and how the system is partitioned wrt system threads vs game threads, and if there are any measures in place (fixed quotas for "system tasks") to make the system more deterministic.


It's not quite that simple, it's my understanding that although they often started with subsystems from win2K, but large amounts of the kernel were rewritten because of the different reuqirements, notably minimal dynamic memory allocation and low CPU overhead. The filesystem was a complete rewrite for example.

You can control threads with a much finer degree of granularity than you can on a win2K box, you can prevent the artificial priority boosts that occur to give threads a minimum time slice, but threads still preempt (unlike the PS2 and Gamecube OS'). If you don't want pre-emptive thread scheduling then it has fiber support.

Heck since your in kernel mode you can just disable all the interupts and guarantee nothing will swap.

As a whole it's considerably better written and thought out than the PS2 OS. But MS is an OS comany so you'd hop that would be the case.
 
ERP said:
As a whole it's considerably better written and thought out than the PS2 OS. But MS is an OS comany so you'd hop that would be the case.
not really, maybe if they had more competition in that market ;)
 
Back
Top