Operating System
OS Part-1
OS Part-2
- File Concepts and Access methods
- Free Space Management and Allocation methods
- Directory Systems and Protection
- File Organization, Sharing and Implementation issues
- Disk and Drum Scheduling
- I/O Devices Organisation & I/O Buffering
- I/O Hardware, Kernel I/O subsystem and Transforming I/O Requests to Hardware Operations
- Device Drivers and Path Management
- Device Driver Sub Modules and Procedure
- Device Scheduler and Handler
- Interrupt Service Routine (ISR)
- File System in Linux and Windows
OS Part-3
- Process and Process Control Block(PCB)
- Process Scheduling( Preemptive and Non Preemptive)
- Scheduling Algorithms
- Algorithm Evaluation
- Multiple Processor Scheduling
- Real Time Scheduling
- Operations on Processes
- Threads
- Inter-Process Communication
- Precedence Graphs
- Critical Section Problem
- Semaphores
- Classical Problems of Synchronization
- DeadLock
- Deadlock Prevention and Avoidance
- Deadlock Detection and Recovery
- Process Management in Linux
OS Part-4
- Memory Hierarchy in OS
- Concepts of Memory Management
- MFT and MVT
- Logical and Physical Address Space
- Swapping
- Contiguous and Non Contiguous Memory Allocation
- Paging
- Segmentation
- Paging Combined with Segmentation
- Structure and Implementation of Page Table
- Virtual Memory in OS
- Cache Memory Organization
- Demand Paging
- Page Replacement Algorithms
- Allocation of Frames and Thrashing
- Demand Segmentation
OS Part-5
- Distributed Operating System: Introduction and Types
- Distributed OS: Design Issues
- Distributed OS: File System
- Distributed OS: Remote File Access
- Remote Procedure Call(RPC)
- Remote Method Invocation(RMI)
- Distributed Shared Memory
- Parallel Processing and Concurrent Programming
- Security and Threats Protection in Distributed OS
- Security Design Principles and Authentication in Distributed OS
- Sensor Network and Parallel OS
Algorithm Evaluation in Operating System
Introduction
Operating system ke scheduling algorithms ka evaluation karna zaroori hota hai taaki best performance aur efficiency ensure kiya ja sake. Algorithm evaluation ka matlab hai ki hum check karte hain ki ek algorithm kaise perform kar raha hai aur kya yeh system ke requirements ko efficiently fulfill karta hai ya nahi.
Algorithm Evaluation Ke Important Factors
Kisi bhi scheduling algorithm ko evaluate karne ke liye hum kuch important criteria consider karte hain:
-
CPU Utilization:
-
CPU idle na rahe, iska dhyan rakha jata hai.
-
Higher CPU utilization means better performance.
-
-
Throughput:
-
Kitne processes ek certain time me complete ho rahe hain.
-
Jyada throughput hone ka matlab system fast work kar raha hai.
-
-
Turnaround Time:
-
Ek process ka total execution time (Completion Time – Arrival Time).
-
Kam turnaround time better hota hai.
-
-
Waiting Time:
-
Ek process CPU milne se pehle kitna wait karta hai.
-
Waiting Time = Turnaround Time – Burst Time
-
Kam waiting time better performance dikhata hai.
-
-
Response Time:
-
Jab ek process first time CPU use karta hai uska time.
-
Interactive systems me important hota hai.
-
-
Fairness:
-
Har process ko fair chance mile CPU use karne ka.
-
Starvation avoid karna zaroori hota hai.
-
Algorithm Evaluation Methods
1. Deterministic Modeling
-
Fixed input values par algorithms ko compare kiya jata hai.
-
Simple hai, lekin practical scenarios cover nahi karta.
Example (FCFS vs SJF Scheduling)
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 8 |
P2 | 1 | 4 |
P3 | 2 | 9 |
Gantt Chart for FCFS
| P1 | P2 | P3 |
0 8 12 21
-
Average Waiting Time (AWT) = (0 + 7 + 10) / 3 = 5.67 ms
Gantt Chart for SJF
| P2 | P1 | P3 |
1 5 13 22
-
Average Waiting Time (AWT) = (0 + 4 + 6) / 3 = 3.33 ms
Conclusion: SJF ka waiting time kam hai, toh better performance deta hai.
2. Queuing Models
-
Mathematical models ka use karke evaluate kiya jata hai.
-
System me kitne processes wait kar rahe hain aur kitna load hai, yeh analyze kiya jata hai.
-
Little’s Formula ka use hota hai:
L=λWL = \lambda WL=λW
-
L = System me processes ki average number
-
λ = Processes ka arrival rate
-
W = Average waiting time
-
3. Simulation
-
Real-world system ka model banake evaluate karte hain.
-
Different test cases run karke performance analyze hoti hai.
-
OS designers mostly simulation approach use karte hain.
Example: Round Robin Scheduling Simulation (Time Quantum = 3 ms)
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 5 |
P2 | 1 | 9 |
P3 | 2 | 6 |
Gantt Chart
| P1 | P2 | P3 | P2 | P3 | P2 |
0 3 6 9 12 15 18
-
Waiting Time = (0+5+9) / 3 = 4.67 ms
-
Turnaround Time = (5+14+15) / 3 = 11.33 ms
Conclusion: Short time quantum se context switching increase ho sakti hai.
4. Implementation & Testing
-
Algorithm ko actual OS me implement karke check kiya jata hai.
-
Performance monitoring tools ka use hota hai.
Conclusion
Algorithm evaluation ke different methods hume help karte hain best scheduling algorithm choose karne me. Har method ka apna importance hota hai. OS designers simulation aur testing approach zyada use karte hain real-world performance analyze karne ke liye.