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 Devices Organization & I/O Buffering in Operating System
1. Introduction to I/O System in OS
Operating System (OS) me I/O (Input/Output) system ka kaam hai CPU aur external devices ke beech communication manage karna. Ye devices ho sakti hain: Keyboard, Monitor, Hard Disk, Printer, Network Interface, Mouse etc.
Kyuki I/O operations slow hote hain CPU se, is wajah se efficient I/O organization aur buffering techniques ka use hota hai taaki system smoothly kaam kare.
2. I/O Devices Organization
System me I/O devices CPU se different techniques se connect hote hain jo performance optimize karti hain.
1. Programmed I/O
-
CPU directly I/O device ko control karta hai aur wait karta hai jab tak operation complete na ho jaye.
-
Example: Keyboard input processing.
Fayda: Simple implementation.
Nuksan: CPU idle rehta hai jab tak operation complete nahi hota.
2. Interrupt-Driven I/O
-
CPU I/O request bhej kar dusra kaam karta hai. Jab I/O device ka kaam complete hota hai, tab Interrupt bhejta hai CPU ko notify karne ke liye.
-
Example: Printer completion signal, Mouse click event.
Fayda: CPU waste nahi hota.
Nuksan: Bahut zyada interrupts system slow kar sakte hain.
3. Direct Memory Access (DMA)
-
DMA Controller ek special hardware hota hai jo CPU ko bypass karke data transfer karta hai device aur memory ke beech.
-
CPU sirf request initiate karta hai, baaki ka kaam DMA karta hai.
-
Example: Hard disk se RAM me data transfer.
Fayda: CPU free rehta hai dusre kaam karne ke liye.
Nuksan: Extra hardware (DMA Controller) ki zaroorat hoti hai.
I/O Device Hierarchy
I/O devices alag-alag speeds pe kaam karte hain. Unko hierarchy me arrange kiya jata hai:
Fastest – Cache, RAM
Medium Speed – Hard disk, SSD, Network card
Slowest – Keyboard, Mouse, Printer, External USB devices
OS inko unke speed aur access methods ke according organize karta hai taaki system efficiently kaam kare.
3. I/O Buffering
I/O Buffering Kya Hota Hai?
I/O buffering ek technique hai jisme temporary memory (buffer) ka use hota hai data store karne ke liye, jo CPU aur I/O device ke beech transfer hota hai.
I/O Buffering Kyu Zaroori Hai?
I/O devices CPU se slow hote hain, toh buffer data temporarily store karta hai.
Batch processing allow karta hai taaki system me load kam ho.
Data transfer smoothly hota hai, latency kam hoti hai.
Types of I/O Buffering
1. Single Buffering
-
OS ek buffer allocate karta hai, jo data ko temporarily store karta hai.
-
Jab ek buffer process hota hai, tab doosra fill hota hai.
Fayda: CPU ka waiting time kam hota hai.
Nuksan: High-speed data transfer ke liye slow hai.
2. Double Buffering
-
Do buffers ka use hota hai: Ek buffer process hota hai, doosra fill hota hai.
-
Ye continuous data flow ensure karta hai.
Fayda: Fast performance.
Nuksan: Extra memory lagti hai.
3. Circular Buffering
-
Multiple buffers ka use hota hai, jo ek circular queue me arrange hote hain.
-
Ye technique real-time systems (e.g., video streaming) ke liye best hai.
Fayda: High-speed data transfer aur real-time applications ke liye perfect hai.
Nuksan: Complex management aur zyada memory lagti hai.
4. Conclusion
I/O Device Organization ensure karta hai ki CPU aur I/O devices ka efficient communication ho sake.
I/O Buffering ka use speed aur efficiency improve karne ke liye hota hai.
Techniques like DMA aur Interrupt-Driven I/O, system performance improve karte hain.