Computer Networks (UGC NET topics) · Cloud Computing and IoT
Virtualization Storage and Resource Management
Overview
Virtualization abstracts physical computing resources into logical resources that can be divided, isolated, pooled and reassigned.
A hypervisor creates virtual machines and controls their access to CPU, memory, storage and network.
Resource management decides how those virtual resources share the underlying physical capacity without violating isolation or service guarantees.
Storage virtualization applies the same idea to disks: logical volumes, snapshots, thin provisioning and deduplication are separated from physical blocks.
This topic assumes basic knowledge of operating systems, memory management, file systems and cloud service models.
Key concepts
- Virtualization creates a logical version of a physical resource. It improves utilisation, isolation, consolidation and elasticity.
Cloud resource pooling uses virtualization to serve many tenants from shared physical resources under a multi-tenant model.
Virtual memory is an operating-system abstraction for paging; service virtualization emulates a service for testing; neither is the main cloud pooling mechanism by itself. - A hypervisor or virtual machine monitor creates and runs virtual machines. A Type-1 hypervisor runs directly on physical hardware: VMware ESXi, Microsoft Hyper-V, Xen.
KVM is usually classed as Type-1 because it is a kernel module; some texts call it hybrid. A Type-2 hypervisor runs on top of a host operating system: Oracle VirtualBox, VMware Workstation, Parallels Desktop. - A virtual machine is a software computer with virtual CPU, memory, disk and network interfaces, running its own guest operating system. It gives strong fault and security isolation and hardware independence.
A container is OS-level virtualization: it shares the host kernel, uses namespaces for isolation and cgroups for resource limits, starts faster and is denser, but has weaker isolation than a VM. - CPU resource management schedules virtual CPUs on physical cores. The CPU overcommit ratio is total configured vCPUs divided by physical cores.
CPU pinning binds a vCPU to a specific physical core, reducing scheduling jitter but reducing flexibility.
Reservations guarantee a minimum, limits cap a maximum, and shares decide proportional access under contention. - Memory overcommitment assigns more configured guest memory than physical memory.
Ballooning uses a cooperating guest driver: the host asks the balloon to inflate, the guest kernel allocates pages to it, and the host reclaims them.
Page sharing such as KSM merges identical pages read-only and copies on write. Ballooning is cooperative and visible to the guest kernel; page sharing is transparent. - Storage virtualization separates logical storage from physical storage. It supports logical volumes, LUN masking, thin provisioning, snapshots, clones, deduplication, replication and tiering.
- Block storage exposes raw blocks or volumes over SAN, iSCSI or Fibre Channel; the host formats its own file system.
File storage exposes shared files and directories over NFS or SMB/CIFS. Object storage stores objects with data, metadata and a unique identifier in a flat namespace, usually over REST or S3-style APIs; it is scalable but not a low-latency block device. - Thin provisioning allocates physical space on demand. Virtual size can exceed physical pool size, creating oversubscription and pool-exhaustion risk. Thick provisioning reserves the full configured capacity immediately.
- Deduplication removes duplicate blocks or files, inline or post-process. It saves space but is not a backup or replication substitute.
- A copy-on-write snapshot preserves a point-in-time image; before an original block is overwritten, the old block is copied to snapshot space.
A clone created from a snapshot initially shares blocks with the parent and diverges as writes occur. - Live migration moves a running VM to another host with minimal downtime. Pre-copy sends memory while the VM runs and re-sends dirty pages; it may fail to converge.
Post-copy starts the VM on the target early and fetches missing pages on demand, reducing migration time but risking failure handling. - VM sprawl is uncontrolled growth in the number of VMs, consuming storage, licences and management effort. Admission control, quotas and monitoring are the controls.
How it works
- The hypervisor discovers physical CPU, memory, storage and network devices and hides their details from each guest.
- A VM is created with virtual hardware and a guest OS. Type-1 and Type-2 placements differ as shown.
- The hypervisor scheduler maps each vCPU to a physical core in time slices. Overcommit improves utilisation but risks contention; reservations and pinning protect critical workloads.
- For memory, the host allocates pages to guests. Under pressure it inflates a balloon inside a guest, shares identical pages, or swaps; overcommit beyond safe demand can cause thrashing.
- Storage requests from a guest virtual disk go through the hypervisor or storage-virtualization layer to logical volumes, then to physical blocks.
Thin provisioning maps blocks only when written; snapshots use copy-on-write; deduplication checks duplicate blocks before writing. - Live migration reserves capacity on the target, transfers CPU state and memory, copies dirty pages iteratively, pauses the VM briefly and switches execution.
Shared storage avoids disk copying; otherwise disk state must also be transferred. - Resource management enforces quotas, limits and reservations, monitors pool usage and uses admission control to prevent unsafe oversubscription.
Drawing the diagram…
Formulas
-
Convention used below: and unless a question states decimal units.
-
Memory overcommit ratio: . Here is configured memory of VM and is usable host memory after hypervisor reserve. Maximum configured memory for a chosen ratio is .
-
CPU overcommit ratio: . Here is vCPUs of VM and is physical cores. If every vCPU is saturated, each vCPU receives fraction of a physical core.
-
Thin pool usage: . Here is written physical data of volume , is deduplicated saving, and is metadata or overhead. A new write fits only if .
-
Deduplication with duplicate fraction : unique data , saving , dedupe ratio when is the fraction removed.
-
Pre-copy convergence rule: pre-copy tends to converge only if effective migration bandwidth exceeds dirty-page rate , that is .
Worked examples
Example 1: memory overcommit. Ankur runs a host with 64 GB RAM. The hypervisor reserves 8 GB. Each VM is configured with 4 GB and the memory overcommit ratio is 1.5.
Usable memory is GB. Allowed configured memory is GB. Maximum VMs . Answer: 21 VMs; this is configured capacity, not a guarantee that all VMs can touch 84 GB simultaneously.
Example 2: CPU contention. Neha's host has 32 physical cores. It runs 10 VMs, each with 4 vCPUs, and the CPU overcommit ratio is 2.0. Total vCPUs . Actual ratio , within the allowed 2.0.
If all demand 100 percent, each vCPU gets of a physical core, i.e. 80 percent. Each VM gets core-equivalents. Answer: 80 percent per vCPU; 3.2 cores per VM under fair contention.
Example 3: thin provisioning. Pinki has a 1 TB pool. Thin volume A has virtual size 500 GB and 100 GB written. Thin volume B has virtual size 600 GB and 250 GB written.
Using 1 TB = 1024 GB, total virtual GB, which exceeds the pool by GB. Physical used GB. Free GB. Answer: oversubscribed by 76 GB; 350 GB used; 674 GB free;
both volumes cannot be fully written without more physical capacity.
Example 4: deduplication. Rohit's 2 TB pool uses 4 KB blocks. A thin volume has 200 GB written; deduplication finds 25 percent duplicate blocks and removes them.
Duplicate data GB. Unique physical data GB. Block check: 200 GB is 52,428,800 blocks of 4 KB; 25 percent is 13,107,200 blocks; removed space is 50 GB. Pool is 2048 GB, so free if this is the only volume is GB. Answer: 150 GB physical after dedupe; 50 GB saved; 1898 GB free.
Example 5: statement type. Consider:
I. In pre-copy live migration with shared storage, disk blocks need not be copied; CPU state and memory are migrated.
II. Post-copy live migration copies all memory before the VM resumes on the target.
III. Pre-copy can fail to converge when dirty-page rate is at least migration bandwidth.
I is true when storage is shared. II is false: post-copy resumes early and fetches pages on demand. III is true: convergence needs bandwidth greater than dirty rate. Answer: I and III only.
Comparison
| Feature | Type-1 hypervisor | Type-2 hypervisor |
|---|---|---|
| Placement | Directly on hardware | On a host OS |
| Performance | Usually closer to hardware | Extra host-OS layer |
| Examples | ESXi, Hyper-V, Xen | VirtualBox, VMware Workstation |
| Use | Data centres, cloud | Desktops, development |
| Feature | Virtual machine | Container |
|---|---|---|
| Isolation | Strong; separate guest kernel | Weaker; shares host kernel |
| Start-up | Slower | Faster |
| Density | Lower | Higher |
| Mechanism | Hypervisor | Namespaces and cgroups |
| Best for | Different OS, strong isolation | Microservices, dense deployment |
| Feature | Block storage | File storage | Object storage |
|---|---|---|---|
| Unit | Block or volume | File and directory | Object plus metadata |
| Access | SAN, iSCSI, Fibre Channel | NFS, SMB/CIFS | REST or S3-style API |
| File system | Managed by host | Provided by storage | Flat namespace, no normal hierarchy |
| Use | Databases, VM disks | Shared documents | Backups, media, large-scale data |
| Feature | Thin provisioning | Thick provisioning |
|---|---|---|
| Allocation | On demand at write | Full capacity reserved |
| Physical use | Lower initially | Higher initially |
| Risk | Pool exhaustion | Less risk of surprise exhaustion |
| Virtual size | May exceed physical | Usually matched to physical |
| Feature | Pre-copy migration | Post-copy migration |
|---|---|---|
| Memory transfer | Before final switch | After VM starts on target |
| Downtime | Smaller if converges | Potentially very small |
| Risk | May not converge | Page-fault latency; failure handling |
| Dirty pages | Iteratively recopied | Fetched on demand |
| Feature | Snapshot | Clone |
|---|---|---|
| Nature | Point-in-time image | Independent derived volume |
| Initial blocks | Shared with parent | Shared with snapshot or parent |
| Later writes | Preserved by COW | Diverge from parent |
| Use | Rollback, backup | New VM or test copy |
Revision summary
- Type-1 = bare metal; Type-2 = hosted on an OS.
- Containers share the host kernel; VMs run separate guest kernels.
- Overcommit ratio = configured total divided by usable physical capacity.
- Thin provisioning: virtual size is not physical usage; pool exhaustion is the main risk.
- Duplicate fraction means unique data is ; dedupe ratio is .
- Ballooning is cooperative and guest-kernel aware; page sharing is transparent.
- Block is raw, file is shared directories, object is flat with metadata and API access.
- Pre-copy converges only when bandwidth exceeds dirty rate; post-copy starts early.
- COW snapshot shares old blocks; clone diverges as writes occur.
- Reservations guarantee minimum, limits cap maximum, shares govern contention, pinning binds a vCPU.
- VM sprawl = uncontrolled VM growth; control it with quotas, admission control and monitoring.
Previous-year exam insights
- Direct concept questions ask for Type-1 versus Type-2, object storage property, thin provisioning, live migration, deduplication and VM-versus-container isolation.
- Statement I/II/III questions often turn on one word: “guest-aware” for ballooning, “all memory before resume” for post-copy, “shared storage” for live migration, and “initially shares blocks” for clones.
- Match-the-list questions pair terms such as ballooning, page sharing, post-copy migration, thin provisioning, VM sprawl and copy-on-write; match the keyword, not the full sentence.
- Assertion-Reason questions test whether overcommitment is safe only with reclaim and reservations; overcommit improves utilisation but does not guarantee memory or CPU.
- Numeric questions require floor operations, unit consistency and separation of virtual size from physical use; check whether “25 percent duplicates” means removed or remaining.
- Common traps: Type-2 still needs a host OS; containers are not as isolated as VMs; object storage is not mounted like a block disk; deduplication is not backup; thin virtual size is not physical occupancy.
- Check first: Type-1 direct placement, shared versus non-shared storage, initial versus final state of snapshots and clones, and configured versus actual overcommit ratio.
Practice at PARIKSHA
You are ready for the PARIKSHA tests of this sub-topic when you can:
- identify Type-1 and Type-2 hypervisors and explain where each runs;
- explain VM isolation and contrast it with container isolation;
- compute maximum VMs from host memory, hypervisor reserve and memory overcommit ratio;
- compute CPU overcommit ratio and fair share per vCPU under saturation;
- calculate thin-provisioned virtual size, physical usage and pool-exhaustion condition;
- calculate deduplication saving, unique physical data and dedupe ratio;
- distinguish block, file and object storage by unit, protocol and use case;
- explain ballooning, page sharing, CPU pinning and reservation-limit-share controls;
- compare pre-copy and post-copy live migration, including convergence and failure risk;
- evaluate statement, match-list and assertion-reason questions on snapshots, clones and VM sprawl.
Attempt the sub-topic test first, then the subject test.