Operating System

Introduction to Operating Systems

  • Definition: OS acts as an intermediary between users and computer hardware.

Course Content

  • What is an OS.

  • Key Functions of an OS.

  • Evaluation of OS.

  • Popular Types of OS.

  • Basics of UNIX and Windows.

  • Advantages of open-source OS like Linux.

  • Networking OS.

What is an Operating System?

  • Components of Computer System:

    • Hardware + Software.

    • Software further divided into Application Software and System Software (OS).

  • Goals of OS:

    • Execute user programs.

    • Enhance user convenience.

    • Utilize computer hardware efficiently.

The Structure of Computer Systems

  • Layered Access:

    • Computer resources divided into layers.

    • Layers interact only with adjacent layers.

  • Installing New Hardware:

    • No changes required for user applications.

    • Changes needed in the OS for new device drivers.

  • Installing New Software:

    • No hardware changes needed.

    • OS support essential for new applications.

  • Changing Operating Systems:

    • Ensure compatibility of applications and hardware.

Operating System Modes

  • User Mode: Interface for user interaction, manages running applications and file accesses.

  • Kernel Mode: Manages background operations, controls hardware, processes program instructions.

  • System Calls: Mechanism to switch from User Mode to Kernel Mode.

Kernel

  • Definition: Central core of the OS, first loaded during boot.

  • Memory Management: Loads into protected memory throughout the session.

  • Functionality: Handles processes and interrupts.

  • Memory Separation: User memory and Kernel memory kept separate.

    • Interactions happen via SHELL and other programs.

Kernel Components

  • Scheduler: Allocates processing time to various processes.

  • Supervisor: Grants resource access to processes.

  • Interrupt Handler: Manages hardware requests for kernel services.

  • Memory Manager: Allocates memory space for users.

  • Services Provided: Process, file, I/O, and memory management through system calls.

System Call

  • Definition: Requests services from kernel by user applications.

  • Purpose: Facilitates I/O, memory allocation, process creation, etc.

  • Alternative Name: Also referred to as software-interrupts.

Starting an Operating System (Booting)

  • Boot Process Steps:

    1. Power On Switch activates motherboard.

    2. BIOS takes control for initial diagnostics.

    3. BIOS conducts POST to verify functionality.

    4. Locates MBR on primary hard disk.

    5. Executes Bootstrap Loader to start OS.

    6. Early Kernel Initialization activates kernel core and necessary drivers.

BIOS

  • Definition: Firmware stored on ROM/EPROM chip.

  • Accessing BIOS: Pressing del, F2, or F10 during boot.

  • Functionality: Cycles through storage devices to find boot-loader.

UEFI

  • Purpose: Replaces BIOS, uses .efi files for initialization.

  • Advantages Over BIOS:

    • Supports larger drives.

    • Faster boot times.

    • Discrete driver support.

    • Enhanced security features such as 'Secure Boot.'

    • Supports 32/64 bit operation and GUI.

Functions of Operating System

  • Types of Functions:

    • User Interface

    • Process Management

    • Security and Protection

    • I/O Management

    • Memory Management

    • File Management

Process Management

  • Definition: A process is a program in execution requiring resources (CPU, memory, etc.).

  • Basic Functions: Creation, execution, and termination of processes.

  • Concurrency Issues: Synchronization of dependent processes; memory overlap concerns for independent processes.

  • Prioritization: Important processes prioritized for execution.

Memory Management

  • Definition: Memory- an array of accessible data for CPU and I/O devices.

  • Characteristics: Main memory is volatile; utilizes virtual memory systems.

  • OS Responsibilities:

    • Track memory usage.

    • Allocate/deallocate memory as needed.

File Management

  • Definition: Files are collections of related information.

  • File Systems: Various types include FAT12, FAT16, NTFS, EXT3, HFS+.

  • OS Responsibilities:

    • Create/delete files and directories.

    • Facilitate file manipulation and storage mapping.

    • Backup files on non-volatile media.

I/O Management/Device Management

  • Device Management: Interfaces between CPUs and devices using drivers.

  • Interrupt Controller: Manages and prioritizes hardware requests.

  • Deadlocks: Can occur when multiple processes hold I/O resources needed by others.

  • Functions: Tracks devices, allocates access time, manages effective allocation, and deallocates unused devices.

Security and Protection

  • Methods: Use of passwords, access rights to protect user data.

  • Multi-user Systems: Must prevent data interference between concurrent processes.

User Interface Mechanisms

  • Types of UIs:

    • Command Line Interface (CLI)

    • Graphical User Interface (GUI)

History of Operating Systems

  • First Generation (1940s-50s): No OS; programming in machine language.

  • Second Generation (1955-65): Introduction of GMOS, single-stream batch systems.(IBM's 701)

  • Third Generation (1965-80): Emergence of multiprogramming and minicomputers.

  • Fourth Generation (1980-Present Day): Rise of PCs, Windows/Mac OS emergence.

Types of Operating Systems

    1. Batch OS

    1. Multiprogramming OS

    1. Time-Sharing OS

    1. Multiprocessing OS

    1. Distributed OS

    1. Network OS

    1. Real-Time OS

    1. Embedded OS

Batch Operating Systems

  • Characteristics: Users don't interact directly. Tasks grouped into batches.

  • Advantages: Predictable job duration, shared resources.

  • Disadvantages: Requires skilled operators, hard to debug.

Multiprogramming Operating Systems

  • Definition: Executes multiple jobs simultaneously using a single processor.

  • Functionality: Increases CPU utilization through job scheduling.

Time-Sharing Operating Systems

  • System Definition: Allocates time for tasks to ensure smooth operations.

  • Characteristics: Multi-tasking capabilities; each task has a time quantum.

Time-Sharing OS Advantages / Disadvantages

  • Advantages: Equal opportunities for tasks, reduced CPU idle time.

  • Disadvantages: Reliability, security, and data communication issues.

Multiprocessor Operating Systems

  • Characteristics: Multiple processors share resources for concurrent processing.

  • Features: Fault tolerance, inter-process communication.

Distributed Operating Systems

  • Characteristics: Interconnected autonomous computers sharing a network.

  • Example Systems: Locus, DYSEAC.

Network Operating Systems

  • Definition: Manages data and applications through a server for client systems.

  • Advantages: Centralized stability, easy technology integration.

  • Disadvantages: Cost, dependence on server.

Real-Time Operating Systems

  • Definition: Quick response to input; strict time requirements.

  • Examples of Use: Missile systems, air traffic control, robotics.

Embedded Operating Systems

  • Definition: Built into electronic circuitry of devices.

  • Examples: Found in automobiles, medical devices, smartphones.

Popular Types of OS

  • Desktop Class: Windows, OS X, Linux.

  • Server Class: Windows Server, UNIX/Linux.

  • Mobile Class: Android, iOS, Windows Phone.

Specific Operating Systems Overview

  • Ms-DOS: Basic single-user, single-tasking OS with command-line interface.

  • Microsoft Windows: Best known graphical desktop OS with extensive application support.

  • Mac OS: User-friendly OS for Mac hardware with various applications.

  • Linux: Open-source, customizable OS, free to use and modify.

  • Google Chrome OS: Thin client OS designed for minimal hardware functionality.

Server Operating Systems Overview

  • Windows Server: Familiar GUI and mature server capabilities.

  • UNIX: Stable, time-tested with a large community support.

  • Linux Server: Free and customizable with extensive utilities.

Tablet and Phone Operating Systems

  • System-on-Chip (SoC): Preinstalled operating systems on portable devices.

  • Popular SoCs: iOS and Android with app store functionalities.

Advantages of Linux Operating System

  1. Open Source: Allows customization and redistribution.

  2. Security: Less vulnerability and requires no antivirus.

  3. Free: No licensing costs.

  4. Lightweight: Low memory and disk space requirements.

  5. Stability: High uptime with no need for frequent reboots.

  6. Performance: Handles many users simultaneously.

  7. Flexibility: Used across various applications and environments.

  8. Fast Software Updates: User-controlled updates.

  9. Multiple Distributions: Offers various versions according to user needs.

  10. GUI Support: Provides user-friendly interfaces.

  11. Suitable for Programmers: Supports multiple programming languages.

  12. Community Support: Access to forums and documentation.

  13. Privacy: Minimal data collection from users.

  14. Networking: Excellent support for networking tasks.

  15. Installation Ease: Quick and easy installation process.

  16. Multitasking: Runs multiple tasks without performance loss.

  17. Documentation: Extensive resources for beginners.