Pages

Saturday, July 6, 2024

Operating Systems course with 35 multiple-choice questions:

 Operating Systems course with 35 multiple-choice questions:

Operating Systems Final Exam

Instructions:

  • Select the best answer for each question.
  • Each question is worth 1 point.
  • There is only one correct answer for each question.

  1. What is the primary purpose of an operating system?

    • A) To provide a user interface
    • B) To manage computer hardware and software resources
    • C) To compile programs
    • D) To allow internet connectivity
  2. Which of the following is not a type of operating system?

    • A) Batch operating system
    • B) Time-sharing operating system
    • C) Real-time operating system
    • D) Distributed operating system
  3. What is a process in the context of operating systems?

    • A) A program in execution
    • B) A static set of instructions
    • C) A type of memory
    • D) An error in the system
  4. Which of the following is used to prevent race conditions?

    • A) Deadlock
    • B) Semaphore
    • C) Paging
    • D) Swapping
  5. What is the purpose of a context switch?

    • A) To switch from user mode to kernel mode
    • B) To switch the CPU from one process to another
    • C) To allocate memory to a process
    • D) To create a new process
  6. Which scheduling algorithm assigns the CPU to the process that requests it first?

    • A) Shortest Job Next (SJN)
    • B) First-Come, First-Served (FCFS)
    • C) Round Robin (RR)
    • D) Priority Scheduling
  7. What is the primary purpose of a page table in virtual memory management?

    • A) To manage I/O devices
    • B) To map virtual addresses to physical addresses
    • C) To allocate CPU time
    • D) To manage file systems
  8. Which of the following is a method used for deadlock prevention?

    • A) Resource allocation graph
    • B) Deadlock detection
    • C) Hold and wait prevention
    • D) Starvation
  9. What is a thread in the context of operating systems?

    • A) A type of process
    • B) The smallest unit of processing that can be scheduled by an operating system
    • C) A static program
    • D) A type of memory
  10. Which of the following is not a state of a process?

    • A) Running
    • B) Waiting
    • C) Executed
    • D) Ready
  11. What is the main purpose of a kernel in an operating system?

    • A) To provide user interfaces
    • B) To manage system resources and communication between hardware and software
    • C) To compile code
    • D) To prevent system crashes
  12. What is the benefit of multiprogramming in operating systems?

    • A) Simplified code
    • B) Reduced power consumption
    • C) Increased CPU utilization
    • D) Improved user interface
  13. Which of the following is true about preemptive scheduling?

    • A) The CPU can be taken away from a process
    • B) Processes run until they are completed
    • C) It is also called non-preemptive scheduling
    • D) It is used in batch systems only
  14. What is the role of a file system in an operating system?

    • A) To manage CPU scheduling
    • B) To manage how data is stored and retrieved
    • C) To manage process synchronization
    • D) To handle virtual memory
  15. What is the primary purpose of virtual memory?

    • A) To provide memory to the CPU
    • B) To extend the apparent amount of RAM available to processes
    • C) To increase the speed of the system
    • D) To store files
  16. Which of the following is a characteristic of a real-time operating system?

    • A) It processes data in batches
    • B) It processes data as it comes in with strict timing constraints
    • C) It is used for personal computing
    • D) It does not support multitasking
  17. Which of the following is an example of inter-process communication (IPC)?

    • A) Message passing
    • B) Context switching
    • C) Memory allocation
    • D) Virtual memory
  18. What is a system call in the context of operating systems?

    • A) A request made by a program to the operating system for a service
    • B) A type of process
    • C) A form of CPU scheduling
    • D) A method of memory management
  19. What is the purpose of a disk scheduler in an operating system?

    • A) To allocate CPU time to processes
    • B) To manage memory allocation
    • C) To determine the order in which disk I/O requests are processed
    • D) To prevent deadlock
  20. Which of the following is an example of a non-preemptive scheduling algorithm?

    • A) Round Robin (RR)
    • B) First-Come, First-Served (FCFS)
    • C) Shortest Remaining Time First (SRTF)
    • D) Priority Scheduling
  21. What is the difference between a process and a thread?

    • A) A process is a single execution path, while a thread is multiple execution paths
    • B) A process has its own memory space, while threads share the same memory space
    • C) A thread is independent of a process
    • D) A process cannot contain multiple threads
  22. Which of the following is an advantage of a multi-threaded process over a multi-process application?

    • A) Lower complexity
    • B) Lower overhead due to shared memory space
    • C) Easier to debug
    • D) Better security
  23. Which of the following is a method to handle deadlocks in operating systems?

    • A) Context switching
    • B) Priority scheduling
    • C) Resource allocation graph
    • D) Memory segmentation
  24. What is the purpose of a scheduler in an operating system?

    • A) To manage memory allocation
    • B) To allocate CPU time to processes
    • C) To handle disk I/O
    • D) To provide a user interface
  25. Which of the following memory management schemes does not allow processes to share the same physical memory?

    • A) Paging
    • B) Segmentation
    • C) Fixed partitioning
    • D) Dynamic partitioning
  26. What is a trap in the context of operating systems?

    • A) A type of synchronous interrupt caused by an exceptional condition
    • B) A method of memory management
    • C) A type of file system
    • D) A process scheduling algorithm
  27. What is the main purpose of the ‘fork’ system call in Unix-like operating systems?

    • A) To create a new thread
    • B) To create a new process
    • C) To allocate memory
    • D) To handle I/O operations
  28. Which of the following is not a common scheduling criterion?

    • A) CPU utilization
    • B) Throughput
    • C) Turnaround time
    • D) Disk space usage
  29. What is the main advantage of using a multi-level queue scheduling algorithm?

    • A) Simplicity
    • B) Predictability
    • C) Ability to handle different types of processes separately
    • D) Minimizes context switching
  30. Which of the following best describes thrashing in the context of operating systems?

    • A) High CPU utilization
    • B) Excessive paging causing low system performance
    • C) Optimal memory allocation
    • D) Efficient disk I/O
  31. What is the primary function of the bootloader?

    • A) To provide a user interface
    • B) To load the operating system into memory
    • C) To manage system calls
    • D) To allocate CPU time
  32. In the context of file systems, what does the term ‘inode’ refer to?

    • A) A type of file
    • B) A data structure that stores information about a file
    • C) A method of memory allocation
    • D) A process state
  33. What is the purpose of the swap space in a virtual memory system?

    • A) To store user files
    • B) To provide additional memory by using disk space
    • C) To speed up CPU operations
    • D) To handle I/O operations
  34. Which of the following is true about the microkernel architecture?

    • A) It runs most services in user space
    • B) It runs all services in kernel space
    • C) It combines user and kernel space
    • D) It is simpler than monolithic kernel architecture