[Windows Phone 7 General] tiwas:
This is a clarification thread, and I will not, unlike my other attempt, be fooled into a pissing contest. There just seems to be a lot of misunderstanding when it comes to "multitasking" on Windows Phone 7, and I will try to clarify a little bit.

Problem: You're in a program, start another one, and then start the original again - and your data is gone, or if it's a game you have to start from the beginning.

Answer: This has nothing to do with multitasking, but something called tombstoning. The developers has to take into account what to do when a program is exited by starting another program, and most seem to just ignore it. That is when you lose your data or have to start the game from scratch

Problem: "Windows Phone doesn't multitask", "When will we get multitasking" etc

Answer: Windows Phone can multitask just fine. So can the programs running on Windows Phone. What most people refer to when asking these questions is really either the question above, or if developers will be allowed to run programs in the background. Multitasking is being able to more than one thing at the time, and the most simple test to see if your phone supports it or not is to see if you can receive phone calls or listen to music while you're checking mail. So - your phone can both multitask and run applications in the background (which is called scheduling, actually, as multitasking doesn't necessarily mean running a program that isn't in the foreground - uploading a picture to your sky drive while letting you browse the other pictures is typical multitasking).

Problem: "When will MS let us run programs in the background?"

Answer: There are both pros and cons to letting developers do this. A lot of developers aren't that good when it comes to using resources sensibly while in the background, and a lot of programs simply doesn't *need* to run in the background. If you're writing notes and want them back when you return, that's tombstoning. Playing a game? Well, you certainly don't want it to actually run in the background as you'll be dead when you return. Still tombstoning. One of the few applications is if you're listening to music (videos don't cound, because it doesn't make sense playing the video when you cannot watch it) or download larger amounts of data. The problem is that, if it's not done correctly, this can negatively impact performance (do you really want your game to stutter or have to wait two minutes for mail to open??), it can drain your battery, and it can even help distribute viruses. If MS wants to open this to developers, they need to have special testing procedures before they allow it. Also, misbehaving background apps will give most people a negative image of MS, which is apparent in all the threads dissing MS for not allowing "multitasking" because developers don't save data when exiting the application.

So, here's a short run-down of terms that are interesting in today's computer landscape:

* Multitasking: Being able to do more than one job at a time. Multitasking really just divides the processor time (available time to use the processor) and gives slices to different jobs.

* Multithreading: Being able to divide tasks into their own threads, thus allowing the use of more cores/processors. A multitasking, single threaded OS can only use one processor (simplification of the truth - if you know why it's a simplification, you don't need the full story. If you don't, it will only confuse you), while a multitasking, multithreaded OS can use more. Most programs, even for regular computers don't use multithreading, as it's a pain in the O to handle, but operating systems do. That's why, on a PC, Counter Strike will only use one of the cores on your brand new gaming rig with 8 cores, but all the cores will be active.

* Background scheduling: How the OS can let applications run in the background, usually by giving it less processor time (most often just free cycles) and thus letting it complete a time consuming process without making the system too slow to use. A foreground application will usually get more processor time than if it was running in the background.

I hope this clears it up, and helps people to understand what the different terms are and when to use it.

To sum up:

* Multitasking is available. There's no question about it. Windows Phone multitasks applications, and applications can multitask internally.

* Background scheduling is available, but is not an open API for developers. This has both positive and negative implications, depending on application

* A lot of developers are pretty bad when it comes to tombstoning.

;)