Header Ads Widget

MCQs based on Operating system

  Operating system MCQs:-

  1. What is the Critical Section in a program? a) The part of the program where shared variables are accessed and/or updated. b) The final output of the code. c) The remaining portion of the program excluding the Critical Section. d) None of the above.

Answer: a) The part of the program where shared variables are accessed and/or updated.

  1. What is the Race Around Condition? a) The portion of the code in the program where shared variables are accessed and/or updated. b) The final output of the code depends on the order in which the variables are accessed. c) The remaining portion of the program excluding the Critical Section. d) None of the above.

Answer: b) The final output of the code depends on the order in which the variables are accessed.

  1. What are the three conditions that a solution for the critical section problem must satisfy? a) Mutual Exclusion, Progress, and Bounded Waiting. b) Mutual Exclusion, Progress, and Deadlock. c) Hold and Wait, Mutual Exclusion, and No Preemption. d) None of the above.

Answer: a) Mutual Exclusion, Progress, and Bounded Waiting.

  1. What is a Semaphore? a) An integer variable that is accessed only through two atomic operations, wait() and signal(). b) A variable that is accessed only through two atomic operations, wait() and run(). c) A variable that is accessed only through two atomic operations, signal() and stop(). d) None of the above.

Answer: a) An integer variable that is accessed only through two atomic operations, wait() and signal().

  1. What is the difference between a Counting Semaphore and a Mutex? a) A counting semaphore provides mutual exclusion, while a Mutex allows multiple threads to access the shared resource simultaneously. b) A counting semaphore is a binary semaphore, while a Mutex is not. c) A counting semaphore is an integer variable whose value can range over an unrestricted domain, while a Mutex provides mutual exclusion. d) None of the above.

Answer: c) A counting semaphore is an integer variable whose value can range over an unrestricted domain, while a Mutex provides mutual exclusion.

  1. What is Deadlock? a) A situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process. b) A situation where a set of processes are blocked because each process is holding a resource and not waiting for another resource acquired by some other process. c) A situation where a set of processes are not blocked because each process is holding a resource and waiting for another resource acquired by some other process. d) None of the above.

Answer: a) A situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process.

  1. What are the necessary conditions for deadlock to occur? a) Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait. b) Counting Semaphore, Mutex, Deadlock Detection, and Recovery. c) Synchronization Tools, Remainder Section, and Race Around Condition. d) None of the above.

Answer: a) Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.

  1. What are the three ways to handle Deadlock? a) Deadlock prevention or avoidance, Deadlock detection and recovery, and Ignoring the problem all together. b) Deadlock prevention or avoidance, Counting Semaphore, and Mutex. c) Mutual Exclusion, Progress, and Bounded Waiting. d) None of the above.

Answer: a) Deadlock prevention or avoidance, Deadlock detection and recovery, and Ignoring the problem all together.

  Pre  ðŸ‘ˆ                                    👉  Next  


 Similar posts:-

  1. C-programming MCQs part-1
  2. C-programming MCQs part-2
  3. C-programming MCQs part-3
  4. C-programming MCQs part-4
  5. C-programming MCQs part-5
  6. C-programming MCQs part-6
  7. COA MCQs part-1
  8. COA MCQs part-2
  9. COA MCQs part-3
  10. COA MCQs part-4
  11. Microprocessor 8085 MCQs part-1
  12. Microprocessor 8085 MCQs part-2
  13. Microprocessor 8085 MCQs part-3
  14. CSS MCQs part-1
  15. CSS MCQs part-2
  16. CSS MCQs part-3
  17. CSS MCQs part-4
  18. CSS MCQs part-5
  19. Engineering Mathematics -II MCQs part-1
  20. Engineering Mathematics -II MCQs part-2
  21. Engineering Mathematics -II MCQs part-3
  22. Engineering Mathematics -II MCQs part-4
  23. Engineering Mathematics -II MCQs part-5



Post a Comment

0 Comments