Operating Systems Overview

Importance of Operating Systems

  • Enables user interface with hardware; without it, users cannot effectively interact with computers.

Computers Without Operating System

A computer without an operating system cannot effectively interact with users or hardware. The operating system is essential as it enables user interface with the computer's components. Without an operating system, users lack the necessary tools to manage files, execute programs, and perform tasks, rendering the computer largely non-functional from a user perspective. It acts as a crucial intermediary, ensuring efficient communication between the software and hardware of the computer.

Key Functions of an Operating System

  • User Interaction: Users primarily interact through a graphical user interface (GUI) rather than directly with binary code.

  • System Software: The operating system is the core system software that allows execution of programs and tasks on a computer.

System Functions

  • Process Management:

    • The OS creates, schedules, and terminates processes. Manages how many processes can run simultaneously.

    • Concurrent vs. Parallel Processing: Enables running multiple processes or threads simultaneously on modern computers.

    • Interprocess Communication (IPC): Allows processes to share data and communicate efficiently.

  • Memory Management:

    • Keeps track of how memory is used and allocates resources for running processes.

    • Prevents interference between processes by assigning separate memory spaces.

  • File Management:

    • Organizes files and directories on a disk. Users can create, move, copy, and delete files via the OS.

    • Provides metadata for files like size, date created, and permissions.

  • Input/Output Management:

    • Manages devices (printers, keyboards, etc.) and their drivers to facilitate communication between hardware and software.

    • Prioritizes tasks based on user commands and system requirements (plug and play).

Booting Process

  • Bootstrapping: The OS is responsible for initiating the startup process of a computer. It's crucial for loading the kernel - the core part of the OS that manages everything.

Types of Operating Systems

  • Single User Systems: Personal PCs and Workstations (Windows, MacOS, Linux).

  • Mobile OS: Designed for handheld devices (Android, iOS). Handles constraints like memory size and battery power.

  • Mainframe Systems: Used for large-scale operations, capable of handling many users and transactions.

  • Embedded Systems: Specialized systems in appliances (e.g., microwaves, washing machines).

  • Distributed Systems: Multiple computers working together to achieve a goal (e.g., cloud computing).

System Architecture

  • The kernel is the core part of an operating system (OS) that manages system resources and facilitates communication between hardware and software. It is responsible for critical functions such as process management, memory management, and device management. The kernel operates in a privileged mode, allowing it to execute low-level tasks that require direct access to hardware components. There are various types of kernels:

    Kernel Types:

    • Monolithic: All system functions run in the kernel space, leading to better performance but lower stability.

    • Microkernel: Minimal kernel; other functions operate outside it for better security and stability.

    • Hierarchical: Divides functions into layers, enhancing maintainability.

User Interfaces

  • Graphical User Interface (GUI): Beginner-friendly, uses icons and menus for user interaction.

  • Command-Line Interface (CLI): Requires memorization of commands for more advanced operations.

Security Features

  • Protects system integrity by preventing unauthorized access and modifications. Implements authentication and profile permissions for users to manage security effectively.


Hypervisors

Hypervisors are critical components in virtualization technology, allowing multiple virtual machines (VMs) to run on a single physical machine. They are broadly categorized into two types: Type 1 hypervisors and Type 2 hypervisors.

1. Type 1 Hypervisors (Bare-Metal Hypervisors)
  • Definition: Type 1 hypervisors run directly on the host's hardware without the need for an underlying operating system. This provides better performance and efficiency as they have direct access to the hardware resources.

  • Functionality:

    • Manage and allocate resources to various VMs efficiently.

    • Offer better performance, stability, and scalability compared to Type 2 hypervisors due to lower latency; there’s no intermediary OS.

    • Often utilized in server environments.

  • Examples:

    • VMware ESXi

    • Microsoft Hyper-V

    • Xen

2. Type 2 Hypervisors (Hosted Hypervisors)
  • Definition: Type 2 hypervisors run on top of an existing operating system and rely on the host OS for resources and management.

  • Functionality:

    • Easier installation and configuration, appealing for desktop virtualization.

    • Performance can be affected by the host operating system as it introduces an additional layer of complexity.

    • Generally preferred for development, testing, or desktop users rather than production environments.

  • Examples:

    • VMware Workstation

    • Oracle VirtualBox

    • Parallels Desktop

Key Differences
  • Performance: Type 1 is more efficient due to direct access to hardware, while Type 2 suffers from overhead due to the host OS.

  • Usage Scenarios: Type 1 hypervisors are commonly used in data centers and enterprise environments, while Type 2 hypervisors are more popular for personal use and testing purposes.

  • Management: Type 1 hypervisors offer more advanced resource management capabilities suitable for enterprise workloads, while Type 2 hypervisors tend to be simpler and user-friendly.