Tazahindi

Operating System Notes for GATE CS & IT 2026 – Master OS Concepts with Guaranteed GATE Questions

By Satyajit

Operating System Notes for GATE CS IT 2026

अगर आप GATE CS/IT 2026 की तैयारी कर रहे हैं तो यह article आपके लिए game-changer साबित हो सकता है, क्योंकि यहाँ आपको पूरे Operating System Notes एक ही जगह simple Hindi में मिलेंगे। GATE में हर साल Operating System से 8–10 marks के questions आते हैं और सही preparation से यह subject आपको top rank दिला सकता है।

इस article में हम तीन सबसे important OS topics को detail में समझेंगे:

  • Process Scheduling Algorithms – GATE Level Numericals
  • Deadlock Detection & Prevention – Solved Examples
  • Memory Management – Paging vs Segmentation

Operating System Notes: Complete OS Syllabus Overview

Operating System basically user और hardware के बीच एक interface है। इसके बिना computer सिर्फ dead hardware होता।

GATE OS Syllabus Major Parts:

  • Process Management
  • CPU Scheduling
  • Deadlock
  • Memory Management
  • File System
  • Disk Scheduling

लेकिन GATE में सबसे ज़्यादा weightage इन topics से आता है:

Topic Avg Marks
Scheduling 3-4
Deadlock 2-3
Memory Management 3-4

इसलिए इस article में हम इन तीनों पर deep focus करेंगे।

ये भी पढ़ें : Operating Systems: Process Scheduling and Synchronization – जानिए ये कैसे काम करते हैं

Operating System Notes: Process Scheduling Algorithms

Process Scheduling Operating System का सबसे scoring topic माना जाता है, क्योंकि GATE exam में हर साल इससे numericals जरूर पूछे जाते हैं। अगर आपने Scheduling अच्छे से समझ लिया, तो 3–4 marks practically guaranteed होते हैं।

Process Scheduling क्या है?

Process Scheduling ऑपरेटिंग सिस्टम का एक बहुत ही महत्वपूर्ण कार्य है, जिसमें यह तय किया जाता है कि CPU को किस process को और कितने समय के लिए दिया जाए। जब एक से अधिक processes memory में ready state में होती हैं, तब CPU scheduler ready queue में मौजूद processes में से किसी एक process को select करता है ताकि वह execute हो सके।

इसका main goal है:

  • CPU utilization बढ़ाना
  • Waiting Time कम करना
  • Turnaround Time minimize करना
  • Fairness maintain करना

Important Scheduling Terms

Term Meaning
Arrival Time (AT) Process ready queue में कब आई
Burst Time (BT) Process को कितना CPU time चाहिए
Completion Time(CT) Process कब complete हुई
Turnaround Time (TAT) CT – AT
Waiting Time (WT) TAT – BT

Types of Scheduling Algorithms

Algorithm Preemptive GATE Importance
FCFS No Low
SJF No High
SRTF Yes Very High
Priority Yes/No Medium
Round Robin Yes Very High

FCFS (First Come First Serve)

जो process पहले आती है, वही पहले execute होती है।
Simple लेकिन convoy effect की problem होती है।

SJF (Shortest Job First)

जिस process का Burst Time सबसे कम होता है, उसे पहले CPU मिलता है।
इससे Average Waiting Time minimum होती है।

SRTF (Shortest Remaining Time First)

यह SJF का preemptive version है।
अगर बीच में कोई छोटा BT वाला process आ जाए तो current process को रोक दिया जाता है।

Solved Numerical – SRTF Scheduling

Process AT BT
P1 0 7
P2 2 4
P3 4 1
P4 5 4

Step-1: Gantt Chart

0 2 4 5 6 10 17

P1 P2 P3 P2 P4 P1

Step-2: Calculate Completion Time (CT)

Process CT
P1 14
P2 10
P3 6
P4 14

Step-3: TAT & WT

TAT = CT – ATWT = TAT – BT

Process TAT WT
P1 17 10
P2 8 4
P3 2 1
P4 9 5

Round Robin (RR)

हर process को fixed time slice (quantum) दिया जाता है।

  • Small quantum → more context switching
  • Large quantum → FCFS जैसा behave करता है

ये भी पढ़ें : What is Paging in Operating System: A Comprehensive Guide

Operating System Notes: Deadlock Detection & Prevention

Deadlock Operating System की सबसे dangerous problems में से एक है, क्योंकि इसमें system तो चलता रहता है लेकिन कुछ processes हमेशा के लिए wait करती रहती हैं। GATE exam में Deadlock से 2–3 marks हर साल पूछे जाते हैं, इसलिए इस topic की deep understanding होना बहुत जरूरी है।

Deadlock क्या है?

Deadlock वह स्थिति है जब दो या उससे ज़्यादा processes एक-दूसरे के द्वारा पकड़े गए resources का इंतज़ार करती रहती हैं और कोई भी process आगे execute नहीं हो पाती। यह स्थिति तब बनती है जब चार necessary conditions एक साथ पूरी होती हैं:

  1. Mutual Exclusion – Resource को एक time पर सिर्फ एक process ही use कर सकती है।
  2. Hold and Wait – Process कुछ resources पकड़ कर नए resources का wait कर रही होती है।
  3. No Preemption – Resource को forcefully छीना नहीं जा सकता।
  4. Circular Wait – Processes एक circular chain में resources का wait कर रही होती हैं।

Deadlock Handling Techniques

Deadlock को handle करने के लिए OS चार approaches use करता है:

Method Explanation GATE Focus
Prevention Deadlock conditions में से कोई एक break कर देना Theory
Avoidance System को unsafe state में जाने से रोकना Banker’s Algorithm
Detection Deadlock होने के बाद उसे detect करना Wait For Graph
Recovery Deadlock होने पर processes को terminate करना Conceptual

Deadlock Prevention

Deadlock Prevention का मतलब है कि चार conditions में से किसी एक को allow ही न किया जाए।

Condition कैसे break करें
Mutual Exclusion Resource को sharable बनाओ
Hold & Wait Process को सभी resources एक साथ allocate करो
No Preemption Resource को preemptible बनाओ
Circular Wait Resource ordering follow करो

Deadlock Avoidance – Banker’s Algorithm

Banker’s Algorithm यह check करता है कि system safe state में है या नहीं।

Data Structures:

  • Available
  • Max
  • Allocation
  • Need = Max – Allocation

Solved Numerical – Banker’s Algorithm

| Process | Max | Alloc | Available = 3 |
|———|—–|——-|
| P0 | 7 | 0 |
| P1 | 5 | 2 |
| P2 | 3 | 1 |

Step-1: Need Matrix

Process Need
P0 7
P1 3
P2 2

Step-2: Safe Sequence

  • P2 → P1 → P0

System is in Safe State.

Deadlock Detection – Wait For Graph

Deadlock Detection technique में एक Wait For Graph (WFG) बनाया जाता है जिसमें:

  • Node = Process
  • Edge = Waiting relationship

अगर graph में cycle बन जाती है, तो deadlock exists करता है।

GATE exam में Deadlock से जुड़े theoretical और numerical दोनों प्रकार के questions पूछे जाते हैं, इसलिए इस concept को clear समझना बहुत ज़रूरी है।

ये भी पढ़ें : Graph Algorithms (BFS, DFS, Dijkstra, Kruskal) – GATE 2026 CS&IT के लिए Easy Tutorial

Operating System Notes: Memory Management

Memory Management ऑपरेटिंग सिस्टम का सबसे critical हिस्सा है, क्योंकि हर process को execute होने के लिए main memory चाहिए। OS यह ensure करता है कि memory का maximum utilization हो, कोई process दूसरे की memory overwrite न करे और system fast response दे।

Paging क्या है?

Paging एक memory management technique है जिसमें logical memory को fixed size blocks में divide किया जाता है जिन्हें pages कहते हैं, और physical memory को same size के blocks में divide किया जाता है जिन्हें frames कहा जाता है।

जब कोई process execute होती है तो OS उसके pages को अलग-अलग frames में load कर देता है। इसके लिए एक Page Table maintain की जाती है, जो यह बताती है कि कौन-सा page किस frame में रखा गया है।

Logical Address Structure (Paging):

Page Number | Offset

Page Number से Page Table में entry मिलती है और Offset से exact byte locate होता है।

Paging के Advantages

  • External fragmentation नहीं होती
  • Memory allocation आसान होता है
  • OS के लिए memory management flexible हो जाता है

Paging के Disadvantages

  • Internal fragmentation होती है
  • Page Table का size बड़ा हो सकता है
  • Address translation में extra time लगता है

Segmentation क्या है?

Segmentation में memory को program के logical parts में divide किया जाता है जैसे –
Code segment, Data segment, Stack segment, Heap segment आदि।

हर segment का size variable होता है और हर segment के लिए एक Segment Table maintain की जाती है जिसमें:

Segment Number | Base | Limit

Logical Address Structure (Segmentation):

Segment Number | Offset

Segmentation के Advantages

  • Program का logical view clear रहता है
  • Memory protection easy हो जाती है
  • Sharing of segments possible होती है

Segmentation के Disadvantages

  • External fragmentation की problem
  • Compaction की जरूरत पड़ती है
  • Implementation थोड़ा complex होता है

Paging vs Segmentation – GATE Comparison Table

Feature Paging Segmentation
Block Size Fixed Variable
Fragmentation Internal External
Logical View नहीं मिलता मिलता है
Memory Protection Page based Segment based
GATE Importance Very High High

Solved Numerical – Paging

Given:
Logical Address = 2150
Page Size = 1024 bytes

Step-1: Find Page Number

Page Number = 2150 / 1024 = 2

Step-2: Find Offset

Offset = 2150 % 1024 = 102

GATE 2026 CS & IT: Official Important Links

निष्कर्ष  (Conclusion)

इस पूरे article में आपने Operating System Notes के तीन सबसे महत्वपूर्ण और scoring topics – Process Scheduling Algorithms, Deadlock Detection & Prevention और Memory Management (Paging vs Segmentation) को detail में समझा।

ये वही concepts हैं जिनसे GATE CS/IT exam में हर साल numericals और theoretical questions दोनों पूछे जाते हैं। अगर आप रोज़ थोड़ी-थोड़ी practice करते हैं, formulas को revise करते रहते हैं और solved examples को ध्यान से समझते हैं, तो OS आपके लिए सबसे मजबूत subject बन सकता है।

इसलिए इस page को bookmark करें, notes बनाएं और नियमित revision के साथ अपनी GATE 2026 की तैयारी को next level पर ले जाएँ।

Share with Social

Satyajit

Leave a Comment