CPU Scheduling in Hindi & CPU Scheduling Algorithms – पूरी जानकारी

Hello friends!
इस पोस्ट में CPU Scheduling in Hindi & CPU Scheduling Algorithms – पूरी जानकारी के बारे में पूरी जानकारी आसान हिंदी भाषा में समझाई गई है। यदि आप इस टॉपिक के बारे में जानना चाहते हैं, तो इस पोस्ट को पूरा जरूर पढ़ें।

परिचय (Introduction)

Operating System का CPU Scheduling concept बहुत ही important है। जब system में multiple processes एक साथ run करना चाहते हैं, तो OS decide करता है कि कौन सा process पहले execute होगा। इस decision process को ही CPU Scheduling कहते हैं।

इस article में हम सीखेंगे:

  • CPU Scheduling क्या है?
  • Scheduling criteria
  • Scheduling algorithms (FCFS, SJF, Priority, Round Robin, Multilevel Queue)
  • Advantages & disadvantages
  • Real-life examples

CPU Scheduling क्या है?

CPU Scheduling OS का वह part है जो decide करता है कि ready queue में waiting processes में से कौन सा process CPU allocate करेगा।

Objectives of CPU Scheduling

  1. CPU utilization maximize करना
  2. Throughput बढ़ाना
  3. Waiting time minimize करना
  4. Turnaround time और response time optimize करना
CPU Scheduling in Hindi & CPU Scheduling Algorithms

Scheduling Criteria

CPU scheduling evaluate करने के लिए निम्न criteria use होते हैं:

  • CPU Utilization: CPU busy time ratio
  • Throughput: Process per unit time completion
  • Turnaround Time: Completion time – Arrival time
  • Waiting Time: Time spent in ready queue
  • Response Time: Time from submission to first execution

CPU Scheduling Algorithms

1. First-Come, First-Served (FCFS)

  • Simplest scheduling technique
  • Process जो पहले आता है, उसे CPU मिलता है
  • Non-preemptive

Advantages: Easy to implement
Disadvantages: Convoy effect, long waiting time for short processes

 First-Come First-Served (FCFS)

2. Shortest Job First (SJF)

  • Process with shortest CPU burst time is executed first
  • Can be preemptive (SRTF) or non-preemptive

Advantages: Minimizes average waiting time
Disadvantages: Requires prior knowledge of CPU burst, starvation problem

Shortest Job First (SJF)

3. Priority Scheduling

  • Each process assigned a priority
  • Higher priority process gets CPU first
  • Preemptive or Non-preemptive

Advantages: Important processes served first
Disadvantages: Starvation for low priority processes

Priority Scheduling

4. Round Robin (RR)

  • Each process gets fixed time quantum (time slice)
  • After time quantum, next process executes
  • Preemptive

Advantages: Fair allocation, good for time-sharing systems
Disadvantages: Performance depends on time quantum, context switching overhead

Round Robin (RR)

5. Multilevel Queue Scheduling

  • Ready queue divided into multiple queues based on process type
  • Each queue has own scheduling algorithm
  • Can be preemptive or non-preemptive

Advantages: Differentiates process classes
Disadvantages: Rigid, processes cannot move between queues easily

Multilevel Queue Scheduling

6. Multilevel Feedback Queue

  • Similar to multilevel queue but processes can move between queues
  • Uses aging to prevent starvation
Multilevel Feedback Queue

Real-Life Example of CPU Scheduling

  1. Operating Systems: Windows, Linux use hybrid scheduling for multitasking
  2. Web Servers: Serve multiple requests simultaneously using priority scheduling
  3. Embedded Systems: Round Robin scheduling for real-time processes

FAQs

CPU Scheduling क्या है?

CPU scheduling OS में ready queue में waiting processes को CPU allocate करने की technique है।

FCFS और SJF में अंतर क्या है?

FCFS में पहले आने वाले process को CPU मिलता है, SJF में shortest job पहले execute होता है।

Round Robin Scheduling कब use होता है?

Time-sharing systems और multitasking OS में Round Robin scheduling use होती है।


निष्कर्ष (Conclusion)

CPU Scheduling multiple processes की efficient execution और system performance के लिए बहुत जरूरी है। हर algorithm का अपना importance और limitation है। Operating System में इन algorithms का सही combination use करके high CPU utilization, low waiting time और better throughput achieve किया जाता है।


👉 Next Article: Logical & Physical Address Space in Hindi (OS)

Leave a Comment