Lesson 9 — Intermediate

Operating System Basics

Operating system computer ka boss hai. Is lesson mein hum dekhenge OS kya karta hai, process aur memory kaise manage karta hai, aur OS ke kitne type hote hain. Ye interview aur exam dono mein poochha jaata hai.

⏱ 15 min• Intermediate• CPU Architecture

Operating System kya hai

WHAT

OS system software hai jo hardware aur user ke beech ka interface hai. Ye resources (CPU, memory, devices) manage karta hai aur programs ko chalne ki jagah deta hai.

WHEN

Computer on hote hi OS load hota hai (boot). Har app, har file access, har device OS ke through hota hai.

WHERE

Windows, Linux, macOS, Android, iOS — sab OS hain. Servers pe Linux, PCs pe Windows, mobile pe Android/iOS.

OS ke bina computer sirf ek machine hai. OS use usable banata hai — resources manage karke ki sab programs tez aur safe chal sakein.

OS ke main functions

1. Process Management  : kitne programs chal rahe, scheduling
2. Memory Management   : RAM ka allocation + deallocation
3. File Management     : files create, read, write, organize
4. Device Management   : drivers ke through I/O control
5. Security/Protection : passwords, permissions, access control
6. Networking          : connectivity manage karna
7. User Interface      : GUI ya CLI provide karna
Yaad rakho: Interview mein 5 core functions poochhte hain — Process, Memory, File, Device, Security. Aur 2 bonus — Networking, UI. Ye 7 ratt lo, answer complete.

Process management

Process = program jo chal raha hai (execution mein). Ek program, jab chalta hai, ban jaata hai process. OS in processes ko schedule karta hai:

Process states : New → Ready → Running → Waiting → Terminated

Scheduling algorithms :
FCFS    : First Come First Served (simple, convoy effect)
SJF     : Shortest Job First (optimal avg waiting, but burst time padhna)
Round Robin : Time quantum — fair, sabko chance
Priority : Priority ke hisaab se (starvation ho sakta hai)

Context switch : ek process se doosre pe jump (state save/load)

Context switching ka fayda hai multitasking, but cost hai — save/load state mein time jaata hai. Zyada context switch = system slow.

Memory management

Key concept: Virtual memory ka fayda hai ki physically chhoti RAM pe bada program chal sakta hai (demand paging se). Ismein "thrashing" bahut zyada page fault = system slow.

Exercise

Question: OS ke 5 core management functions list karo (comma se, koi bhi order).

Question: Round Robin scheduling mein kya use hota hai? (time quantum / burst time / priority)

Question: Bada program chhoti RAM pe chalana kis concept se hota hai? (virtual memory / paging / segmentation)

Common mistakes

Desi example: Traffic signal system

OS ko city traffic samjho — signal (scheduler) decide kta hai kaun kab jaaye, taaki koi stuck na ho:

text
Processes = gaadiyan
Scheduler = signal (Round Robin jaisa)
Memory   = road space
Thrashing = jam (zyada vehicles, kam space)
Exam mapping (GATE / TCS / UGC)
  • GATE: scheduling algorithms + paging/fragmentation deep questions.
  • TCS NQT: "OS manages ___" — resources (memory, process).
  • UGC-NET: OS functions list direct question.
  • Trap: "Round Robin uses priority" — galat, wo time quantum use karta hai.
Lesson complete?

OS ke basics clear. Agla lesson — Computer Networks — mein dekhenge devices kaise connect hote hain.

Popular courses: Data Science Course in Lucknow · AI Course in Lucknow · Python Course in Lucknow · Power BI Course · Data Analytics Course