Categories

Advertisement
⏱️ 4 min read

Interrupts and Modes of Operating System in Hindi | OS Notes for Students

N
By NotesMind
Advertisement

Introduction

Operating System (OS) कंप्यूटर का सबसे महत्वपूर्ण हिस्सा होता है, जो CPU, Memory और सभी hardware resources को manage करता है।
इस ब्लॉग में हम दो बहुत जरूरी concepts को समझेंगे:

  • Interrupt क्या होता है?
  • User Mode और Kernel Mode क्या होते हैं?

ये दोनों topics हर BCA, MCA, B.Tech, Polytechnic और competitive exams के लिए बहुत important हैं।


Interrupt क्या होता है?

Definition (सरल भाषा में)

Interrupt एक signal होता है जो CPU को बताता है कि अभी एक important काम करना है।

जब कोई hardware या software CPU को signal देता है, तो CPU अपना current काम रोककर उस नए काम को execute करता है।


Example

मान लो आप पढ़ाई कर रहे हो 
अचानक आपका phone बजता है 
👉 आप पढ़ाई रोककर कॉल उठाते हो
👉 यही interrupt है!


Interrupt कैसे काम करता है?

  1. CPU कोई program execute कर रहा होता है
  2. अचानक interrupt signal आता है
  3. CPU current task को pause करता है
  4. फिर ISR (Interrupt Service Routine) execute करता है
  5. बाद में वापस पहले वाले काम पर आ जाता है

 ISR क्या है?

ISR (Interrupt Service Routine) एक predefined function होता है जो interrupt को handle करता है।

ISR (Interrupt Service Routine) एक special function/program होता है जो interrupt आने पर CPU द्वारा execute किया जाता है

हर interrupt के लिए अलग ISR होता है
 

उदाहरण -

आप keyboard पर key दबाते हो
➡️ Interrupt generate होता है
➡️ CPU ISR को call करता है
➡️ ISR input को read करता है
➡️ फिर CPU वापस अपने काम पर लौट जाता है


Interrupt के प्रकार (Types of Interrupts)

Hardware Interrupt

Definition

जब hardware devices CPU को signal भेजते हैं, उसे Hardware Interrupt कहते हैं।

Examples

  • Keyboard key press
  • Mouse click
  • Printer में page jam
  • Hard disk read error

Software Interrupt

Definition

जब कोई program या application CPU को signal देता है, उसे Software Interrupt कहते हैं।

Important Point

Software interrupt अक्सर System Call के माध्यम से होता है

Example

  • File save करना
  • Memory request करना
  • Input/Output operations

Important Note

जब CPU को interrupt मिलता है:

✔ CPU current execution को suspend करता है
✔ ISR को execute करता है
✔ फिर वापस previous task पर आ जाता है


Modes of Execution (Operating System)

Operating System में दो modes होते हैं:

User Mode

Definition

जब user application (जैसे Chrome, MS Word) run करता है, तो वह User Mode में चलता है।

Features

  • Limited permissions
  • Direct hardware access नहीं
  • Safe environment

Example

  • MS Word
  • Browser
  • Games

Kernel Mode (Privileged Mode)

Definition

जब OS खुद काम करता है, तो वह Kernel Mode में होता है।

Features

  • Full access to hardware
  • Memory control
  • Resource management

User Mode और Kernel Mode के बीच Switching

Process Flow

  1. User program चलता है (User Mode)

  2. System call आता है
  3. Control Kernel Mode में जाता है
  4. OS task execute करता है
  5. वापस User Mode में लौटता है

Important Points (Exam के लिए)

✔ Interrupt CPU को signal देता है
✔ ISR interrupt को handle करता है
✔ Hardware और Software दो types होते हैं
✔ User Mode → limited access
✔ Kernel Mode → full control
✔ System Call switching का main तरीका है


Conclusion

Interrupt और Modes of Operation OS के core concepts हैं।
अगर आप इनको अच्छे से समझ लेते हैं, तो OS के कई topics आसान हो जाते हैं जैसे:

  • Process Management
  • Scheduling
  • Memory Management

Interrupt, ISR & Modes – FAQ


Interrupt से जुड़े सवाल

1. Interrupt क्या होता है?

Interrupt एक signal होता है जो CPU को बताता है कि अभी एक जरूरी काम करना है और current task को रोकना होगा।


2. Interrupt का real-life example क्या है?

 पढ़ाई करते समय phone call आना
  आप पढ़ाई रोककर call उठाते हो
  यही interrupt है


3. Interrupt क्यों जरूरी है?

  • CPU को बार-बार check (polling) करने से बचाता है
  • System को fast और responsive बनाता है
  • Real-time processing possible करता है

4. Interrupt आने पर CPU क्या करता है?

  • Current task pause करता है
  • Context (state) save करता है
  • ISR execute करता है
  • फिर वापस previous task continue करता है

5. Interrupt कितने प्रकार के होते हैं?

  • Hardware Interrupt (keyboard, mouse)
  • Software Interrupt (program/system call)

6. Hardware Interrupt क्या होता है?

जब कोई device (keyboard, mouse, printer) CPU को signal देता है


7. Software Interrupt क्या होता है?

जब कोई program CPU को signal देता है (अक्सर System Call के जरिए)



ISR (Interrupt Service Routine) से जुड़े सवाल


8. ISR क्या होता है?

ISR एक special function है जो interrupt आने पर execute होता है

आसान भाषा में:
Interrupt का solution = ISR


9. ISR का काम क्या होता है?

  • Interrupt का कारण समझना
  • Required action लेना
  • Device से data handle करना

10. क्या हर interrupt का अलग ISR होता है?

हाँ, हर interrupt के लिए अलग ISR होता है


11. ISR fast क्यों होना चाहिए?

क्योंकि CPU को जल्दी वापस main task पर जाना होता है


12. ISR का example क्या है?

Keyboard key press
ISR input read करता है



User Mode & Kernel Mode FAQ


13. User Mode क्या होता है?

जब user applications (जैसे browser, games) run करते हैं

Features:

  • Limited access
  • Direct hardware access नहीं
  • Safe environment

14. Kernel Mode क्या होता है?

जब Operating System खुद काम करता है

 Features:

  • Full hardware access
  • Memory और resources control

15. User Mode और Kernel Mode में फर्क क्या है?

Point User Mode Kernel Mode
Access Limited Full
Security Safe Risky (powerful)
Use Applications OS

16. Mode switching कैसे होता है?

Flow:

  • User program चलता है
  • System Call / Interrupt आता है
  • Control Kernel Mode में जाता है
  • OS काम करता है
  • वापस User Mode में आता है

 

 


Advertisement

💬 Leave a Comment & Rating