Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Multiple Choice Questions
Q481: Mutual exclusion is preserved in Algorithm 3 because only one process can have _______.
- A: flag=true
- B: turn equal to its ID
- C: both flag and turn at same value
- D: access to memory
View Answer
B
Q482: Bounded waiting in Algorithm 3 means that a process will eventually enter its critical section after at most ___________ entries by the other process.
- A: two
- B: one
- C: three
- D: infinite
View Answer
B
Q483: In the critical section problem, processes must request permission to enter _______.
- A: common memory
- B: critical section
- C: CPU
- D: hard disk
View Answer
B
Q484: What is the main idea behind the Bakery Algorithm?
- A: Processes choose a random number
- B: Processes wait for administrator's approval
- C: Processes take a ticket number
- D: Processes compete for CPU time
View Answer
C
Q485: The Bakery Algorithm is named after what real-life scenario?
- A: Ticketed service at bakeries
- B: Computer repair shop
- C: Supermarket checkout
- D: Train station
View Answer
A
Q486: In the Bakery Algorithm, if two processes get the same number, the one with _________ gets priority.
- A: lower ID
- B: higher ID
- C: lower memory address
- D: higher CPU usage
View Answer
A
Q487: In Bakery Algorithm, the ticket numbers are assigned using the ______ function.
- A: random()
- B: min()
- C: max()
- D: sum()
View Answer
C
Q488: (a,b) < (c,d) if _______.
- A: a
- B: a>d or (a==d and b>d)
- C: a>b
- D: b
View Answer
A
Q489: In the Bakery Algorithm, when can a process Pi enter its critical section?
- A: When number[i]=0
- B: When number[i] is the smallest among all
- C: When number[i] is maximum
- D: When choosing[i]=true
View Answer
B
Q490: In the Bakery Algorithm, if P2 and P4 have ticket numbers 7 and 8 respectively, who enters critical section first?
- A: P2
- B: P4
- C: Both together
- D: Depends on process ID
View Answer
A