As far as I know, Linux containers are those that run on a shared OS kernel using a virtualization software. Is there any correlation to Dalvik VM which runs multiple apps on top it?


No, they're different types of virtualization.

  • The Dalvik VM works like an interpreter or just-in-time compiler: installed apps consist of Dalvik bytecode, but the CPU only knows how to run ARM or x86 machine code, so the DVM reads the Dalvik bytecode instructions and translates them into equivalent ARM or x86 instructions to make the app run. It's similar to an emulator, except that term is usually only applied to instruction sets that have been implemented natively in hardware. (There are no CPUs that directly understand Dalvik bytecode.) The Java VM and .NET CLR work similarly, and this explanation applies to those as well.
  • Linux container systems, like Docker and LXC, aren't involved at all in the actual running of programs; they just set up boundaries to isolate programs from each other and control how they can interact. The programs you run in a container are normal Linux programs that could also run on a normal Linux system without containers.

In short, containers virtualize the software environment surrounding a program, while a VM like Dalvik virtualizes the computer itself.

  • Thanks and also in google developer docs its written "Each process has its own VM". What does it mean?. And each application is given a linux user id. How to interpret this? – r2_d2 Oct 19 '15 at 4:22
  • Does the dvm do any of the isolate programs and how they interact with other applications.if not who does that? – r2_d2 Oct 19 '15 at 4:26
  • The Dalvik VM is a program. Each app runs a separate copy of it. And the reason for running different apps under different user IDs is so that they can't access each other's files; each app's data is private to that app. – Wyzard Oct 19 '15 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.