ch19
Chapter 19: The Internal Operating System
Overview
Understanding the internal mechanisms and architectures that allow operating systems (OS) to function effectively is crucial for both system developers and users. This chapter delves into the fundamental requirements and components of an operating system, focusing on its operation and management.
Fundamental OS Requirements
An OS is vital for managing resources, providing a user interface, and facilitating interaction between hardware and software components.
Starting the Computer System: The Bootstrap
Bootstrap Process: The OS initializes through a bootstrap loader (also called mini-loader or Initial Program Load - IPL).
Booting Procedure: The loader searches for the OS program in a specified location, such as a hard disk or network.
Execution Flow: Once the OS is loaded into RAM, control is transferred to the OS entry point, starting the execution of user programs.
Boot Types:
Cold Boot: Checks all hardware and retests the system.
Warm Boot: Skips hardware tests for quicker restarts.
Processes and Threads
Process
Definition: The fundamental unit of work managed by the OS, consisting of a program and its resources.
Process Control: Creation via methods like forking or cloning, involving parent-child relationships and unique identifiers (PID).
Process States
Primary States: Ready, Running, Blocked.
State Transitions: Mechanisms of switching states, including Dispatching (Ready to Running) and Wake-up (Blocked to Ready).
Extended States: Includes suspend and swapped states.
Threads
Threads are mini-processes sharing the same resources within a parent process, leading to reduced overhead compared to independent processes.
Each thread has its own context but accesses shared memory, files, and I/O devices efficiently.
CPU Scheduling and Dispatching
Objectives of Dispatching
Ensure fairness.
Maximize throughput.
Minimize turnaround time.
Optimize CPU utilization.
Allow graceful degradation and provide minimal response times.
Prevent starvation.
Scheduling Types
Non-preemptive Scheduling: Includes First-Come, First-Served (FCFS), Shortest Job First (SJF), and Priority-based scheduling.
Preemptive Scheduling: Includes Round Robin and Multilevel Feedback Queues, adapting based on process characteristics.
Memory Management
Goals and Techniques
Efficiently load programs while minimizing waste through techniques such as partitioning (fixed/variable space allocation) and handling fragmentation (internal and external).
Virtual Memory Concepts
Virtual Memory: Augments system memory using hard disk space, supporting processes and efficient memory address management.
Demand Paging: Pages are loaded into memory as needed, aided by page tables.
Page Fault Handling: When a page fault occurs, the system must execute specific procedures to address the situation, leveraging the concept of locality.
Secondary Storage Scheduling for Disks
Various algorithms including FCFS, Shortest Distance First, and Scan methods are critical for optimizing disk management tasks.
Network Operating System Services
Services include file transfer programs, data access, print services, and enhanced security measures crucial for network efficiency.
Other Operating System Issues
Deadlock Handling: Strategies for prevention and detection of situations where processes compete for resources without success.
Process Synchronization: Ensures cooperative processes coordinate their actions effectively.
Virtual Machines and Hypervisors
Virtual Machines: Understand virtualization and its advantages in managing computing resources effectively.
Types of Hypervisors:
Type 1 (Native): Runs directly on the hardware.
Type 2 (Hosted): Runs on a host operating system, offering different operational mechanisms.
Copyright Information
The textbook has specific reproduction limitations and permissions detailed under copyright guidelines.