Unit 1: Virtualization and Distributed Computing
I. Orientation — Abstraction, Concurrency, and Resource Sharing
Virtualization abstracts physical computing resources into logical resources, while parallel and distributed computing coordinate multiple processing elements to solve problems or provide services. Both fields separate a system’s logical view from its physical implementation.
A. Defining Characteristics
- Abstraction: CPUs, memory, storage, and networks are presented through logical interfaces such as virtual machines (VMs), virtual disks, and virtual networks.
- Isolation: Workloads operate in controlled environments so that a failure or security breach in one VM, process, or node need not affect others.
- Resource sharing: Multiple workloads use a common physical infrastructure; a hypervisor may divide one 16-core server among several VMs.
- Concurrency: Several tasks make progress during overlapping periods, whether on one time-shared CPU or many processors.
- Coordination: Parallel threads coordinate through shared memory; distributed nodes commonly coordinate by exchanging network messages.
- Scalability: Capacity can increase vertically by strengthening one machine or horizontally by adding machines.
- Transparency: Implementation details may be hidden; users can access a cloud VM without knowing which physical server hosts it.
II. Virtualization — Logical Resources over Physical Hardware
Virtualization creates an abstraction layer between physical resources and the operating systems or applications using them. The controlling software is usually called a hypervisor or virtual machine monitor (VMM).
A. Fundamentals of virtualization
Virtualization allows multiple isolated execution environments to share the same physical system safely and efficiently.
- Host and guest: The host supplies physical resources, while the guest is the VM or operating system receiving virtual CPUs, memory, disks, and interfaces.
- Hypervisor role: The hypervisor schedules virtual CPUs, maps guest memory to physical memory, emulates or assigns devices, and enforces isolation.
- Hypervisor categories:
- Type 1—bare-metal: Runs directly on hardware; examples include VMware ESXi, Microsoft Hyper-V, and Xen.
- Type 2—hosted: Runs as an application over a host OS; examples include VirtualBox and VMware Workstation.
- Resource mapping: A VM configured with four virtual CPUs does not necessarily own four cores permanently; the hypervisor schedules its vCPUs on available physical CPUs.
- Encapsulation: A VM’s configuration and virtual disks can be represented as files, supporting cloning, snapshots, migration, and backup.
- Benefits: Server consolidation, workload isolation, rapid provisioning, hardware independence, disaster recovery, and improved utilization.
- Costs: Virtualization introduces scheduling, device-I/O, and memory-translation overhead; excessive allocation can also cause CPU, memory, or storage contention.
B. x86 virtualization
x86 virtualization enables operating systems designed for x86 processors to execute in isolated virtual machines under hypervisor control.
- Privilege levels: x86 defines rings 0–3; operating-system kernels normally execute in ring 0, while applications generally execute in ring 3.
- Original difficulty: Early x86 processors contained sensitive instructions that did not always trap when executed outside ring 0, complicating classical trap-and-emulate virtualization.
- Software techniques:
- Ring deprivileging: The guest kernel runs at a lower privilege while the VMM retains control.
- Binary translation: Problematic instruction sequences are dynamically replaced with safe sequences that transfer control to the VMM.
- Hardware assistance: Intel VT-x and AMD-V introduce explicit guest execution modes and controlled exits to the hypervisor for privileged operations.
- Memory virtualization: Extended Page Tables (EPT) and Nested Page Tables (NPT) translate guest-virtual addresses through guest-physical addresses to machine-physical addresses.
- I/O virtualization: Emulated devices maximize compatibility, paravirtual drivers improve speed, and IOMMU/SR-IOV technologies support secure direct or shared device access.
- Concrete operation: If a guest modifies a privileged control register, the processor can trigger a VM exit; the hypervisor validates the request before resuming the guest.
C. Types of virtualization
Virtualization occurs at several layers, each offering a different balance of isolation, compatibility, and performance.
- Full virtualization: Presents complete virtual hardware and runs an unmodified guest OS; hardware-assisted KVM and ESXi VMs are examples.
- Paravirtualization: Modifies the guest or its drivers to issue hypercalls to the hypervisor; Xen paravirtual guests illustrate this model.
- OS-level virtualization: Containers share the host kernel but isolate processes through mechanisms such as Linux namespaces and control groups; Docker commonly packages such containers.
- Application virtualization: An application runs in an isolated package or runtime without a conventional full VM; Java bytecode executes through a Java Virtual Machine.
- Desktop virtualization: User desktops execute centrally and are accessed remotely through virtual desktop infrastructure.
- Storage virtualization: Physical disks or arrays are pooled into logical volumes, such as a logical 2 TB volume assembled from several devices.
- Network virtualization: Logical switches, routers, firewalls, overlays, and network segments are created independently of physical topology.
- Selection principle: Full VMs provide separate kernels and stronger isolation, whereas containers provide faster startup and lower resource consumption.
III. Virtual Network and Storage Segmentation
Logical segmentation divides shared network or storage infrastructure into isolated administrative domains without requiring separate physical equipment for every group.
A. VLAN
A Virtual Local Area Network logically separates one switched Ethernet network into distinct broadcast domains.
- Identification: IEEE 802.1Q inserts a tag containing a 12-bit VLAN identifier into Ethernet frames; usable normal-range identifiers commonly include 1–4094, with reserved values excluded.
- Access port: Carries traffic for one VLAN, usually toward an end device such as a workstation.
- Trunk port: Carries frames from multiple VLANs between switches, routers, or virtualization hosts using 802.1Q tags.
- Inter-VLAN communication: Devices in different VLANs require Layer 3 routing through a router or multilayer switch.
- Example: Hosts in VLAN 10 and VLAN 20 remain in separate broadcast domains even when connected to the same physical switch.
- Benefits: Reduced broadcast scope, improved security segmentation, simpler moves and changes, fault containment, and logical grouping independent of location.
- Limitation: VLANs do not replace firewalls or access controls; routing policies must still regulate traffic between segments.
B. VSAN and their benefits
A Virtual Storage Area Network partitions shared storage-network resources into logically isolated SAN fabrics or creates a logical storage pool through software-defined storage.
- Fabric partitioning: In Fibre Channel environments, a VSAN can assign switches and ports to separate logical fabrics while sharing physical switching hardware.
- Isolation: Events such as fabric reconfiguration or zoning changes in one VSAN can be contained from other VSANs.
- Zoning distinction: A VSAN separates fabrics, whereas zoning controls which initiators and storage targets may communicate inside a fabric.
- Software-defined usage: Products described as virtual SANs may aggregate local server disks and solid-state drives into distributed shared storage.
- Benefits: Better hardware utilization, administrative separation, scalable storage pools, fault isolation, simplified provisioning, and support for different service levels.
- Availability: Replicated data across nodes can remain accessible after a disk or host failure, depending on the configured replication policy.
IV. Foundations of Distributed Computation
Distributed computing uses autonomous computers connected by a network to cooperate on tasks or services. Unlike tightly coupled processors, nodes have independent memory and no perfectly shared global clock.
A. Overview of distributed computing
Distributed computing divides work and data among networked machines that communicate through messages.
- Components: Nodes, communication links, middleware, protocols, and distributed data stores form the operational environment.
- Communication: Nodes use mechanisms such as TCP sockets, remote procedure calls, REST APIs, or message queues.
- Design goals: Resource sharing, scalability, openness, concurrency, fault tolerance, and location transparency.
- Failure model: One node or link may fail while others continue, producing partial failures that are uncommon in a single-machine program.
- Latency: A local memory access is far faster than a network request, so data placement and communication frequency strongly affect performance.
- Examples: Distributed databases, content-delivery networks, search engines, cloud services, and peer-to-peer systems.
- Core challenge: Replicas must balance consistency, availability, and tolerance of network partitions; stronger consistency often requires more coordination.
B. Parallel and distributed systems
Parallel and distributed systems both use multiple processing elements, but differ in coupling, memory organization, and failure assumptions.
- Parallel systems:
- Coupling: Processors are often closely connected within one machine or supercomputer.
- Coordination: Threads may communicate through shared memory and synchronize with locks or barriers.
- Objective: Primarily reduce execution time for compute-intensive work.
- Distributed systems:
- Coupling: Independent computers communicate over a network.
- Coordination: Processes exchange messages and may continue despite individual-node failures.
- Objective: Support resource sharing, geographic distribution, scalability, and availability.
- Overlap: A distributed-memory supercomputer is both parallel and distributed: nodes exchange messages through standards such as MPI while jointly solving one computation.
V. Parallel Computing — Simultaneous Execution
Parallel computing decomposes a problem into parts that execute concurrently on multiple cores, processors, or accelerators to improve speed or throughput.
A. Parallel computing
Effective parallel computing requires sufficient independent work and controlled communication and synchronization costs.
- Data parallelism: The same operation is applied to different data partitions; a GPU may add corresponding elements of thousands of vector entries concurrently.
- Task parallelism: Different operations execute simultaneously, such as reading input, processing records, and writing output in a pipeline.
- Granularity: Fine-grained tasks communicate frequently, while coarse-grained tasks perform more computation between interactions.
- Speedup: Performance improvement is measured by:
S(p) = T(1) / T(p)S(p)is speedup usingpprocessors.T(1)is serial execution time.T(p)is execution time withpprocessors.
- Amdahl’s law: If fraction
fis parallelizable, maximum speedup is:
S(p) = 1 / ((1 - f) + f/p)With f = 0.90 and p = 10, speedup is 1/(0.10 + 0.09) ≈ 5.26, not tenfold.
- Hazards: Race conditions, deadlocks, load imbalance, communication overhead, and false sharing can eliminate expected gains.
VI. Processor Organization for Parallelism
Hardware architecture determines how processors access memory, exchange data, and scale across workloads.
A. Parallel computer architecture
Parallel architectures are classified by instruction streams, data streams, memory organization, and interconnection structure.
- Flynn’s taxonomy:
- SISD: One instruction stream processes one data stream.
- SIMD: One instruction operates on many data elements; GPUs and vector units are typical.
- MIMD: Multiple processors execute different instructions on different data; multicore servers are examples.
- Shared-memory architecture: Processors address a common memory space; cache-coherence protocols maintain compatible views of cached data.
- UMA and NUMA: Uniform Memory Access has similar access cost across memory, while Non-Uniform Memory Access makes local memory faster than remote-socket memory.
- Distributed-memory architecture: Each node has private memory, so programs exchange data explicitly, commonly through MPI messages.
- Interconnects: Buses are simple but limited; rings, meshes, fat trees, and switched fabrics provide greater scalability.
- Performance measures: Throughput may be expressed in FLOPS, while memory bandwidth uses units such as GB/s; architecture must match the workload’s bottleneck.
VII. Distributed Systems — Coordinated Independent Nodes
A distributed system presents cooperating networked computers as a coherent service despite concurrency, variable latency, and partial failure.
A. Distributed systems
Distributed-system design focuses on communication, naming, replication, consistency, security, and recovery.
- Architectures: Client-server, multi-tier, peer-to-peer, microservices, and publish-subscribe models organize responsibilities differently.
- Logical time: Lamport clocks order causally related events without assuming perfectly synchronized physical clocks.
- Replication: Multiple copies improve availability and read capacity, but updates require consistency protocols.
- Consensus: Algorithms such as Raft allow nodes to agree on an ordered log despite some failures, normally requiring a majority.
- Fault tolerance: Timeouts, retries, redundancy, failover, and idempotent operations address unavailable nodes and lost messages.
- Scalability: Horizontal scaling adds nodes; sharding divides records by a key, such as customer ID, across servers.
- Security: Authentication, authorization, encryption in transit, and service identity are necessary because communication crosses machine boundaries.
VIII. Comparative Computing Models
Computing paradigms differ in ownership, coupling, scale, communication, provisioning, and primary purpose.
A. Comparison of different computing paradigms
The appropriate paradigm depends on whether the priority is latency, speedup, availability, geographic reach, elasticity, or administrative control.
| Paradigm | Organization | Main strength | Typical limitation | Example |
|---|---|---|---|---|
| Centralized | One primary computer | Simple control and consistency | Single bottleneck or failure point | Traditional mainframe |
| Parallel | Multiple processing units cooperate on one problem | Faster computation | Synchronization and serial portions | Multicore simulation |
| Distributed | Independent networked nodes | Scalability and fault tolerance | Partial failures and latency | Distributed database |
| Cluster | Similar colocated machines | High performance or availability | Local administrative boundary | HPC cluster |
| Grid | Federated resources across organizations | Large-scale resource sharing | Heterogeneity and coordination | Scientific grid |
| Cloud | On-demand virtualized resources | Elasticity and measured service | Provider dependence and variable cost | Public-cloud VM |
| Edge | Processing near data sources | Low latency and reduced network traffic | Limited device capacity | Industrial IoT gateway |
- Key contrast: Virtualization concerns how resources are abstracted; parallelism concerns simultaneous execution; distribution concerns coordination across independent machines.
- Combined use: A cloud service may run containers inside VMs, distribute replicas across regions, and use parallel threads within each instance.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →