Introduction: Definition of Operating System, Operating System Services, Types of
operating systems, Process Management: Process concept, Process States, Representation
of process (PCB), Process Scheduling, CPU Scheduling: Scheduling Criteria, Scheduling
Algorithms, algorithm evaluation.
Definition of Operating System (OS)
What is an Operating System (OS)?
An Operating System (OS) is system software that acts as a bridge between the computer hardware
and the user or application programs. It is the most crucial software on a computer, as it manages
hardware resources, facilitates program execution, and provides an interface for users and
applications to interact with the hardware.
In simpler terms, the OS makes it possible for users and applications to use the computer without
needing to understand or directly manage the hardware.
Expanded Definition:
"An Operating System (OS) is system software that manages computer hardware and software
resources and provides common services for computer programs. It allows users to interact with
the hardware in an efficient and secure manner, providing the platform on which applications
run."
This means that the OS performs multiple functions:
Managing resources like CPU, memory, storage, and peripherals (e.g., printers, keyboards).
Handling user input and output (via user interfaces).
Providing an execution environment for running software applications.
Key Functions of an Operating System
Operating Systems perform a wide range of tasks, and below are the key functions in more detail:
1. Process Management
Definition: A process is a program that is currently running. The OS is responsible for
creating, scheduling, and terminating processes.
Details:
o Process Scheduling: The OS determines which processes get to use the CPU at any
given time, ensuring efficient CPU utilization and multitasking.
o Multitasking: The OS allows the computer to run multiple processes at once. It uses
techniques like time-sharing and context switching to ensure each process gets a
fair share of the CPU's time.
o Process Synchronization: The OS ensures that multiple processes can safely access
shared resources (e.g., memory) without causing conflicts.
,2. Memory Management
Definition: The OS is responsible for allocating and deallocating memory to running
processes.
Details:
o Memory Allocation: The OS allocates memory to processes based on their needs. It
keeps track of available and used memory to avoid errors like memory leaks or
memory access violations.
o Virtual Memory: This technique allows the OS to extend the available memory using
storage devices (e.g., hard disk) as though it were part of the RAM, enabling larger
processes to run than the physical memory allows.
o Memory Protection: The OS ensures that processes cannot access each other's
memory, protecting the integrity of the system and preventing crashes.
3. File System Management
Definition: The OS is responsible for organizing, storing, and accessing data in a structured
manner.
Details:
o Files and Directories: The OS organizes data into files (individual units of data) and
directories (folders that group related files). Each file is assigned a name, type, and
metadata (such as size, creation date).
o File Access: The OS provides mechanisms to access files efficiently. This includes
providing support for file reading/writing, permissions, and security.
o Storage Management: The OS manages storage devices like hard drives, SSDs, and
USB drives, determining how data is read from and written to these devices.
4. Device Management
Definition: The OS controls the input and output (I/O) devices connected to the computer.
Details:
o Device Drivers: The OS uses device drivers to control hardware devices like printers,
keyboards, and monitors. These drivers convert general I/O instructions into device-
specific operations.
o I/O Scheduling: The OS manages the scheduling of input and output operations,
ensuring that devices are accessed in an efficient and fair manner.
5. Security and Access Control
Definition: The OS enforces security policies to protect the system and its resources.
Details:
o Authentication: The OS ensures that only authorized users can access the system by
requiring user authentication (e.g., usernames and passwords).
o Encryption: The OS can encrypt data to protect it from unauthorized access,
ensuring confidentiality and integrity.
o Access Control: The OS uses access control lists (ACLs) or permissions to determine
which users or processes can access specific resources (e.g., files or devices).
,6. User Interface (UI)
Definition: The OS provides a way for users to interact with the system, often through a
graphical or command-line interface.
Details:
o Command Line Interface (CLI): A text-based interface where users type commands
to perform tasks (e.g., Windows Command Prompt, Linux Terminal).
o Graphical User Interface (GUI): A visual interface with icons, buttons, and windows,
making it easier for users to interact with the system (e.g., Windows, macOS).
Components of an Operating System
An OS consists of several core components that work together to provide the functionalities
mentioned above:
1. Kernel
The kernel is the core of the OS. It has complete control over the system’s resources and
manages critical tasks like memory management, process scheduling, and hardware
communication.
The kernel operates in privileged mode (ring 0), meaning it has full access to the hardware
and system resources.
2. Shell
The shell is an interface between the user and the kernel. It interprets user commands (from
CLI or GUI) and passes them to the kernel for execution.
Bash, Zsh, and PowerShell are common examples of shells used in different OS
environments.
3. File System
The file system organizes and manages data stored on disk drives. It defines the rules for
how files are named, stored, and accessed.
FAT32, NTFS, EXT4, and APFS are common file systems used by different OS types.
4. Device Drivers
Device drivers are software modules that allow the OS to communicate with hardware
devices.
They convert the OS's general I/O instructions into device-specific instructions, enabling
proper communication between the OS and peripherals like printers, audio cards, etc.
Real-Life Analogy: Operating System as a Hotel Manager
Think of the OS as a hotel manager:
Hotel guests (users) need rooms (memory), services (CPU time), and access to various hotel
facilities (storage, input/output devices).
, The hotel manager (OS) allocates resources like rooms (memory), schedules when guests
can use hotel services (process scheduling), and ensures the hotel runs smoothly.
The hotel staff (hardware resources) are controlled by the hotel manager, who makes sure
that all services (processes) are coordinated, the rooms (memory) are allocated correctly,
and there’s no conflict between guests (processes).
Importance of the Operating System
An OS is crucial because:
Resource Management: Without an OS, managing hardware resources would be complex
and inefficient. The OS ensures that every program and process gets the resources it needs
without causing conflicts.
User Convenience: It provides easy-to-use interfaces that abstract away the complex details
of hardware, making the system user-friendly.
Security: It protects data and resources from unauthorized access, ensuring system integrity
and user privacy.
Multitasking: The OS enables multitasking by allowing multiple processes to run
concurrently and sharing CPU time effectively.
Summary
The Operating System is the heart of any computer system. It manages hardware resources,
provides an environment for running applications, and ensures users can interact with the system
efficiently. Through process management, memory management, device management, and more,
the OS makes the complex task of managing a computer system much simpler for users and
applications.
Operating System Services
1. Introduction to Operating System Services
Operating System services are the functions or activities provided by the OS that allow users and
programs to interact with the hardware and other system resources. These services are essential for
the OS to manage processes, handle hardware communication, provide security, and offer a user
interface.
In simpler terms, OS services are the mechanisms that make the functionality of the OS available to
users and applications. Without these services, programs would be unable to run effectively or
interact with the hardware.
2. Types of Operating System Services