I/O Processing क्या है? Working, Types & Functions

Input-Output processing

I/O Processing (Input/Output Processing) Computer Science का एक बहुत ही basic लेकिन super important concept है। यह essentially एक bridge की तरह काम करता है |
I/O Processing ना हो, तो Computer सिर्फ एक inert box की तरह रहेगा – ना data ले पाएगा, ना result दिखा पाएगा।

Three main steps of I/O Processing

  1. Input : बाहर से data और instructions को computer के अंदर लाना।
  2. Processing : CPU द्वारा इन डेटा पर calculations और operations करना।
  3. Output : Processing के बाद results user तक पहुँचाना।

यह process हमेशा एक continuous cycle की तरह चलता है।

Example :

  • आप Microsoft Word में लिखते हैं → text input होता है
  • CPU इसे process करता है → letters screen पर दिखते हैं
  • Screen पर text display होता है → output user को मिल जाता है

I/O Devices – Main Assistant of Computer
(I/O डिवाइस – कंप्यूटर के मुख्य सहायक)

1. Input Devices 

ये devices user से data और commands लेकर computer को भेजते हैं –

  • Keyboard : Typing के लिए
  • Mouse : Selection और navigation के लिए
  • Scanner : Paper documents या images को digital format में बदलने के लिए
  • Microphone : Audio record करने के लिए
  • Webcam : Video recording और video calls के लिए
  • Joystick : Video games खेलने के लिए
  • Touchscreen : Smartphones/tablets में direct screen input के लिए

2. Output Devices 

ये devices processed data को user तक दिखाते या सुनाते हैं –

  • Monitor : Text, images और videos display करने के लिए
  • Printer : Documents को paper पर print करने के लिए
  • Speakers/Headphones : Audio सुनने के लिए
  • Projector : Presentations या movies बड़े screen पर दिखाने के लिए

3. Input-Output (Bi-directional) Devices 

कुछ devices input और output दोनों कर सकते हैं –

  • Touchscreen : Input touch के द्वारा, output screen पर display
  • CD/DVD Drive : Data read (input) और write (output) दोनों
  • Network Interface Card (NIC) : Data send (output) और receive (input) दोनों

I/O Processing Cycle – Step by Step

Step 1 – Input Operation

  • Input devices (Keyboard, Mouse, Scanner, Microphone) से raw data CPU को भेजा जाता है।
  • CPU के Input Buffer में यह data temporarily store होता है।
  • Example : User Keyboard से “HELLO” type करता है।

Step 2 – Input Processing 

  • CPU या I/O Controller raw data को processable form में convert करता है।
  • Validation और Error checking यहाँ होती है।
  • Example : Typed characters को ASCII या binary में convert करना।

Step 3 – Data Transfer to CPU 

  • Input device से data system bus के माध्यम से CPU तक पहुंचता है।
  • CPU के registers या memory में temporarily store किया जाता है।
  • Example : “HELLO” stored in CPU registers for further processing।

Step 4 – Processing by CPU 

  • CPU के ALU (Arithmetic Logic Unit) और Control Unit data पर operations perform करते हैं।
  • Example : किसी number को add करना या character को uppercase में बदलना।

Step 5 – Output Operation 

  • Processed data को Output Buffer में भेजा जाता है।
  • Output devices (Monitor, Printer, Speaker) के माध्यम से user तक पहुँचाया जाता है।
  • Example : Screen पर “HELLO” दिखाई देना।

Step 6 – Completion & Feedback 

  • Output देने के बाद system एक completion signal generate करता है।
  • CPU और I/O devices ready हो जाते हैं अगले operation के लिए।
  • Feedback से errors detect और correct किए जा सकते हैं।

I/O Processing Cycle Flowchart

[Step 1: Input Operation]
               ↓
[Step 2: Input Processing]
               ↓
[Step 3: Data Transfer to CPU]
               ↓
[Step 4: Processing by CPU]
               ↓
[Step 5: Output Operation]
              ↓
[Step 6: Completion & Feedback]
              ↓
[Next Operation]

Types of I/O Processing (I/O Processing के प्रकार)

I/O Processing तीन मुख्य प्रकार के होते हैं –

  1. Programmed I/O
  2. Interrupt-Driven I/O
  3. Direct Memory Access (DMA)

1. Programmed I/O (Programmed Input/Output)

CPU Direct I/O devices को control करता है, और data transfer manage करता है। CPU हर step पर device का status check करता है।

Working :

  • CPU I/O device को check करता है, कि वो ready है, या busy
  • CPU data को read या write करता है।
  • Data transfer या process complete होने के बाद CPU next instruction execute करता है।

2. Interrupt-Driven I/O

CPU बार-बार device check नहीं करता। Device खुद CPU को interrupt signal भेजता है, जब वो ready होता है।

Working :

  • CPU normal process कर रहा होता है।
  • Device ready होने पर CPU को interrupt भेजता है
  • CPU interrupt handle करके data transfer करता है।

3. Direct Memory Access (DMA)

CPU को data transfer में involve नहीं होना पड़ता। DMA controller सीधे memory और I/O devices के बीच data transfer करता है।

  • High-speed devices के लिए best method है।

Working :

  1. CPU DMA controller को data transfer की request देता है।
  2. DMA controller memory और device के बीच data move करता है।
  3. Transfer complete होने पर DMA CPU को interrupt भेजता है

Challenges in I/O Processing (I/O प्रोसेसिंग में चुनौतियाँ)

  • Speed Mismatch : CPU की processing speed बहुत high होती है, जबकि I/O devices slow होते हैं।
  • CPU Overhead : Programmed I/O में CPU को बार-बार device status check करना पड़ता है।
  • Data Loss or Errors : High-speed data transfer में buffer overflow या electrical/ mechanical errors data को प्रभावित कर सकते हैं।
  • Complex Hardware/Software Design : Interrupt-driven और DMA techniques में hardware और software design complicated हो जाता है।
  • Synchronization Issues : CPU, memory और I/O devices के बीच timing mismatch होने पर data corruption या delay हो सकता है।
  • Interrupt Overload : Interrupt-driven I/O में devices बार-बार CPU को interrupt भेजते हैं।
error: Content is protected !!