Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Multiple Choice Questions

Q521: In the TestAndSet pseudo-code, what type is the parameter 'target'?
  • A: integer
  • B: float
  • C: boolean
  • D: string
View Answer
C

Q522: The critical section problem mainly occurs when processes share ________.
  • A: independent code
  • B: private data
  • C: shared variables
  • D: local memory
View Answer
C

Q523: Critical section problem can be solved easily by disabling interrupts in ________.
  • A: multiprocessor systems
  • B: distributed systems
  • C: uniprocessor systems
  • D: cloud systems
View Answer
C

Q524: Which section follows immediately after leaving the critical section?
  • A: Entry section
  • B: Exit section
  • C: Remainder section
  • D: Initialization section
View Answer
C

Q525: What characteristic ensures that TestAndSet operations do not interfere with each other?
  • A: Parallel execution
  • B: Atomic execution
  • C: Random execution
  • D: Sequential execution
View Answer
B

Q526: What does the Swap instruction need apart from the global 'lock' variable?
  • A: A key variable for each process
  • B: An interrupt handler
  • C: Shared memory
  • D: Hardware support
View Answer
A

Q527: If two TestAndSet instructions execute at the same time, they are executed ______.
  • A: simultaneously
  • B: atomically in random order
  • C: sequentially in some order
  • D: delayed indefinitely
View Answer
C

Q528: What type of solution will be discussed in the next lecture according to the content?
  • A: Software-only solution
  • B: Hybrid cloud solution
  • C: Hardware-based good solution
  • D: Memory-mapping solution
View Answer
C

Q529: Which solution delays entry into critical sections due to message passing?
  • A: TSL solution
  • B: Disabling interrupts in multiprocessor
  • C: Swap instruction
  • D: Local variable key method
View Answer
B

Q530: Which hardware solution solves the critical section problem while satisfying all three conditions?
  • A: TestAndSet
  • B: Swap
  • C: Combined Algorithm 3
  • D: Semaphore
View Answer
C

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now