For we software developer, the computer system can be category as below 4 layer:
- Application Layer
- Library Layer
- OS Layer
- Hardware Layer
Every layer consumes API from bottom layer, and also provides API to offer services/functions to upper layer.
Between each layer, abstraction layer can be created, that is called: Virtualization. From virtualization below benefits is provided:
- Unify & standardize the the APIs form different manufacturers
- Improve portability for programs
- Isolate the impact of processes from each other
- Resource reuse/measure & control
The virtualization between App & Lib layer
Samples:
- JVM
- CLR
- Web Browser
- …
Many languages benefit from the virtual machine for the platform independent. As different platform provides different system level function libraries, VM is the one build abstraction layer upon on them.
For developers only need to coding with APIs of VM, the VM will handle native interaction with different platform.
VM usually will also provide additional services to speed up our application development. e.g.
- Memory Management
- Garbage Collection
- Exception handling
- Security, Thread & Concurrency Management
- …
The virtualization between Lib & OS layer
Samples could be popular “Container” engine:
- Docker
- CoreOS Rocket
- …
THe container mocked the API of system layer
The virtualization between OS & Hardware layer
Samples:
- VMWare vSphere
- VMWare workstation / VirtualBox / Hyper-V