0% found this document useful (0 votes)
15 views

Linux & Virtualization

Uploaded by

wikaka6903
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Linux & Virtualization

Uploaded by

wikaka6903
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Virtualization, Hypervisor & Linux

What is Virtualization?

Consider your computer as an office workspace. Without virtualization, it operates like a single employee
handling one task at a time. With virtualization, it transforms into a versatile executive managing multiple
projects concurrently. Each virtual instance is like having separate departments working independently –
marketing, finance, and development – all within the same office space.

Virtualization optimizes your computer's efficiency, allowing it to seamlessly handle diverse tasks without
any interference. It's the corporate strategy for digital multitasking, ensuring a smooth workflow in the
professional arena.

What is Hypervisor?

A hypervisor, also known as a Virtual Machine Monitor (VMM), is the unsung hero of the virtualization world.
Think of it as the wise conductor orchestrating the symphony of virtual parties on your computer. This
software layer sits between the hardware and the virtual instances, ensuring that each virtual machine (VM)
believes it's the star of the show.

The hypervisor is like a traffic cop for computing resources, allocating CPU, memory, and other hardware
goodies to each VM with precision. It creates a harmonious environment where multiple operating systems
and applications can coexist peacefully, each within its own isolated bubble.

There are two types of hypervisors: Type 1 (bare-metal) hypervisors run directly on the hardware, while
Type 2 (hosted) hypervisors operate on top of an existing operating system. Regardless of the type, the
hypervisor is the maestro of the virtualization orchestra, ensuring a smooth performance for all the virtual
machines under its command. It's the unsung hero, silently enabling the magic of virtualization to unfold.

Types of Hypervisors

1. Type 1 Hypervisor (Bare-Metal Hypervisor):


➢ Direct to the Source: This hypervisor takes a direct approach, installing directly on the physical
hardware of the host system.
➢ Maximum Efficiency: Since it operates without the need for an underlying operating system, it
maximizes resource utilization and is considered more efficient.
➢ Mission-Critical: Ideal for enterprise-level environments and mission-critical systems where
performance and reliability are paramount.
➢ Examples: VMware ESXi, Microsoft Hyper-V Server, KVM.

2. Type 2 Hypervisor (Hosted Hypervisor):


➢ Riding on OS Coattails: This hypervisor sits on top of an existing operating system, essentially
piggybacking on it.
➢ User-Friendly: Generally, more user-friendly and easier to set up, making it suitable for
development and testing environments.
➢ Resource Overhead: Can introduce a bit of resource overhead since it has to share resources with
the underlying operating system.
➢ Examples: VMware Workstation, Oracle VirtualBox, Parallels.
In essence, whether you go for the direct and efficient Type 1 hypervisor or the user-friendly Type 2
hypervisor depends on your specific needs. It's like choosing between a high-performance sports car (Type
1) or a versatile, everyday vehicle (Type 2) based on the journey you're embarking on in the virtualization
landscape.

Figure 1: Hypervisors Type

What is Linux?

Linux is an open-source operating system renowned for its stability, security, and versatility. It serves as the
digital backbone for a multitude of devices, from servers and smartphones to embedded systems.

As an alternative to proprietary systems, Linux empowers users with customizable and efficient computing,
making it a favorite for developers, enterprises, and tech enthusiasts alike. In the world of operating systems,
Linux stands out as a robust and collaborative force, embodying the principles of open-source innovation.

Types of Linux distribution

Linux distributions, commonly known as distros, come in various types, each tailored to specific user
preferences and purposes.

1. Desktop Linux:
a. User-Friendly: Includes distributions such as Ubuntu and Linux Mint, tailored for a smooth
desktop experience.
b. Lightweight: Examples like Xubuntu and Lubuntu cater to resource-efficient desktop
environments.
c. Specialized: Kubuntu and Ubuntu Studio serve specific desktop needs, emphasizing the
KDE desktop and multimedia production, respectively.
2. Server Linux:
a. Enterprise: Red Hat Enterprise Linux (RHEL) and CentOS are recognized for robustness in
enterprise server environments.
b. Community: Debian and Ubuntu Server are widely adopted community-driven choices for
server deployments.
c. Specialized: openSUSE and Arch Linux offer specialized server configurations to
accommodate various requirements.
3. IoT Linux:
a. General IoT: Raspbian (for Raspberry Pi) and Ubuntu Core are designed for general Internet
of Things applications.
b. Embedded Systems: OpenEmbedded and Yocto Project provide solutions for developing
embedded systems.
c. Industrial IoT (IIoT): Wind River Linux is tailored for industrial IoT applications demanding
high reliability.
4. Container Orchestration (Kubernetes):
a. Example: While not a Linux distribution, Kubernetes is a widely used container
orchestration platform often deployed on Linux systems.
5. Special Linux:
a. Source-Based: Gentoo is known for its source-based nature, allowing users fine-grained
control over system optimization.
b. RPM-Based: openSUSE and Mageia use the RPM packaging system, providing a
standardized approach to software management.
c. Slackware-Based: Slackware, one of the earliest Linux distributions, is recognized for its
simplicity and minimalism.
d. Pacman-Bases: Arch Linux is know for the pacman based distro, knowing for it’s Arch User
Repositories and community support.

Understanding Linux architecture

Linux OS is composed of several components which work in accordance to keep the system running. Let's
discuss them below.

Figure 2: Components of Linux OS


- Hardware: Peripheral devices such as RAM, HDD, CPU, are part of the hardware layer. They receive
function calls from the kernel to perform the desired operations.
- Kernel: The core part of an operating system is the kernel. Kernels are responsible for the execution,
controlling, and allocating memory of processes in a system. It directly interacts with the machine
hardware and hides the low-level details during the execution of programs.
- Shell: Shell is an interface between a user and a kernel, which takes commands from the user and
executes them according to the kernel's functionality. This interface makes sure that the user gives
the required commands only.
- System Utilities and Applications: System utilities and other applications are the software that
send kernel commands to perform required operations.

Figure 3: Architecture of Linux System

Types of Kernels

Monolithic Kernel: Imagine the monolithic kernel as the superhero manager of your computer, doing it all –
juggling tasks, managing memory, and talking directly to computer parts. It's like a multitasking hero, but if
you need to fix or update something, it's a bit like searching for a needle in a haystack. Examples include
the Linux kernel versions before 3.0.

Hardware Kernel: Hardware is the behind-the-scenes hero turning your computer's digital instructions into
the real stuff on your screen. It's the wizard behind the curtain, making sure your computer follows your
commands. Examples are your computer's processor, memory, and graphics card.

Microkernel: Now, picture a team of specialized heroes, each with its own superpower. The microkernel is
like having this team. It keeps the basic functions simple and assigns specific tasks to these special heroes.
Need to make changes? You just bother the hero in charge, making updates more like adding a new power
to the team. Examples include the QNX operating system.

Hybrid Kernel: In the computer world, the hybrid kernel is like a multitasking maestro. It's a smart mix of
doing lots of things at once and calling in specialists when needed. Picture it as a computer hero that's good
at everyday tasks but can also bring in experts for specific jobs. The Windows NT kernel, making modern
Windows tick, is a great example. So, the hybrid kernel gives your computer the best of both – it can handle
many tasks smoothly and bring in specialists for the tricky stuff.
In computer land, the monolithic kernel is the multitasking hero (like old Linux versions), hardware is the
behind-the-scenes wizard (processor, memory, etc.), the microkernel is your team of special heroes (like
QNX), making sure everything runs smoothly and the hybrid kernel is the modern kernel, making it’s
specialization in multitasking.

Understanding Linux Directory

In the Linux file system, directories are like digital filing cabinets where you organize your files. Each
directory has a specific purpose and contains files or additional directories. Here are some key directories
commonly found in Linux:

1. / (Root Directory):
- Purpose: The big boss directory.
- Example: `/` (Where it all begins).
2. /bin:
- Purpose: The superhero command center.
- Example: `/bin/ls` (The list-files superhero).
3. /boot:
- Purpose: The launchpad for the computer spaceship.
- Example: `/boot/vmlinuz` (The spaceship kernel).
4. /dev:
- Purpose: The backstage pass to all the gadgets.
- Example: `/dev/sda` (The first rockstar hard drive).
5. /etc:
- Purpose: The secret lair of system settings.
- Example: `/etc/motd` (The message of the day, a secret code perhaps).
6. /home:
- Purpose: The cozy neighborhood of user homes.
- Example: `/home/alice` (Where Aayush hangs her digital hat).
7. /lib and /lib64:
- Purpose: The library of magical spells.
- Example: `/lib/libc.so.6` (The enchanted C library).
8. /media:
- Purpose: The red carpet for USB celebrities.
- Example: `/media/usb` (Where USB stars make an entrance).
9. /mnt:
- Purpose: The temporary campground for digital explorers.
- Example: `/mnt/cdrom` (CD-ROMs camping under the stars).
10. /opt:
- Purpose: The VIP lounge for optional software.
- Example: `/opt/party-app` (Where the optional party app resides).
11. /proc:
- Purpose: The carnival with information booths.
- Example: `/proc/cpuinfo` (Where CPUs spill the beans).
12. /root:
- Purpose: The mansion of the root user.
- Example: `/root` (Root's exclusive digital abode (home)).
13. /run:
- Purpose: The bustling runtime street.
- Example: `/run/pizza-delivery` (Where the pizza runtime is in full swing).
14. /sbin:
- Purpose:* The superhero toolkit.
- Example: `/sbin/reboot` (The reboot superhero).
15. /srv:
- Purpose: The service-themed amusement park.
- Example: `/srv/database` (The thrilling db server ride).
16. /sys:
- Purpose: The space station for kernel secrets.
- Example: `/sys/class/gov` (Classified gov information).
17. /tmp:
- Purpose: The playground for temporary fun.
- Example: `/tmp/funapp ` (A temporary application having a blast).
18. /usr:
- Purpose: The bustling city of user-related programs.
- Example: `/usr/bin/ninja` (Where digital ninjas train).
19. . /var:
- Purpose: The virtual amusement park with variable rides.
- Example: `/var/log/releaseapp` (Log entries from the app relase).
20. /swap:
- Purpose: The magical extra room where your computer can temporarily store things when it runs
out of space in the regular places.
- Example: `/swap` (The secret hideout for digital treasures when memory is full).

Figure 4: listing out `/`

These directories create a structured organization for files in a Linux system, making it easier to navigate
and manage the various components of the operating system. Understanding the purpose of each directory
helps users maintain a well-organized and functional file system.

You might also like