System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3251: Semaphore maximum represents the _______.
- A: number of threads
- B: number of resources
- C: maximum wait time
- D: maximum queue size
View Answer
B
Q3252: When a thread is created in a suspended state, it will not _______ until activated.
- A: start
- B: wait
- C: release
- D: signal
View Answer
A
Q3253: Using semaphores can help avoid _______ threads in suspended state.
- A: multiple
- B: creating
- C: waiting
- D: executing
View Answer
B
Q3254: The function used to increase the semaphore count after producing an item is _______.
- A: ReleaseSemaphore()
- B: WaitSemaphore()
- C: CreateSemaphore()
- D: OpenSemaphore()
View Answer
A
Q3255: A semaphore initialized to 0 causes threads to _______ until the semaphore is released.
- A: run
- B: wait
- C: stop
- D: continue
View Answer
B
Q3256: In a semaphore-based producer-consumer model, the consumer _______ the semaphore count when it consumes an item.
- A: increments
- B: decrements
- C: resets
- D: ignores
View Answer
B
Q3257: Semaphores help enforce _______ exclusion in concurrent programming.
- A: mutual
- B: thread
- C: shared
- D: resource
View Answer
A
Q3258: Threads waiting on a semaphore are blocked until the semaphore count is _______.
- A: negative
- B: zero
- C: greater than 0
- D: less than 0
View Answer
C
Q3259: The producer-consumer problem can be efficiently handled using _______.
- A: semaphores
- B: mutexes
- C: critical sections
- D: locks
View Answer
A
Q3260: When the semaphore count is zero, the semaphore is considered _______.
- A: signaled
- B: unsignaled
- C: invalid
- D: waiting
View Answer
B