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
Device Driver: Sub Module aur Procedure
1. Device Driver Kya Hota Hai?
Device Driver ek software program hai jo Operating System (OS) aur hardware devices (jaise keyboard, printer, USB, hard disk) ke beech communication enable karta hai. Ye ek bridge ki tarah kaam karta hai jo OS ke high-level commands ko device-specific instructions me convert karta hai.
Device driver ke andar multiple sub-modules hote hain jo different tasks handle karte hain. Device driver ka procedure mainly device ka initialization, request processing aur termination se milkar banta hai.
2. Device Driver ke Sub Modules
Ek device driver alag-alag sub-modules se bana hota hai jo alag-alag kaam karte hain:
Initialization Module
-
Jab bhi ek device connect hota hai, toh ye module driver ko memory me load karta hai.
-
Ye device ki compatibility check karta hai aur resources allocate karta hai.
-
Example: Jab aap ek USB plug-in karte ho, toh OS pehle check karta hai ki driver available hai ya nahi, aur agar nahi hai toh install karta hai.
Command Processing Module
-
Ye module OS aur applications se commands receive karta hai aur unhe hardware-specific instructions me convert karta hai.
-
Example: Jab ek print command diya jata hai, toh printer driver use printer language (PCL ya PostScript) me translate karta hai.
Data Transfer Module
-
Ye module OS aur device ke beech data transfer karta hai.
-
Isme buffering, caching, aur speed optimization shamil hota hai.
-
Example: Jab ek file USB drive me copy hoti hai, toh driver ensure karta hai ki data correctly transfer ho raha hai.
Error Handling Module
-
Agar koi device failure ya error aata hai, toh ye module OS ko notify karta hai aur problem ko solve karne ki koshish karta hai.
-
Example: Agar hard disk me bad sectors hote hain, toh driver unhe mark kar deta hai taaki unka use na ho.
Power Management Module
-
Ye module device ke power states manage karta hai taaki battery aur energy save ho sake.
-
Example: Jab laptop ka Wi-Fi idle hota hai, toh driver use power save mode me daal deta hai taaki battery consume na ho.
3. Device Driver Ka Procedure
Device driver ka kaam karne ka ek proper process hota hai, jo alag-alag stages me divide hota hai:
Step 1: Device Detection & Initialization
Jab ek device plug-in hota hai, toh OS:
Check karta hai ki driver already installed hai ya nahi.
Agar driver nahi milta, toh OS automatically install karne ki koshish karta hai.
Device ko initialize karta hai aur uske settings configure karta hai.
Example:
-
Jab aap ek nai USB mouse connect karte ho, toh OS automatically uska driver install karta hai aur use ready karta hai.
Step 2: Command Processing & Data Transfer
Jab koi application ya OS command send karta hai, toh driver:
Use device-specific instructions me convert karta hai.
OS aur device ke beech data transfer karta hai.
Example:
-
Jab aap ek file USB drive me copy karte ho, toh driver data ko buffer me store karta hai aur efficiently transfer karta hai.
Step 3: Interrupt Handling & Error Correction
Agar device me koi problem hoti hai, toh driver:
Interrupt generate karta hai aur OS ko notify karta hai.
Automatic retry ya alternate method use karta hai.
User ko alert deta hai agar problem solve nahi ho sakti.
Example:
-
Agar printer me paper khatam ho jaye, toh driver OS ko error message bhejta hai aur print job pause kar deta hai.
Step 4: Device Termination & Removal
Jab device remove kiya jata hai, toh driver:
Pura data save karta hai aur device connections close karta hai.
OS ko notify karta hai ki device available nahi hai.
Example:
-
Jab aap USB safely eject karte ho, toh driver ensure karta hai ki koi data loss na ho.
4. Conclusion
Device drivers multiple sub-modules ka use karke initialization, command processing, data transfer aur error handling manage karte hain.
Device driver ka procedure ek proper system follow karta hai jo device detection, request processing aur termination cover karta hai.
Agar device drivers sahi tarike se kaam na karein toh OS hardware ko use nahi kar sakta.