System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3021: One example of a shared variable in a server could be ________.
- A: IP address
- B: number of responses
- C: thread ID
- D: buffer length
View Answer
B
Q3022: The CRITICAL_SECTION construct is used in ________ programming.
- A: single-threaded
- B: multithreaded
- C: batch file
- D: sequential
View Answer
B
Q3023: Shared variables should be modified inside a ________.
- A: log file
- B: critical section
- C: mutex queue
- D: return call
View Answer
B
Q3024: When using CRITICAL_SECTION, an intermediate variable is used to ________.
- A: confuse the compiler
- B: improve memory use
- C: demonstrate the concept
- D: divide access
View Answer
C
Q3025: The number of requests currently under process is a type of ________.
- A: dynamic function
- B: static input
- C: shared variable
- D: hardware trigger
View Answer
C
Q3026: Which of the following would NOT need protection via CRITICAL_SECTION?
- A: count of processed responses
- B: current thread ID
- C: shared resource access log
- D: database connection count
View Answer
B
Q3027: ________ is used to manage synchronization for shared data in threads.
- A: CRITICAL_SECTION
- B: HTTP_REQUEST
- C: API_ROUTE
- D: TCP_BLOCK
View Answer
A
Q3028: The critical section ensures that threads modify shared data in a ________ manner.
- A: competitive
- B: race-condition-prone
- C: orderly
- D: undefined
View Answer
C
Q3029: Before modifying a shared variable, a thread must first ________ the critical section.
- A: leave
- B: ignore
- C: enter
- D: bypass
View Answer
C
Q3030: After updating a shared variable, a thread must ________ the critical section.
- A: reinitialize
- B: destroy
- C: leave
- D: renew
View Answer
C