DIZNR INTERNATIONAL

Day 01Part 15 – Operating system for gate in Hindi – Context Switching in Operating system.

Day 01Part 15 – Operating system for gate in Hindi – Context Switching in Operating system.

https://www.gyanodhan.com/video/7B7.%20GATE%20CSEIT/Operating%20System/430.%20Day%2001Part%2015%20-%20Operating%20system%20for%20gate%20in%20Hindi%20-%20Context%20Switching%20in%20Operating%20system.mp4

Here’s a complete explanation of:


Day 01 – Part 15: Context Switching in Operating System (in Hindi for GATE CSE)

Topic: Context Switching
Language: Hindi + Key English Terms (for GATE preparation)


Context Switching क्या होता है?

Context Switching एक ऐसा process है जिसमें CPU एक process से दूसरे process पर switch करता है। जब भी CPU एक process को रोककर दूसरे को execute करता है, तो उसे पहले process का context (status) save करना होता है, ताकि बाद में वहीं से शुरू किया जा सके।


Context Switching में क्या-क्या save होता है?

जब context switch होता है, तो OS को process के ये details save करने होते हैं:

ये सारी information PCB (Process Control Block) में store होती है।


Context Switching Diagram (हिंदी में समझें)

csharp
[Running Process A]
|
| (Interrupt / I/O / Scheduler decision)

[Save A's context in PCB_A]

[Load B's context from PCB_B]

[Running Process B]

Context Switching कब होता है?

  1. Interrupt आने पर

  2. System Call (जैसे I/O request)

  3. Multitasking (Time Sharing OS में)

  4. Preemption (Higher priority process के आने पर)


Context Switch Time क्या होता है?

Context switch time वह time है जिसमें एक process को रोककर दूसरा शुरू किया जाता है। इस समय कोई भी actual work (processing) नहीं होता — सिर्फ switching overhead होता है।

GATE में यह पूछा जा सकता है कि:

“Is context switch time productive?”
Answer: No, it is an overhead.


Context Switch के फायदे और नुकसान:

फायदे:

नुकसान:


GATE-Level MCQ Example:

Q: Context switch involves:
A) Switching from kernel to user mode
B) Saving and restoring process states
C) I/O management
D) Memory allocation


Short Notes for Revision (One-liners):


Extra Tip:

In GATE, context switching is often paired with:


Would you like:

Let me know!

Day 01Part 15 – Operating system for gate in Hindi – Context Switching in Operating system.

HORTICULTURE DEVELOPMENT

5R_TV `W UVReY UVdecfTeZ`_ Z_ 3V_XR]fcf