BCA / B.Tech 36 min read

Operating System (OS) All Important Questions and Answers in Hindi (MDSU)

1. ऑपरेटिंग सिस्टम (OS) क्या है?

Ans. ऑपरेटिंग सिस्टम एक software है जो computer और user के बीच काम करता है। यह computer के सभी resources को manage करता है और users को programs चलाने की सुविधा देता है।

2. OS के मुख्य goals क्या हैं?

Ans. OS के मुख्य goals हैं:

  • सुविधा (Convenience): User के लिए system को आसान बनाना
  • Efficiency: Hardware और software को अच्छे से इस्तेमाल करना
  • Security: Data और programs को सुरक्षित रखना
  • Resource Management: CPU, memory और input-output devices को control करना

3. OS कैसे काम करता है?

Ans. जब computer on होता है, तब OS memory में load होता है (जिसे booting कहते हैं)। इसके बाद यह programs को run करता है और सभी resources को manage करता है।

4. Resource Allocater क्या है?

Ans. OS एक Resource Allocater की तरह काम करता है, यानी यह CPU, memory और devices को अलग-अलग programs में बाँटता है ताकि सब कुछ smoothly चले।

5. OS कितने types के होते हैं?

Ans. OS को 5 main classes में divide किया जाता है:

  • Batch OS: Programs एक के बाद एक queue में execute होते हैं।
  • Multiprocessing OS: एक से ज्यादा CPU एक साथ काम करते हैं।
  • Time-Sharing OS: हर process को एक fixed time दिया जाता है।
  • Distributed OS: Multiple computers मिलकर एक system की तरह काम करते हैं।
  • Real-Time OS: जिनमें execution समय बहुत जरूरी होता है, जैसे एयरप्लेन कंट्रोल सिस्टम।

6. Batch Processing OS क्या है?

Ans. इस OS में एक जैसे काम (jobs) एक साथ queue में store होते हैं और automatically execute होते हैं।

7. Multi-processing OS क्या है?

Ans. जब एक computer में एक से ज्यादा processor होते हैं और वो एक साथ multiple tasks को process कर सकते हैं, उसे Multiprocessing OS कहते हैं।

8. Time-Sharing OS क्या होता है?

Ans. इसमें हर user या process को time slice दिया जाता है ताकि सभी processes को CPU का use करने का मौका मिले।

9. Distributed OS क्या होता है?

Ans. यह ऐसा OS होता है जहाँ multiple computers आपस में connected होते हैं और एक साथ काम करते हैं, जैसे cloud computing।

10. Real-Time OS क्या होता है?

Ans. यह OS उन systems में use होता है जहाँ execution time बहुत जरूरी होता है, जैसे medical systems या aeroplane control।

11. System Calls क्या होते हैं?

Ans. जब कोई program OS से कोई काम करवाना चाहता है (जैसे file open करना या memory allocate करना), तो वह System Call का use करता है।

12. System Programs क्या होते हैं?

Ans. ये वे programs होते हैं जो OS को manage करने में मदद करते हैं, जैसे file manager, text editor, और compiler।

13. OS का Structure कैसा होता है?

Ans. OS का structure अलग-अलग होता है, कुछ common structures हैं:

  • Layered OS: अलग-अलग layers में divided होता है।
  • Microkernel OS: जिसमें सिर्फ जरूरी functions होते हैं, बाकी user-space में होते हैं।
  • Monolithic OS: पूरा OS एक साथ execute होता है।

14. DOS और Unix की Layer Design क्या होती है?

Ans. DOS: एक simple OS है जिसमें direct hardware access होता है।
Unix: यह multi-user और multi-tasking OS है जो अलग-अलग layers में divided होता है।

15. Virtual Machine OS क्या है?

Ans. यह ऐसा OS होता है जो एक computer पर multiple OS को चलाने की सुविधा देता है, जैसे VMware।

16. Kernel Based OS क्या होता है?

Ans. इसमें OS का main part Kernel होता है जो सभी hardware और software को control करता है।

17. Process क्या होती है?

Ans. जब कोई program execute हो रहा होता है, तो उसे process कहते हैं।

18. Interacting Processes क्या होते हैं?

Ans. दो या ज्यादा processes जब एक दूसरे के साथ data share करती हैं, तो उसे interacting processes कहते हैं।

19. Thread क्या होता है?

Ans. Thread एक process का छोटा हिस्सा होता है जो independently run कर सकता है।

20. Scheduling क्या होता है?

Ans. जब OS यह decide करता है कि कौन सी process CPU use करेगी और कब, उसे scheduling कहते हैं।

21. Scheduling Criteria क्या होते हैं?

Ans. कुछ important scheduling criteria ये हैं:

  • CPU Utilization: CPU का maximum use हो।
  • Throughput: एक fixed time में कितनी processes complete हुईं।
  • Response Time: Process को response मिलने में कितना समय लगा।

22. Short, Medium और Long Term Scheduling क्या होता है?

Ans.

  • Short-Term Scheduler: यह CPU को next process assign करता है।
  • Medium-Term Scheduler: कुछ processes को memory से बाहर कर देता है (swapping)।
  • Long-Term Scheduler: यह नए processes को system में enter करने की permission देता है।

23. Scheduling Algorithms कितने प्रकार के होते हैं?

Ans. कुछ common scheduling algorithms:

  • FCFS (First Come First Serve) – जो पहले आया, वही पहले execute होगा।
  • SJF (Shortest Job First) – सबसे छोटा process पहले execute होगा।
  • Round Robin – हर process को time slice दिया जाता है।
  • Priority Scheduling – High priority वाली process पहले execute होगी।

24. Concurrent System क्या होता है?

Ans. ऐसा system जहाँ multiple processes एक साथ चल रही होती हैं, उसे concurrent system कहते हैं।

25. Critical Section क्या होती है?

Ans. जब दो या ज्यादा processes एक ही resource को access कर रही होती हैं, तो उस हिस्से को Critical Section कहते हैं। इसको manage करने के लिए synchronization techniques use की जाती हैं।


26. Critical Region क्या होती है?

Ans. जब दो या ज्यादा processes shared resources को access कर रही होती हैं, तो जिस हिस्से में data corruption हो सकता है, उसे Critical Region कहते हैं।

27. Inter-Process Communication (IPC) क्या होता है?

Ans. जब दो या ज्यादा processes एक दूसरे से data भेजती या लेती हैं, तो इसे IPC (Inter-Process Communication) कहते हैं। यह दो तरह से होता है:

  • Shared Memory: दोनों processes एक ही memory को access करती हैं।
  • Message Passing: Processes आपस में messages भेजती हैं।

28. Monitor और Semaphore क्या होते हैं?

Ans.

  • Monitor: यह एक high-level synchronization tool है, जो shared data को safe रखता है।
  • Semaphore: यह एक signal variable है, जिससे multiple processes coordinate कर सकती हैं।

29. Logical और Physical Address में क्या फर्क है?

Ans.

  • Logical Address: यह program के लिए दिखने वाला address होता है, जिसे CPU generate करता है।
  • Physical Address: यह असली memory का address होता है, जहाँ data store होता है।

30. Swapping क्या होता है?

Ans. जब कोई process temporarily memory से निकालकर secondary storage (hard disk) में रखी जाती है और बाद में वापस लाई जाती है, इसे Swapping कहते हैं।

31. Contiguous Allocation क्या होता है?

Ans. जब किसी process को memory में एक continuous (लगातार) block दिया जाता है, तो इसे Contiguous Allocation कहते हैं।

32. Segmentation क्या होता है?

Ans. इसमें memory को अलग-अलग segments में divide किया जाता है, जैसे Code Segment, Data Segment, और Stack Segment

33. Paging क्या होता है?

Ans. इसमें memory को fixed-size pages में divide किया जाता है और process को उसी size के frames में store किया जाता है।

34. Segmentation with Paging क्या होता है?

Ans. यह hybrid system है, जहाँ memory segmentation और paging दोनों का use होता है।

35. Kernel Memory Allocation क्या होता है?

Ans. यह memory allocation technique है जिसमें kernel processes को अलग-अलग तरीके से memory assign करता है, जैसे Buddy System और Slab Allocation

36. Page Replacement Algorithm क्या होती है?

Ans. जब virtual memory में नई page को लाने के लिए किसी पुरानी page को हटाना पड़ता है, तो यह Page Replacement Algorithm द्वारा किया जाता है।

  • FIFO (First In First Out)
  • LRU (Least Recently Used)
  • Optimal Algorithm

37. Virtual Memory क्या होती है?

Ans. यह एक technique है, जहाँ physical RAM से ज्यादा memory दिखती है, और secondary storage (HDD/SSD) का use होता है।

38. Demand Paging क्या होता है?

Ans. इसमें pages को memory में तभी load किया जाता है जब जरूरत होती है, जिससे RAM की efficiency बढ़ती है।

39. Deadlock क्या होता है?

Ans. जब दो या ज्यादा processes एक दूसरे की जरूरत की resources को block कर देती हैं और कोई भी आगे नहीं बढ़ पाती, तो इसे Deadlock कहते हैं।

40. Deadlock को कैसे Handle किया जाता है?

Ans. Deadlock को चार तरीके से handle किया जा सकता है:

  1. Prevention (रोकथाम): Deadlock होने ही न देना।
  2. Avoidance (बचाव): Banker's Algorithm का use करके safe state में रखना।
  3. Detection (पता लगाना): Deadlock detect करके process को stop करना।
  4. Recovery (सुधारना): Deadlock खत्म करने के लिए कुछ processes को terminate करना।

41. Thrashing क्या होता है?

Ans. जब system बार-बार memory से pages को लाता और हटाता है, जिससे performance बहुत slow हो जाती है, इसे Thrashing कहते हैं।

42. Frame Allocation क्या होता है?

Ans. यह process memory को allocate करने की technique है, जिसमें यह decide किया जाता है कि कौन से process को कितने frames मिलेंगे।

43. Distributed System का Architecture कैसा होता है?

Ans. यह कई machines का एक network होता है, जहाँ सभी machines एक साथ काम करती हैं और data share करती हैं।

44. Inter-Process Communication Protocol क्या होता है?

Ans. Distributed Systems में processes एक दूसरे से TCP/IP, RPC (Remote Procedure Call), और Message Queue के जरिए communicate करती हैं।

45. Network OS क्या होता है?

Ans. यह ऐसा OS होता है जो multiple computers को एक नेटवर्क में जोड़कर उन्हें आपस में interact करने की सुविधा देता है, जैसे Windows Server और Linux Server।

46. Distributed File System (DFS) क्या होता है?

Ans. यह file system network पर distributed रहता है, जिससे कई users एक साथ files को access कर सकते हैं।

47. Linux क्या है और इसका इतिहास क्या है?

Ans. Linux एक open-source OS है, जिसे Linus Torvalds ने 1991 में बनाया था। यह multi-user और multi-tasking OS है।

48. Linux में File Manipulation कैसे किया जाता है?

Ans. Linux में files को manage करने के लिए कुछ commands होती हैं:

  • ls → Files और folders को दिखाने के लिए
  • cp → Files को copy करने के लिए
  • rm → Files को delete करने के लिए
  • mv → Files को move/rename करने के लिए

49. Shell Scripting क्या होती है?

Ans. Shell Script एक program होता है, जिसमें multiple shell commands लिखे जाते हैं ताकि tasks automate हो सकें।

50. C Language और Linux कैसे जुड़े हुए हैं?

Ans. Linux का kernel C Language में लिखा गया है। हम C Programs को Linux में compile और execute कर सकते हैं।

Extra Questions (Advanced और Practical Topics)

51. Linux में Kernel क्या होता है और इसके मुख्य कार्य क्या हैं?

Ans. Kernel किसी भी operating system का सबसे core हिस्सा होता है। यह hardware और software के बीच का bridge (पुल) होता है। Kernel के बिना कोई भी OS काम नहीं कर सकता। यह सबसे पहले load होता है और system shutdown तक memory में रहता है।

Linux Kernel के मुख्य कार्य:

  1. Process Management: यह CPU को divide करके multiple processes को चलाने का काम करता है।
  2. Memory Management: Kernel यह decide करता है कि कौन से process को कितनी memory मिलेगी।
  3. Device Management: यह input/output devices (mouse, keyboard, printer, etc.) को manage करता है।
  4. File System Management: Linux में files और directories को manage करने का काम Kernel करता है।
  5. Security & Access Control: यह user permissions और system security को handle करता है।

Linux Kernel के Types:

  1. Monolithic Kernel: पूरा kernel एक ही module में होता है (e.g., Linux Kernel)।
  2. Microkernel: यह छोटे-छोटे parts में divided होता है (e.g., MINIX Kernel)।
  3. Hybrid Kernel: Monolithic और Microkernel का mix होता है (e.g., Windows NT)।

Linux Kernel क्यों खास है?

  • यह Open Source है, यानी कोई भी इसे modify कर सकता है।
  • यह बहुत ही stable और secure OS है।
  • Android भी Linux Kernel पर चलता है।

52. Linux में Signals क्या होते हैं और इनका उपयोग कैसे किया जाता है?

Ans. Signals एक process को किसी दूसरे process से communication करने के लिए use किए जाते हैं। यह asynchronous (अचानक) तरीके से processes को control करने का काम करते हैं।

Signals के प्रकार:

  1. Terminating Signals: Process को खत्म करने के लिए (e.g., SIGKILL, SIGTERM)
  2. Ignore Signals: जिन्हें process ignore कर सकता है (e.g., SIGCONT)
  3. Stop Signals: Process को temporarily stop करने के लिए (e.g., SIGSTOP)

Signals Send करने के तरीके:

  1. kill Command:
    kill -9 1234  # Process ID 1234 को forcefully kill करना
    
  2. Ctrl + C (SIGINT): किसी running program को रोकने के लिए
  3. Ctrl + Z (SIGTSTP): Process को background में भेजने के लिए

Signal Handling in C (Linux Programming):
अगर हम चाहते हैं कि process signal को handle करे, तो हम signal() function use कर सकते हैं।

#include 
#include 

void handle_sigint(int sig) {
    printf("Signal %d received. Process नहीं रुकेगा!\n", sig);
}

int main() {
    signal(SIGINT, handle_sigint);
    while (1) {
        printf("Running...\n");
        sleep(1);
    }
    return 0;
}

यह program Ctrl + C से terminate नहीं होगा क्योंकि हमने SIGINT को handle कर लिया है।


53. Deadlock Prevention Methods क्या होते हैं?

Ans. जब multiple processes resources का इंतजार करती हैं और एक दूसरे को block कर देती हैं, तो इसे Deadlock कहते हैं।

Deadlock के चार Conditions (Coffman Conditions):

  1. Mutual Exclusion: एक resource को एक बार में सिर्फ एक ही process use कर सकती है।
  2. Hold and Wait: एक process एक resource को hold करती है और दूसरे resource का wait करती है।
  3. No Preemption: कोई process किसी दूसरे process से forcefully resource नहीं छीन सकती।
  4. Circular Wait: एक process दूसरी का wait करती है और दूसरी पहली का, जिससे एक circle बन जाता है।

Deadlock Prevention Techniques:

  1. Mutual Exclusion को हटा दो: अगर possible हो, तो resources को share करो।
  2. Hold and Wait को avoid करो: Process को एक बार में सारे resources allocate करो।
  3. Preemption allow करो: जरूरत पड़ने पर resources को forcefully छीनो।
  4. Circular Wait तोड़ो: Resource allocation को एक fixed order में करो।

Banker's Algorithm (Deadlock Avoidance)

  • यह algorithm यह check करता है कि किसी process को resource देने के बाद system safe state में रहेगा या नहीं।
  • अगर unsafe state में जाने का chance है, तो resource allocate नहीं किया जाता।

54. Virtual Memory vs. Physical Memory – दोनों में क्या अंतर है?

Ans. Physical Memory असली RAM होती है, जबकि Virtual Memory hard disk का एक हिस्सा होता है जो RAM की कमी को पूरा करता है।

Feature Physical Memory (RAM) Virtual Memory (HDD/SSD)
Location RAM में होती है Hard Disk/SSD में होती है
Speed बहुत तेज़ होती है काफी धीमी होती है
Cost महंगी होती है सस्ती होती है
Size Limited होती है Hard Disk के हिसाब से बड़ी हो सकती है
Usage Programs को fast execution के लिए use करती है जब RAM full होती है तो backup के लिए use होती है

Virtual Memory कैसे काम करती है?

  • जब किसी process को ज्यादा memory चाहिए होती है, तो OS paging technique का use करके hard disk को RAM की तरह use करता है।
  • यह process को ऐसा feel कराता है कि उसे ज्यादा RAM मिली हुई है, लेकिन performance थोड़ा slow हो जाता है।

55. Linux में Shell Script क्या होती है और यह क्यों जरूरी है?

Ans. Shell Script एक file होती है जिसमें multiple Linux commands होते हैं। यह repetitive tasks को automate करने के लिए use की जाती है।

Shell Script क्यों जरूरी है?

  1. Automation: रोजाना के कामों को automate कर सकते हैं।
  2. Efficiency: Commands को बार-बार लिखने की जरूरत नहीं पड़ती।
  3. Error Handling: System tasks को better तरीके से manage किया जा सकता है।

Shell Script Example:

#!/bin/bash
echo "Hello, $USER!"
echo "आज की तारीख: $(date)"
echo "Current Directory: $(pwd)"

इस script को चलाने के लिए:

chmod +x script.sh  # Executable बनाना
./script.sh         # Run करना

इससे screen पर current user, date और directory print होगी।

In this Chapter

Operating System (OS) All Important Questions and Answers in Hindi (MDSU)
Distributed System in Hindi
Real Time System in Hindi
System Calls in Hindi
System Program in Hindi
Structure of Operating System in Hindi
Layers Design of Structure in Hindi
Unix in Hindi
Virtual Machine in Hindi
Kernel-Based Operating System in Hindi
Process Concept in Hindi
Interacting Processes in Hindi
Threads in Hindi
Fundamental of Schedulling in Hindi
Scheduling Criteria in Hindi
Long Medium Short Term Scheduling in Hindi
Scheduling Algorithms in Hindi
Structure of Concurrent System in Hindi
Critical Region in Hindi
Critical Section in Hindi
Inter process Communication in Hindi
Monitor in Hindi
Semaphores in Hindi
Semaphores Implementation & Uses in Hindi
Logical and Physical Address in Hindi
Swapping in Hindi
Contiguous Allocation in Hindi
Segmentation in Hindi
Paging in Hindi
Paging with Segmentation in Hindi
kernel Memory Allocation in Hindi
Page Replacement Algorithms in Hindi
Virtual Memory in Hindi
Virtual Memory with demand Paging in Hindi
Deadlock & Characterization in Hindi
Methods for Handling Deadlocks in Hindi
Deadlock Thrashing in Hindi
Allocation of Frames in Hindi
Virtual Memory using Segmentation in Hindi
Interprocess Communication protocol in Hindi
Network Operating System in Hindi
Design Issues in Distributed File System in Hindi
Network Structure in Hindi
Structure Distributed System in Hindi
File System and Coordination in Hindi
Linux in Hindi
Commands of Linux in Hindi | लिनक्स के कमांड्स हिंदी में
Programmer Interface & File manipulation in Hindi
Process control in Linux in Hindi
Linux Kernel & Signals in Hindi
File System in Linux in Hindi
block & inodes in Hindi
System Editor in Hindi
Character Transliteration in Hindi
ED in Hindi
Vi Editor & There Commands in Hindi
Shell Script in Hindi
Looping & Decision Making in Hindi
Variables & File name Expansion in Hindi
Array in Hindi OS
Sub Program in Hindi
C interface with Linux in Hindi
Simpel Shell Programs in Hindi
BCA Part-1 | Operating Systems | Semester-I | MDSU Exam Paper 2023 (Held in 2024)
What is Operating System (OS) in Hindi
BCA || Operating System 2025 Paper || MDSU Exam Paper
BCA | OS(Operating System) 2023 Paper | MDSU Exam Paper
Type of Operating System in Hindi
Goals of Operating System in Hindi
Operation of Operating system in Hindi
Resource Allocation & Functions in Hindi
class of Operating system in Hindi
Batch Processing in Hindi
Multi Processing in Hindi
Time Sharing in Hindi