Computer Systems Fundamentals - Notes

Operating Systems Overview

  • Definition: Operating systems (OS) control the operation of hardware in a computer.
  • Every computer requires an OS.
  • Roles of Human Users: The OS acts as the intermediary between the user and the hardware, functioning much like a king or director overseeing computer operations.
  • Types of Operating Systems: Different OS types exist for various purposes, each tailored to specific hardware and user needs.
  • Functions of OS:
    • File Management: Handling data storage and file systems.
    • Memory Management: Allocating and managing memory resources.
    • Process Management: Overseeing the execution of processes.
    • Input/Output Functionality: Managing device input and output.
    • General Purpose Functions: Providing system information such as system status and user resources.

Operating System Interactions

  • OS interacts with different components:
    • Human Users
    • Application Software
    • Other System Software
    • Hardware

Types of Operating Systems

  • Classification Criteria:
    • Type of hardware they run on.
    • Number of programs that can be active simultaneously.
    • Type of interaction allowed.
  • Microcomputer OS Requirements:
    • Initialize the system, manage memory, and data transfer between peripherals.
  • Minicomputer OS Requirements:
    • Support for resource sharing and multi-user systems.
  • Mainframe Computer OS Requirements:
    • Capability to run multiple programs and handle input/output through dedicated controllers.

Operating System Types

  • Single-Programmed OS: Where one process is executed at a time (e.g., MS-DOS).
  • Multi-Programmed OS: More than one process in memory at once, capable of resource sharing and user protection (e.g., Windows).
  • Batch Processing System: Efficiencies where jobs are submitted in batches without user interaction.
  • Interactive System: Users can interact with processes, with options for single or multi-user environments.
  • Real-Time Systems: Built for time-critical applications such as telecommunications and air traffic control.

Functions of the Operating System

  • Principal Functions:
    • File Management: Handling filenames, directories, and files as collections of related data.
    • Process Management: Creating, scheduling, and terminating processes, as well as managing inter-process communication.
    • Memory Management: Allocating, deallocating, and protecting memory usage between processes to prevent conflicts.
    • Input/Output Functionality: Converting user requests into actions for input/output operations.
    • General Purpose Functions: Managing system information including process queues and system timestamps.

Process Management

  • Process Lifecycle:
    • A process is an instance of a program in execution needing CPU resources.
    • States of a process include: New, Ready, Running, Waiting, Terminated.
  • Scheduling Approaches:
    • First Come, First Served (FCFS): Processes execute in order of arrival.
    • Shortest Job Next (SJN): Selects the shortest process to execute next.
    • Round Robin: Uses time slices to provide fair CPU time among processes.

Memory Management

  • Concepts:
    • Logical vs. Physical Addressing: Logical addresses are generated by the CPU, while physical addresses refer to actual memory locations.
    • Memory Partitioning: Fixed-size vs. Variable-size allocation methods to manage memory effectively.
    • Memory Management Techniques:
    • Best-Fit Method: Allocates memory to the smallest suitable partition to minimize wasted space.
    • Worst-Fit Method: Allocates to the largest hole in memory to maximize usable large spaces.
    • First-Fit Method: Allocates the first available space that is sufficient, though it may lead to fragmentation.
  • Paged Memory Management: Divides processes into pages of fixed size, tracked by a Page-map Table (PMT).
    • Demand Paging: Pages are loaded into memory as needed.
    • Swapping / Virtual Memory: Utilizes hard disk space as an extension of RAM when processes exceed available memory.