System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3101: _____ is used to protect access to the shared message block.
- A: MessageGuard
- B: Critical Section
- C: Deadlock prevention
- D: Spinlock
View Answer
B
Q3102: The Producer stops producing messages when ____ is set.
- A: fReady
- B: fStop
- C: mSequence
- D: nCons
View Answer
B
Q3103: The Producer fills the message only after acquiring
- A: Mutex
- B: Semaphore
- C: Spinlock
- D: Critical section
View Answer
D
Q3104: The program uses how many threads besides the main thread?
- A: 2
- B: 1
- C: 3
- D: 4
View Answer
A
Q3105: Which of the following functions is not part of the sample program?
- A: MessageDisplay()
- B: MessageFill()
- C: ThreadJoin()
- D: Produce()
View Answer
C
Q3106: Checksum validation is performed in
- A: Consume()
- B: Produce()
- C: MessageFill()
- D: MessageDisplay()
View Answer
D
Q3107: The message buffer is initialized in the
- A: Produce()
- B: MessageFill()
- C: main()
- D: Consume()
View Answer
B
Q3108: What type is used for mData array elements?
- A: int
- B: long
- C: DWORD
- D: float
View Answer
C
Q3109: mBlock.nLost keeps track of
- A: Messages consumed
- B: Messages produced
- C: Messages not consumed
- D: Messages duplicated
View Answer
C
Q3110: The `mChecksum` variable stores
- A: A hash of the thread ID
- B: Validation result of the data buffer
- C: Total message count
- D: Error code
View Answer
B