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
I/O Hardware, Kernel I/O Subsystem, aur Transforming I/O Requests to Hardware Operations
1. Introduction to I/O in OS
I/O (Input/Output) operations ka kaam hai Operating System (OS) ko external devices jaise keyboard, printer, hard disk, aur network devices se connect karna.
Kyuki har device alag speed pe kaam karta hai, is wajah se OS efficiently I/O operations manage karta hai using specialized hardware aur software components.
Aaj hum discuss karenge: I/O Hardware – Jo physical devices involve hote hain.
Kernel I/O Subsystem – OS ka internal system jo I/O handle karta hai.
Transforming I/O Requests to Hardware Operations – Ek user request kaise actual hardware action me convert hoti hai.
2. I/O Hardware
I/O Hardware wo physical components hain jo system aur external world ke beech data transfer karte hain.
I/O Hardware ke Major Components
I/O Controller – Ye CPU aur I/O devices ke beech mediator ka kaam karta hai.
I/O Ports – Jaha se data send/receive hota hai.
Device Drivers – Ek software jo OS ko hardware ke sath interact karne me madad karta hai.
I/O Communication ke Methods
Polling: CPU baar-baar check karta hai ki device ready hai ya nahi. (Slow aur inefficient)
Interrupts: Device CPU ko signal bhejta hai jab ready ho. (Better method)
Direct Memory Access (DMA): Ek special hardware controller (DMA Controller) data ko directly I/O device se memory me transfer karta hai bina CPU ko disturb kiye. (Most Efficient)
3. Kernel I/O Subsystem
Kernel I/O Subsystem ek bridge hai user applications aur hardware ke beech jo I/O operations ko smoothly aur securely handle karta hai.
Kernel I/O Subsystem ke Major Functions
I/O Scheduling: Kaunse I/O request pehle execute hogi, ye decide karta hai.
Buffering: CPU aur I/O devices ke speed difference ko handle karne ke liye temporary memory use hoti hai.
Caching: Frequently used data ko memory me store karta hai taaki fast access ho.
Spooling: Slow devices ke liye queue banakar data send karta hai, jaise printer jobs.
Error Handling: Hardware ya data transmission me koi error aaye to OS usko detect aur correct karta hai.
Device Drivers: Ye OS aur hardware ke beech translator ka kaam karte hain, taaki OS easily hardware commands bhej sake.
4. Transforming I/O Requests to Hardware Operations
Jab ek user I/O operation request karta hai (e.g., ek file open karna), toh OS is request ko actual hardware instructions me convert karta hai.
Step-by-Step Process
User Program Request: User ek operation request karta hai, jaise file open karna.
System Call Activation: Request OS tak pahunchti hai system call ke through (e.g.,
read()
function). Device Driver Invocation: OS respective device driver ko call karta hai.
Hardware Communication: Device driver I/O controller se connect hota hai jo device ko instructions bhejta hai.
Interrupt Handling: Jab operation complete hota hai, device ek interrupt signal bhejta hai OS ko.
Data Transfer: OS data ko user program tak pahunchata hai.
Example:
Agar ek user file open karta hai text editor me:
Request: User “Open File” pe click karta hai.
OS Processing: OS file ka location find karta hai aur storage device ko request bhejta hai.
Device Execution: Hard disk file ko read karta hai aur data ko memory me load karta hai.
Data Transfer: Text editor me file dikhai dene lagti hai.
5. Conclusion
I/O Hardware me controllers, ports aur device drivers hote hain jo communication handle karte hain.
Kernel I/O Subsystem I/O requests ko efficiently manage karta hai.
Transforming I/O Requests to Hardware Operations me multiple steps hote hain jo system calls se lekar data transfer tak ka process ensure karte hain.