Linked by Thom Holwerda on Mon 21st May 2012 20:03 UTC
Windows For Microsoft, the traditional desktop is old news. It's on its way out, it's legacy, and the harder they claim the desktop has equal rights, the sillier it becomes. With companies, words are meaningless, it's actions that matter, and here Microsoft's actions tell the real story. The company has announced the product line-up for Visual Studio 11, and the free Express can no longer be used to create desktop applications. Message is clear.
Permalink for comment 519104
To read all comments associated with this story, please click here.
RE[8]: "19th Century Dentist"
by malxau on Wed 23rd May 2012 09:22 UTC in reply to "RE[7]: "19th Century Dentist""
Member since:

Well, you'd run into compat issues with previous Windows desktop apps. Metro benefits from the clean break and can afford a new execution model.

That's true, but it seems odd reasoning to me to say that battery life can be improved by starting over - with no existing applications - as opposed to improving Win32, and having improved battery life with a nonzero number of working applications on day one. Especially if those applications that are broken can be fixed with more minor changes instead of a rewrite, it's more likely to happen more quickly.

There's a difference, suspended Metro apps are not scheduled at all. The processor can effectively operate in low power states more frequently.

What Alfman's getting at is that operating systems do not schedule threads that are blocked waiting for something to do, whether it's a new UI message or blocking network IO. These processes consume zero CPU; not a small amount, but zero. The memory manager is free to take back any pages associated with these processes, and will do so, if it believes it can use that memory for something else more important. In other words, we already have that capability, and modern systems rely on this all the time.

My point is that while Win32 applications may or may not use best practices. Metro apps must use best practices.

That's really it in a nutshell. In Win32 if you want to write a process that uses background processing for something, battery life goes down, but you can write the application. In WinRT you can't. Which is better depends purely on your values (absolute battery vs. flexible applications.)

Newer hardware supports ultra low device states in which you can be suspended, and only be awoken when new data is on the wire. As noted above, the app isn't even scheduled until new data on the transport channel triggers it. The data is then pushed to you.

That new hardware would work fine with existing blocking or async network APIs (recv, select, WSAAsyncSelect, the works.) The thread is asleep doing nothing, and when the hardware tells the OS it has data, the OS can schedule the thread and tell it that it has data.

Its simple, suspended apps are not scheduled, and during low memory situations their memory is reclaimed.

If a process contains no threads that have been scheduled for a long period, the memory manager will trim the working set of that process. The reclaiming aspect in low memory situations hasn't changed much. What has changed is when the process is suspended the _entire_ working set can be pushed out, including to disk, in a sequential fashion. This means it can be read back sequentially rather than faulting page-by-page when the application becomes active again, making resume times faster.

Ironically, this only works because resuming a suspended process is a more heavyweight operation that happens less often than a random context switch to a thread that hasn't run in a while. So switching to a suspended app is marginally slower than switching between traditional running applications, but the benefit is that in the worst case, when out of memory, the IO patterns are better when switching.

That said, be honest here, how often do you use a system that is paging data to/from disk so aggressively for this to matter?

Reply Parent Score: 2