Translated with AI · suggest a fix

Computer Science MCQsकंप्यूटर साइंस एमसीक्यू · ऑपरेटिंग सिस्टम अवधारणाएँ

Operating System Conceptsऑपरेटिंग सिस्टम अवधारणाएँ questions and answersप्रश्न और उत्तर

Operating-system MCQs in placement tests check definitions and small calculations. Learn the four deadlock conditions, the scheduling formulas and how paging splits an address, and most questions become quick.

  • Unlimitedअसीमित fresh questionsनए प्रश्न
  • Answersउत्तर always one tap awayहमेशा एक टैप दूर
  • 1 subtopicउप-टॉपिक
  • TCS NQT ~1

Practice questions are in English for now.अभ्यास के प्रश्न अभी अंग्रेज़ी में हैं।

How operating system concepts worksऑपरेटिंग सिस्टम अवधारणाएँ को समझिए

A process has its own address space; threads of one process share it. Context switches between processes cost more than between threads.

Scheduling algorithms trade off waiting time and fairness: SJF minimises average waiting time, round robin gives every process regular turns.

Virtual memory lets a process use more memory than is physically present; too many page faults (thrashing) slow everything down.

Tricks that save timeसमय बचाने वाली ट्रिक्स

All tricks →सभी ट्रिक्स →

Each trick says when to use it, why it works and when it fails. Formula tricks are checked by code over their whole range.हर ट्रिक बताती है कि उसे कब इस्तेमाल करें, वह क्यों काम करती है और कब नहीं। सूत्र वाली ट्रिक्स को कोड से उनकी पूरी रेंज पर जाँचा गया है।

Exam strategyपरीक्षा रणनीति

Deadlock needs all four conditions, so break any one

Use it when:कब इस्तेमाल करें: Questions on deadlock prevention, or “which condition is violated”.

  1. Mutual exclusion, hold and wait, no pre-emption, circular wait: a deadlock needs every one.
  2. Prevention = make one impossible (for example, order resources to break circular wait).
Exampleउदाहरण

Processes must request all resources at once. Which condition is broken?

→ Hold and wait.

Why it works, and when it failsयह क्यों काम करती है, और कब नहीं

Why:क्यों: The four conditions are jointly necessary (Coffman conditions), so removing any one rules out deadlock.

Limits:सीमाएँ: Avoidance (banker’s algorithm) works differently: it keeps the system in a safe state instead of removing a condition.

Solved examplesहल किए गए उदाहरण

Answers and full solutions are shown. Hide them to test yourself first.उत्तर और पूरे हल दिखाए गए हैं। पहले खुद को परखने के लिए इन्हें छिपाइए।

  1. Example 1उदाहरण 1 · Operating System Concepts · Easyआसान

    Which of the following operations must be performed in kernel mode?

    1. Calling a C library function such as strcpy
    2. Updating the page table
    3. Executing a simple arithmetic expression in user code
    4. Reading a global variable from the process's data segment
    Answer:उत्तर: Updating the page table
    1. Identify operations that modify kernel data structures.
    2. Page tables are kernel‑only structures; updating them requires privilege.
    3. All other options are ordinary user‑mode actions.
  2. Example 2उदाहरण 2 · Operating System Concepts · Mediumमध्यम

    Three processes arrive at time 0 with burst times 6 ms, 8 ms, and 4 ms. What is the average waiting time under non‑preemptive Shortest Job First (SJF) scheduling?

    1. 4.67 ms
    2. 5.33 ms
    3. 6.00 ms
    4. 3.33 ms
    Answer:उत्तर: 4.67 ms
    1. Sort the burst times ascending: 4, 6, 8.
    2. Waiting time for first (4) = 0; second (6) = 4; third (8) = 4+6 = 10.
    3. Average = (0 + 4 + 10) / 3 = 14/3 ≈ 4.67 ms.
  3. Example 3उदाहरण 3 · Operating System Concepts · Hardकठिन

    A counting semaphore is initialized to 10. After 6 P (wait) operations and 4 V (signal) operations, what is the current value of the semaphore?

    1. 8
    2. 10
    3. 12
    4. 4
    Answer:उत्तर: 8
    1. Start with initial value: 10.
    2. P operation (wait) decrements the value: 10 - 6 = 4.
    3. V operation (signal) increments the value: 4 + 4 = 8.
  4. Example 4उदाहरण 4 · Operating System Concepts · Mediumमध्यम

    Thrashing in a virtual memory system is best described as:

    1. The system spends most of its time swapping pages in and out rather than executing processes.
    2. The CPU utilization drops to zero because all processes are blocked on I/O.
    3. The page replacement algorithm selects the optimal page every time.
    4. The working set of each process fits entirely in physical memory.
    Answer:उत्तर: The system spends most of its time swapping pages in and out rather than executing processes.
    1. Recall thrashing = high paging activity, low CPU utilization.
    2. Match the description that mentions excessive swapping.
  5. Example 5उदाहरण 5 · Operating System Concepts · Mediumमध्यम

    When a user program needs to read a file from the hard disk, which transition must occur?

    1. User mode to Kernel mode
    2. Kernel mode to User mode
    3. User mode to Hardware mode
    4. No mode change is required
    Answer:उत्तर: User mode to Kernel mode
    1. Identify that I/O is a privileged operation.
    2. User programs cannot access hardware directly.
    3. They must trigger a system call to switch to Kernel mode.
  6. Example 6उदाहरण 6 · Operating System Concepts · Mediumमध्यम

    Thrashing in a virtual memory system is best described as:

    1. The system spends most of its time swapping pages in and out rather than executing processes.
    2. The CPU utilization drops to zero because all processes are blocked on I/O.
    3. The page replacement algorithm selects the optimal page every time.
    4. The working set of each process fits entirely in physical memory.
    Answer:उत्तर: The system spends most of its time swapping pages in and out rather than executing processes.
    1. Recall thrashing = high paging activity, low CPU utilization.
    2. Match the description that mentions excessive swapping.

Common mistakesआम गलतियाँ

  • Thinking one deadlock condition is enough; all four must hold.
  • Mixing up turnaround and waiting time.
  • Forgetting that threads share heap memory.

Frequently asked questionsअक्सर पूछे जाने वाले प्रश्न

Which OS topics are asked most?

Scheduling, deadlocks, paging and process vs thread questions come up most often.

Are these questions checked?

Yes: lint rules plus a blind solve by a second AI model from a different family, and human review of a sample.

Do I need to know a specific OS?

No. The questions use standard textbook concepts that apply to Linux and Windows alike.

Search by task, format or tool name.