Topic: Introduction to Operating Systems
1. CONCEPT OF OPERATING SYSTEMS
Definition
An Operating System (OS) is a system software that acts as an intermediary (interface)
between a computer user and the computer hardware. It manages the computer’s resources
and provides a platform for application programs to run.
Key Objectives
• Convenience: To make the computer system easy and friendly to use.
• Efficiency: To manage the hardware resources (CPU, Memory, I/O) in the most efficient
manner.
• Throughput: To maximize the number of tasks completed per unit of time.
The OS as a Resource Manager
The OS manages:
1. Process Management: Allocation of CPU time to various tasks.
2. Memory Management: Keeping track of primary memory (RAM) and allocating it to
programs.
3. Storage Management: Organizing data into files and directories on disks.
4. Device Management: Controlling hardware like printers, monitors, and keyboards.
2. GENERATIONS OF OPERATING SYSTEMS
The evolution of OS is categorized based on the hardware technology used:
• First Generation (1945–1955): Used Vacuum Tubes. There was no OS; programmers
interacted directly with hardware using plugboards.
• Second Generation (1955–1965): Used Transistors. Introduction of Batch Processing
Systems, where jobs were collected on cards/tapes and processed in groups.
• Third Generation (1965–1980): Used Integrated Circuits (ICs). This era introduced
Multiprogramming, allowing the CPU to work on multiple jobs by switching between
them.
• Fourth Generation (1980–Present): Used VLSI (Very Large Scale Integration). This led
to the creation of Personal Computers (PCs), Graphical User Interfaces (GUI), and
Networked Systems
3. TYPES OF OPERATING SYSTEMS
A. Batch Operating System
Users do not interact with the computer directly. Similar jobs are grouped together (Batched)
and executed one by one.
• Advantage: Reduced setup time for similar jobs.
• Disadvantage: No direct interaction; CPU often sits idle during I/O.
B. Multiprogramming System
The OS keeps several jobs in the main memory simultaneously. If the current job waits for an I/O
operation (like printing), the OS switches the CPU to another job.
• Goal: To keep the CPU Utilization as high as possible.
C. Time-Sharing (Multitasking) System
A logical extension of multiprogramming. The CPU executes multiple jobs by switching among
them so frequently that users can interact with each program while it is running.
• Key Concept: Uses a Time Quantum (small time slice).
D. Real-Time Operating System (RTOS)
Used in environments where data must be processed within a strict time constraint.
• Hard RTOS: Guarantees task completion on time; delays lead to total system failure
(e.g., Missile Guidance).
• Soft RTOS: Missing a deadline is discouraged but not fatal (e.g., Live Video Streaming).
4. OPERATING SYSTEM SERVICES
To ensure efficient execution and user convenience, the OS provides these essential services:
1. Program Execution: Loading a program into RAM and running it.
2. I/O Operations: Handling inputs from keyboards and outputs to screens or disks.
3. File System Manipulation: Managing the creation, deletion, and searching of files.
4. Communications: Managing data exchange between processes (Inter-Process
Communication).
5. Error Detection: Identifying hardware malfunctions or software bugs (e.g., "Division by
zero").
6. Resource Allocation: Distributing CPU cycles and memory to different users/jobs.
5. SYSTEM CALLS
Definition
A System Call is the programmatic way in which a computer program requests a service from
the Kernel of the Operating System. It is the entry point into the OS.
Types of System Calls
• Process Control: fork() (create process), exit() (terminate), wait().
• File Management: open(), read(), write(), close().
• Device Management: request(), release().
• Information Maintenance: get_time(), set_date().
• Communication: pipe(), create_connection().
6. STRUCTURE OF AN OPERATING SYSTEM
A. Monolithic Structure
The entire OS is a single, large program where all services run in the Kernel Mode.
• Pros: High performance (fast communication).
• Cons: If one service (like a driver) fails, the entire system crashes.
B. Layered Approach
The OS is divided into layers ($L_0$ to $L_n$). Layer 0 is the Hardware; the highest layer is the
User Interface.
• Pros: Easy to debug and maintain (modularity).
• Cons: Performance overhead due to passing through multiple layers.
C. Microkernel Structure
Only the most essential services (IPC, Memory Management) are kept in the Kernel. Other
services (File system, Drivers) run in User Space.
• Pros: Highly stable and secure.
• Cons: Slower due to frequent communication between user and kernel space.
7. CONCEPT OF VIRTUAL MACHINE (VM)
Definition
A Virtual Machine is a software implementation of a computer that executes programs like a
physical machine. It provides an "illusion" of multiple independent computers running on a
single physical hardware.
Components
• Host OS: The primary OS installed on the hardware.
• Guest OS: The OS running inside the VM.
• Hypervisor (Virtual Machine Monitor): The software layer that manages hardware
resources among different VMs (e.g., VMware, Xen).
Benefits
1. Isolation: If one VM crashes, others remain unaffected.
2. Consolidation: Running multiple servers on one physical machine to save costs.