Open In App

Operating system based Virtualization

Last Updated : 09 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Operating System-based Virtualization is also known as Containerization. It is a technology that allows multiple isolated user-space instances called containers to run on a single operating system (OS) kernel. Unlike traditional virtualization, where each virtual machine (VM) requires its own OS, OS-based virtualization allows the sharing of the same OS while providing separate environments for running applications.

How OS-Based Virtualization Works

OS-Based Virtualization works as follows:

  • The host OS kernel is shared among all containers, unlike full virtualization (e.g., VMs) where each VM has its own kernel.
  • The kernel enforces isolation between containers using namespaces (for process, network, filesystem isolation) and cgroups (control groups) for resource allocation (CPU, memory, disk I/O, network).
  • cgroups limit and prioritize resource usage (CPU, memory, disk, network) per container.
  • The kernel ensures that a container cannot exceed its allocated resources (unless explicitly allowed).
  • Namespaces prevent processes in one container from seeing or interfering with processes in another.
  • Programs inside a container cannot access resources outside unless explicitly granted (e.g., mounted volumes, network ports).
  • The overhead comes from kernel-level isolation mechanisms (namespaces, cgroups), but it’s minimal compared to full virtualization.

Operating System Based Services

Some major operating system based services are mentioned below:  

  • Backup and Recovery: Host operating systems can be utilized to back up and restore virtual machines. Backup software tools can be used to ensure data safety and system recovery.
  • Security Management: Host operating systems help manage the security of virtual machines. This includes configuring firewalls, installing antivirus software and applying other essential security settings.
  • Integration with Directory Services: Host operating systems can be integrated with directory services like Active Directory, enabling centralized management of users and groups.

Operating System Based Operations

Various major operations of Operating System Based Virtualization are described below:  

  1. Hardware capabilities can be employed such as the network connection and CPU.
  2. Connected peripherals with which Host OS can interact such as a webcam, printer, keyboard, or scanners.
  3. Host OS can be used to read or write data in files, folders, and network shares.

In the image given below, we have the architecture of traditional virtualization using Virtual Machines (VMs). In this setup, each VM operates as an isolated environment, running its own guest operating system and application software. These VMs are independent of one another, meaning each one has its own operating system which results in higher resource consumption. The Virtual Machine Management layer is responsible for overseeing and managing the virtual machines, ensuring proper resource allocation (such as CPU, memory, and storage) and maintaining isolation between the VMs. The host operating system (OS) sits above the hardware and provides the environment in which the hypervisor operates. The hypervisor, in turn, manages the VMs and allocates resources from the physical hardware. Finally, the hardware (virtualization host) is the physical machine that provides the necessary resources to run the virtual machines and host the hypervisor, enabling multiple VMs to function simultaneously.

1

OS Based Virtualization

 Features of Operating System Based Virtualization

  • Resource isolation: Operating system based virtualization provides a high level of resource isolation which allows each container to have its own set of resources, including CPU, memory, and I/O bandwidth.
  • Lightweight: Containers are lighter compared to traditional virtual machines as they share the same host operating system. This results in faster startup and lower resource usage.
  • Portability: Containers are highly portable. They can be easily moved from one environment to another without the need to modify the underlying application.
  • Scalability: Containers can be easily scaled up or down based on the application requirements. This makes it easier for applications to be highly responsive to changes in demand.
  • Security: Containers provide a high level of security by isolating the containerized application from the host operating system and other containers running on the same system.
  • Reduced Overhead: Containers incur less overhead than traditional virtual machines as they do not need to emulate a full hardware environment.
  • Easy Management: Containers are easy to manage as they can be started, stopped, and monitored using simple commands.

Advantages of Operating System Based Virtualization

  • Resource Efficiency: Operating system based virtualization allows for greater resource efficiency as containers do not need to emulate a complete hardware environment, which reduces resource overhead.
  • High Scalability: Containers can be quickly and easily scaled up or down depending on the demand, which makes it easy to respond to changes in the workload.
  • Easy Management: Containers are easy to manage as they can be managed through simple commands, which makes it easy to deploy and maintain large numbers of containers.
  • Reduced Costs: Operating system based virtualization can significantly reduce costs, as it requires fewer resources and infrastructure than traditional virtual machines.
  • Faster Deployment: Containers can be deployed quickly, reducing the time required to launch new applications or update existing ones.
  • Portability: Containers are highly portable, making it easy to move them from one environment to another without requiring changes to the underlying application.

Disadvantages of Operating System Based Virtualization

  • Security: Operating system based virtualization may pose security risks as containers share the same host operating system, which means that a security breach in one container could potentially affect all other containers running on the same system.
  • Limited Isolation: Containers may not provide complete isolation between applications, which can lead to performance degradation or resource contention.
  • Complexity: Operating system based virtualization can be complex to set up and manage, requiring specialized skills and knowledge.
  • Dependency Issues: Containers may have dependency issues with other containers or the host operating system, which can lead to compatibility issues and hinder deployment.
  • Limited Hardware Access: Containers may have limited access to hardware resources which can limit their ability to perform certain tasks or applications that require direct hardware access. 

For further reading, see Types of Server Virtualization and Hardware based Virtualization.


Next Article

Similar Reads