Skip to content

Topic MCQs — Operating Systems & Linux

30 questions · DSSSB TGT CS style · Original


Q1. Which is NOT a typical OS function?

  • A) Process management
  • B) Compiling high-level language by default as CPU firmware
  • C) Memory management
  • D) File management Answer: B
    OS manages resources; language compilers are separate tools.

Q2. In multiprogramming:

  • A) Only one program may reside in memory
  • B) Multiple programs reside in memory to improve CPU utilization
  • C) Multiple CPUs are mandatory
  • D) No I/O is allowed Answer: B
    CPU can switch to another job when one waits for I/O.

Q3. Time-sharing OS emphasizes:

  • A) Batch punch cards only
  • B) Interactive time slices among users/processes
  • C) No scheduling
  • D) Only real-time hard deadlines always Answer: B
    Time-sharing provides interactive multitasking via slices.

Q4. A real-time OS is critical when:

  • A) Deadlines must be met (hard/soft)
  • B) Only printing banners
  • C) No interrupts exist
  • D) Disk is optional always Answer: A
    RTOS correctness includes timely response.

Q5. Valid process state transition is:

  • A) Waiting → Running directly always without Ready
  • B) Ready → Running via dispatch
  • C) New → Terminated only path
  • D) Running → New Answer: B
    Scheduler dispatches a ready process to running.

Q6. PCB stands for:

  • A) Process Control Block
  • B) Primary Cache Buffer
  • C) Program Compiler Base
  • D) Peripheral Cable Bus Answer: A
    PCB stores process metadata for the kernel.

Q7. FCFS scheduling can suffer from:

  • A) Belady’s anomaly only
  • B) Convoy effect
  • C) Mandatory preemption every 1 ms
  • D) No waiting time ever Answer: B
    Long job at head delays short jobs (convoy).

Q8. SJF scheduling selects:

  • A) Longest job first
  • B) Shortest CPU burst next
  • C) Random job
  • D) Only I/O-bound last Answer: B
    Shortest Job First minimizes average waiting (with known bursts).

Q9. Round Robin is characterized by:

  • A) No time quantum
  • B) Fixed time quantum and preemption
  • C) Always optimal average wait like SJF
  • D) Non-preemptive only Answer: B
    RR cycles processes with quantum q.

Q10. Priority scheduling may cause:

  • A) Guaranteed no waiting
  • B) Starvation of low-priority processes
  • C) Elimination of PCB
  • D) No context switches Answer: B
    Aging is used to counter starvation.

Q11. Which is a necessary condition for deadlock?

  • A) Spooling
  • B) Circular wait
  • C) Paging
  • D) Time quantum Answer: B
    Coffman: mutual exclusion, hold-and-wait, no preemption, circular wait.

Q12. Banker's algorithm is used for:

  • A) Disk formatting
  • B) Deadlock avoidance via safe-state check
  • C) Compiling C programs
  • D) DNS resolution Answer: B
    Allocates resources only if a safe sequence remains.

Q13. Paging divides:

  • A) Processes into variable segments only
  • B) Address space into fixed-size pages mapped to frames
  • C) Files into directories only
  • D) CPU into cores by OS UI Answer: B
    Pages ↔ frames; reduces external fragmentation.

Q14. Thrashing means:

  • A) CPU overheating only
  • B) Excessive paging with little productive work
  • C) Fast cache hits always
  • D) Deadlock among printers only Answer: B
    System spends most time swapping pages.

Q15. LRU page replacement replaces:

  • A) Most recently used page
  • B) Least recently used page
  • C) Random page always
  • D) Only page 0 Answer: B
    LRU approximates optimal by recency.

Q16. OPT (optimal) page replacement:

  • A) Is always practically implementable with free future knowledge
  • B) Replaces the page used farthest in the future
  • C) Is identical to FIFO always
  • D) Never used as a benchmark Answer: B
    OPT is a theoretical benchmark needing the future reference string.

Q17. Belady’s anomaly is associated notably with:

  • A) LRU
  • B) FIFO
  • C) OPT
  • D) Round Robin CPU only Answer: B
    FIFO may fault more with more frames.

Q18. In Linux, the kernel is:

  • A) Only a text editor
  • B) Core that manages hardware, processes, memory
  • C) A spreadsheet
  • D) Only the GUI theme Answer: B
    Kernel is the OS core; shell is the command interface.

Q19. Command pwd displays:

  • A) Password database
  • B) Present working directory
  • C) Process wait delay
  • D) Printer device Answer: B
    Print Working Directory.

Q20. Absolute path in Linux:

  • A) Starts from current directory only
  • B) Starts from root /
  • C) Cannot include folders
  • D) Is only ~Answer: B
    e.g. /home/user/file.txt.

Q21. chmod is used to:

  • A) Change file permissions
  • B) Change hostname only
  • C) Compile modules
  • D) Kill all processes Answer: A
    Mode bits rwx for user/group/others.

Q22. grep is used to:

  • A) Partition disks
  • B) Search text patterns in files
  • C) Create users only
  • D) Mount NFS only Answer: B
    Pattern search utility.

Q23. ps command shows:

  • A) Packet statistics of Wi-Fi only
  • B) Process status
  • C) Printer spool only
  • D) Python syntax Answer: B
    Lists processes; often paired with kill.

Q24. The root user in Linux:

  • A) Has UID 0 and superuser privileges
  • B) Cannot change permissions
  • C) Is the same as directory .
  • D) Exists only on Windows Answer: A
    Superuser account; home often /root.

Q25. Multiprocessing means:

  • A) Many programs in memory on one CPU only
  • B) Using multiple CPUs/cores
  • C) Only batch tapes
  • D) No concurrency Answer: B
    Distinguish from multiprogramming (many jobs in memory).

Q26. Virtual memory allows:

  • A) Process address space larger than physical RAM (via secondary storage)
  • B) Only ROM execution
  • C) Disabling page tables always
  • D) Removing all disks Answer: A
    Pages swapped between RAM and disk.

Q27. mv command:

  • A) Only deletes files
  • B) Moves or renames files/directories
  • C) Makes virtual memory
  • D) Mounts volumes only Answer: B
    Move/rename.

Q28. Segmentation as memory scheme:

  • A) Uses only fixed-size blocks identical to pages
  • B) Divides programs into logical variable-sized segments
  • C) Is identical to RR scheduling
  • D) Removes need for addresses Answer: B
    Code/data/stack segments etc.

Q29. Which scheduling is non-preemptive by classic definition?

  • A) Round Robin
  • B) FCFS
  • C) SRTF
  • D) Preemptive priority always Answer: B
    FCFS runs until block/finish (non-preemptive).

Q30. cat file.txt typically:

  • A) Displays/concatenates file contents
  • B) Changes ownership
  • C) Creates a process namespace
  • D) Compresses with gzip only Answer: A
    cat prints file(s) to standard output.