Unit 1: Fundamentals of Computer & Networking
Chapter 2: Operating Systems Basics
1. Role of an Operating System
An Operating System (OS) is system software that manages computer hardware, system resources, and provides common services for application software:
+--------------------------------------------------------------+
| USERS |
+--------------------------------------------------------------+
^
v
+--------------------------------------------------------------+
| APPLICATION SOFTWARE (Word, Browser, IDE) |
+--------------------------------------------------------------+
^
v
+--------------------------------------------------------------+
| OPERATING SYSTEM (OS) |
| - Process Mgmt - Memory Mgmt - File System - Device I/O |
+--------------------------------------------------------------+
^
v
+--------------------------------------------------------------+
| HARDWARE (CPU, RAM, Disks) |
+--------------------------------------------------------------+
2. Core Functions of an Operating System
| Core Function | Description & Responsibilities |
|---|---|
| Processor / Process Management | Schedules CPU execution time among competing processes using algorithms (FCFS, Round Robin, Priority Scheduling); handles context switching. |
| Memory Management | Tracks every byte of primary memory (RAM); allocates memory blocks when programs launch and reclaims them upon termination (Garbage Collection). |
| File System Management | Organizes files into hierarchical directories/folders; controls file access permissions (Read, Write, Execute); manages storage layout. |
| Device / I/O Management | Coordinates communication between applications and peripheral hardware via specialized Device Drivers and buffers. |
| Security and Protection | Implements password authentication, access control lists (ACLs), user permission levels (Standard vs. Administrator/Root). |
| User Interface (UI) | Provides an interface (CLI or GUI) allowing users to issue commands and launch programs intuitively. |
3. Types of Operating Systems
+--------------------------+
| Types of Operating Sys |
+--------------------------+
/ | | \
Single-User Multi-User Multi-Tasking RTOS
- Single-User Single-Tasking OS: Only one user can execute a single application at any given time (e.g., MS-DOS).
- Single-User Multi-Tasking OS: One user can execute multiple applications simultaneously (e.g., Windows 10/11, macOS).
- Multi-User Operating System: Enables multiple concurrent users to access a centralized computer's resources via terminals or network sessions (e.g., Linux, UNIX).
- Time-Sharing OS: Allocates a small CPU time slice (quantum) to each active user/process in rapid succession, creating the illusion of dedicated simultaneous execution.
- Real-Time Operating System (RTOS): Guarantees task execution within strict, deterministic time limits (deadlines). Used in flight control systems, medical pacemakers, and industrial robotics (e.g., VxWorks, QNX, FreeRTOS).
- Mobile Operating System: Lightweight operating systems optimized for touch screens, battery conservation, cellular communication, and sensor inputs (e.g., Android, iOS).
4. User Interfaces: CLI vs. GUI
| Parameter | Command Line Interface (CLI) | Graphical User Interface (GUI) |
|---|---|---|
| Interaction Mode | User types textual commands at a terminal prompt. | User interacts with visual elements: Windows, Icons, Menus, Pointer (WIMP). |
| Ease of Learning | Steep learning curve; commands and syntax flags must be memorized. | Highly intuitive; beginner-friendly point-and-click navigation. |
| Resource Consumption | Minimal RAM and CPU overhead; no graphics acceleration needed. | Substantial RAM, GPU, and CPU resources required for visual rendering. |
| Automation | Highly suitable for shell scripting and administrative batch automation. | Difficult to automate repetitive operations without specialized macros. |
| Examples | Bash shell, Command Prompt (cmd), PowerShell. | Windows 11 Desktop, macOS Aqua, GNOME, KDE. |
5. File Systems and Directory Structure
A File System defines how files are named, stored, retrieved, and organized on storage media.
Root Directory (C:\ in Windows, / in Linux)
|
+--- Users /
| +--- Student /
| +--- Documents /
| | +--- Project.docx (File)
| +--- Downloads /
+--- Program Files /
+--- Windows /
- File Path:
- Absolute Path: Full path starting from the root drive:
C:\Users\Student\Documents\Project.docx - Relative Path: Path relative to the current working directory:
Documents\Project.docx - File Extensions: Suffix indicating file format and default application:
- Text/Docs:
.txt,.docx,.pdf - Source Code:
.py,.java,.cpp,.html - Executable:
.exe,.bat,.sh - Images:
.jpg,.png,.svg
6. Board Exam Practice Questions & Solutions
Q1. State any three primary functions performed by an Operating System.
Answer:
1. Processor Management: Allocates CPU time among multiple active processes using scheduling algorithms and manages multitasking.
2. Memory Management: Dynamically allocates and de-allocates RAM blocks to running applications, ensuring programs do not overwrite each other's memory spaces.
3. File Management: Organizes files into directories, tracks file locations on disk, and enforces access control permissions.
Q2. What is a Real-Time Operating System (RTOS)? Where is it used?
Answer:
A Real-Time Operating System (RTOS) is an operating system designed to process inputs and respond with deterministic, guaranteed latency within strict time deadlines without buffering delays.
Applications: Aerospace flight control systems, nuclear reactor monitoring, missile guidance systems, and medical intensive care equipment.
Q3. Differentiate between Absolute Path and Relative Path with an example.
Answer:
- An Absolute Path specifies the complete address of a file starting from the root directory/drive letter (e.g., C:\School\IT\syllabus.pdf).
- A Relative Path specifies a file's location in relation to the current working directory (e.g., if currently inside C:\School, the relative path is IT\syllabus.pdf).