Bahria University Entry Test computer science: Operating Systems MCQs

Practice Operating Systems MCQs for Bahria University Entry Test computer science — topic-wise sets with solved answers.

Bahria University Entry Test computer science: Operating Systems MCQs — sample questions

  1. Question 1

    Q1. What is the primary function of the Operating System?

    • A) Managing hardware resources
    • B) Providing user interface
    • C) Executing application software
    • D) All of the above

    Answer: All of the above

    Explanation: The primary function of an OS is to manage hardware resources, provide a platform for application software, and offer a user interface.

  2. Question 2

    Q2. Which scheduling algorithm is prone to starvation?

    • A) First-Come-First-Served (FCFS)
    • B) Shortest Job First (SJF)
    • C) Priority Scheduling
    • D) Round Robin (RR)

    Answer: Priority Scheduling

    Explanation: Priority Scheduling can lead to starvation if a process with low priority is indefinitely delayed by higher-priority processes.

  3. Question 3

    Q3. What is the purpose of a semaphore in Operating System?

    • A) Process synchronization
    • B) Memory management
    • C) File system management
    • D) I/O management

    Answer: Process synchronization

    Explanation: Semaphores are used for process synchronization, controlling access to shared resources by multiple processes.

  4. Question 4

    Q4. Which of the following is a characteristic of a Real-Time Operating System?

    • A) Predictable response time
    • B) High throughput
    • C) Multi-user support
    • D) Multi-threading

    Answer: Predictable response time

    Explanation: Real-Time Operating Systems are designed to provide predictable response times to events, making them suitable for time-critical applications.

  5. Question 5

    Q5. What is the difference between a thread and a process?

    • A) Threads are heavier than processes
    • B) Threads share the same memory space, while processes do not
    • C) Threads are scheduled independently, while processes are not
    • D) Threads are used for I/O operations, while processes are used for computation

    Answer: Threads share the same memory space, while processes do not

    Explanation: Threads within a process share the same memory space, whereas processes have their own separate memory spaces.

  6. Question 6

    Q6. Which file system is known for its journaling feature?

    • A) FAT32
    • B) NTFS
    • C) EXT3
    • D) HFS+

    Answer: EXT3

    Explanation: EXT3 is a journaling file system, which means it logs changes before writing them to disk, ensuring file system consistency.

  7. Question 7

    Q7. What is the purpose of the 'wait()' system call?

    • A) To pause the execution of a process
    • B) To wait for a child process to terminate
    • C) To send a signal to a process
    • D) To create a new process

    Answer: To wait for a child process to terminate

    Explanation: The 'wait()' system call is used by a parent process to wait for the termination of its child process.

  8. Question 8

    Q8. Which memory allocation technique is prone to external fragmentation?

    • A) Paging
    • B) Segmentation
    • C) Both Paging and Segmentation
    • D) Neither Paging nor Segmentation

    Answer: Segmentation

    Explanation: Segmentation is prone to external fragmentation because it allocates memory in variable-sized blocks, leading to gaps between allocated segments.

  9. Question 9

    Q9. What is the function of the Memory Management Unit (MMU)?

    • A) To manage I/O operations
    • B) To handle interrupts
    • C) To translate virtual addresses to physical addresses
    • D) To manage file systems

    Answer: To translate virtual addresses to physical addresses

    Explanation: The MMU translates virtual addresses used by a program into physical addresses in the computer's memory.

  10. Question 10

    Q10. Which of the following is a benefit of using threads?

    • A) Improved security
    • B) Reduced memory usage
    • C) Faster context switching
    • D) All of the above

    Answer: Faster context switching

    Explanation: Threads have faster context switching compared to processes because they share the same memory space and resources.

  11. Question 11

    Q11. What is a deadlock in Operating System?

    • A) A situation where a process is waiting for a resource held by another process
    • B) A situation where a process is terminated abruptly
    • C) A situation where a process is unable to access a required resource
    • D) A situation where multiple processes are competing for resources

    Answer: A situation where a process is waiting for a resource held by another process

    Explanation: A deadlock occurs when two or more processes are blocked, each waiting for a resource held by the other.

  12. Question 12

    Q12. Which algorithm is used for disk scheduling?

    • A) First-Come-First-Served (FCFS)
    • B) Shortest Seek Time First (SSTF)
    • C) SCAN
    • D) All of the above

    Answer: All of the above

    Explanation: FCFS, SSTF, and SCAN are all disk scheduling algorithms used to optimize disk access times.

  13. Question 13

    Q13. What is the purpose of the 'fork()' system call?

    • A) To create a new thread
    • B) To create a new process
    • C) To send a signal to a process
    • D) To wait for a child process to terminate

    Answer: To create a new process

    Explanation: The 'fork()' system call is used to create a new process by duplicating the calling process.

  14. Question 14

    Q14. Which of the following is a characteristic of a microkernel?

    • A) It includes all OS services in the kernel
    • B) It runs OS services in user space
    • C) It is used only in embedded systems
    • D) It is slower than a monolithic kernel

    Answer: It runs OS services in user space

    Explanation: A microkernel runs OS services in user space, making it more modular and potentially more secure.

  15. Question 15

    Q15. What is the Banker's algorithm used for?

    • A) Deadlock avoidance
    • B) Deadlock detection
    • C) Resource allocation
    • D) Process scheduling

    Answer: Deadlock avoidance

    Explanation: The Banker's algorithm is used for deadlock avoidance by ensuring that resource allocation does not lead to a deadlock state.

  16. Question 16

    Q16. Which of the following is true about a kernel?

    • A) It is a user-level program
    • B) It manages hardware resources
    • C) It provides a command-line interface
    • D) It is responsible for file system management

    Answer: It manages hardware resources

    Explanation: The kernel is the core part of the OS that manages hardware resources and provides services to applications.

  17. Question 17

    Q17. What is a critical section in Operating System?

    • A) A section of code that accesses shared resources
    • B) A section of code that is executed only once
    • C) A section of code that is never executed
    • D) A section of code that is executed by multiple processes simultaneously

    Answer: A section of code that accesses shared resources

    Explanation: A critical section is a part of the code that accesses shared resources and must be executed atomically to prevent data inconsistency.

  18. Question 18

    Q18. Which synchronization mechanism is used to avoid busy waiting?

    • A) Semaphores
    • B) Monitors
    • C) Mutexes
    • D) All of the above

    Answer: All of the above

    Explanation: Semaphores, monitors, and mutexes are all synchronization mechanisms that can be used to avoid busy waiting by putting a process to sleep until a resource is available.

  19. Question 19

    Q19. What is the purpose of paging in memory management?

    • A) To reduce external fragmentation
    • B) To increase the size of the memory
    • C) To improve the speed of memory access
    • D) To simplify memory allocation

    Answer: To reduce external fragmentation

    Explanation: Paging reduces external fragmentation by dividing memory into fixed-size blocks called pages, making memory allocation more efficient.

  20. Question 20

    Q20. Which of the following is a type of Operating System?

    • A) Batch Operating System
    • B) Time-Sharing Operating System
    • C) Distributed Operating System
    • D) All of the above

    Answer: All of the above

    Explanation: Batch, Time-Sharing, and Distributed Operating Systems are all types of Operating Systems, each designed for specific use cases.

Loading...