ð· 5.1 WHAT IS AN OPERATING SYSTEM?
ð Definition
An Operating System (OS) is system software that:
ð Acts as an interface between user and hardware
ð Manages all computer resources
ðŊ Simple Explanation for Students
“OS is like a manager of a computer.”
ð§ Real-Life Analogy
- Computer = Restaurant
- OS = Manager
- CPU = Chef
- Users = Customers
ð The manager (OS) decides:
- Who gets served first
- What resources to use
ð§Đ Main Functions of OS
1. Process Management
Controls running programs
ð Example:
Opening:
- Chrome
- Word
- Music player
OS decides which runs first
2. Memory Management
Controls RAM usage
ð Example:
- 4GB RAM
- Chrome uses 2GB
- Word uses 1GB
OS allocates memory properly
3. File Management
Handles files & folders
ð Example:
Saving a file in:
Documents > ICT > Notes.docx
4. Device Management
Controls hardware
ð Example:
- Printer
- Keyboard
- USB
Uses device drivers
5. Security Management
Protects system
ð Example:
- Password login
- Fingerprint
ð· Types of Operating Systems
1. Batch OS
-
No interaction
ð Example:
Payroll system
2. Time-Sharing OS
- Multiple users at same time
ð Example:
School computer lab
3. Real-Time OS
- Immediate response
ð Example:
Air traffic control
4. Distributed OS
- Multiple computers act as one
5. Embedded OS
- Inside devices
ð Example:
Washing machine, ATM
ð· 5.2 PROCESS MANAGEMENT
ð Definition
A process = a program in execution
ð Example:
- Opening MS Word → becomes a process
ð§ Process vs Program
| Program | Process |
|---|---|
| Stored file | Running |
| Passive | Active |
ð Process States
1. New
Process is created
2. Ready
Waiting for CPU
3. Running
Currently executing
4. Waiting (Blocked)
Waiting for input
ð Example:
Waiting for file to open
5. Terminated
Finished execution
ðŊ Teaching Analogy (VERY USEFUL)
ð Students in a classroom:
- New → Student enters class
- Ready → Waiting for teacher
- Running → Answering question
- Waiting → Thinking / stuck
- Terminated → Finished
ð§Ū CPU Scheduling
1. FCFS (First Come First Serve)
ð Like queue in bank
2. SJF (Shortest Job First)
ð Short tasks first
Example:
- Print 1 page vs 100 pages
3. Round Robin
ð Each process gets equal time
ð Like teacher giving each student chance
ð Context Switching
Switching CPU between processes
ð Example:
Switching between:
- Chrome → Word → YouTube
ð· 5.3 MEMORY MANAGEMENT
ð Definition
Managing main memory (RAM) efficiently
ð§ Key Concepts
Primary vs Secondary Memory
| Primary | Secondary |
|---|---|
| RAM | Hard disk |
| Fast | Slow |
| Temporary | Permanent |
ð· Memory Allocation
1. Fixed Partition
RAM divided into fixed blocks
ð Problem: Wastage
2. Dynamic Partition
Memory allocated as needed
ð Better efficiency
ð· Paging
ð Definition
Memory divided into:
- Pages (logical)
- Frames (physical)
ð§ Simple Example
Think of:
- Book = program
- Pages = divided parts
ð· Virtual Memory
Using disk as extra RAM
ð Example:
When RAM is full → uses hard disk
ð· Fragmentation
1. Internal Fragmentation
Unused space inside block
2. External Fragmentation
Free space scattered
ð· 5.4 FILE MANAGEMENT
ð Definition
OS manages files and directories
ð§ File Operations
- Create
- Read
- Write
- Delete
ð File Organization
1. Sequential Access
Read one by one
ð Example:
Reading a book
2. Direct Access
Jump to location
ð Example:
Watching a specific video time
ð Directory Structure
ð Example:
C:
└── Users
└── Student
└── ICT
└── Notes.txt
ð· 5.5 DEVICE MANAGEMENT
ð Definition
Controls hardware devices
ð Device Drivers
Software that connects OS to hardware
ð Example:
Printer driver
ð Interrupts
ð Definition
Signal to CPU
ð Example:
- Mouse click
- Keyboard press
ð§ Simple Explanation
“Interrupt = asking CPU for attention”
ð· 5.6 SECURITY & PROTECTION
ð Authentication
Types:
- Password
- PIN
- Fingerprint
- Face ID
ð Access Control
Who can access what
ð Example:
- Admin vs Student
ðĶ Malware Types
1. Virus
Needs user action
ð Example:
Opening infected file
2. Worm
Spreads automatically
3. Trojan
Looks safe but harmful
ð Example:
Fake software
No comments:
Post a Comment