I know that this question is either coming or what you intended so I'll ask and answer it.
Why does Android use a virtual machine?
For real-time job control.
Linux, any unix, is not a real-time architecture.
You can achieve real-time results by having hardware far faster than the required job - some of my industrial solutions have been exactly that.
But that's not really real-time, it's just getting away with it.
The first true real-time Linux was named exactly that - RTLinux.
And it ran a virtual Linux inside Linux. The primary had two jobs - the real-time task at high priority and the other Linux at lower priority doing everything else.
That's the first model.
Here's ours -
Linux multitasks just like your desktop Windows or Mac OS X.
Ever get the beach ball or hourglass doing something on your desktop?
I'll bet you have.
When that happens, the app you're using is unavailable while the operating system figures things out - but other apps may still be running just fine.
Because in preemptive multitasking, all jobs are equal. You can suggest that some have higher priority but that's all she wrote.
How long would you tolerate missing phone calls because the phone was equal to Facebook or your web browser?
You wouldn't tolerate that for long at all.
So you need a way to run apps in Linux where you can create your own job control rules and make sure that the phone always comes first.
Welcome to the Dalvik Virtual Machine.
