System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3081: Accessing shared memory without synchronization may lead to ________.
- A: accurate results
- B: data consistency
- C: invalid table
- D: better speed
View Answer
C
Q3082: The producer thread runs ________ to generate messages.
- A: continuously
- B: on demand
- C: periodically
- D: after user input
View Answer
C
Q3083: Consumer displays message only when requested by the ________.
- A: producer
- B: table
- C: checksum
- D: user
View Answer
D
Q3084: ________ helps avoid message display during update.
- A: Table locking
- B: Synchronization
- C: Timestamping
- D: Logging
View Answer
B
Q3085: Consumer validates messages using ________.
- A: table index
- B: CS lock
- C: message ID
- D: checksum
View Answer
D
Q3086: CS is used to enforce ________ in data access.
- A: latency
- B: serialization
- C: integrity
- D: duplication
View Answer
C
Q3087: What is the Producer-Consumer problem mainly used to demonstrate?
- A: Thread communication
- B: Mutual exclusion
- C: Memory allocation
- D: Interrupt handling
View Answer
B
Q3088: Which header file is used in the sample program?
- A:
- B:
- C: Everything.h
- D:
View Answer
C
Q3089: What does the `CRITICAL_SECTION` in the MSG_BLOCK structure ensure?
- A: Data initialization
- B: Data race
- C: Mutex synchronization
- D: Thread delay
View Answer
C
Q3090: Which flag indicates the readiness of a message in the sample program?
- A: mChecksum
- B: fStop
- C: fReady
- D: nCons
View Answer
C