System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3011: A thread must call ________ times LeaveCriticalSection() as it called EnterCriticalSection().
- A: double
- B: multiple
- C: same number of
- D: one less
View Answer
C
Q3012: The CS object can be re-entered by the same thread due to ________ support.
- A: multiple process
- B: mutex
- C: recursive
- D: file lock
View Answer
C
Q3013: CRITICAL_SECTION is a ________ locking mechanism.
- A: user-level
- B: process-level
- C: file-based
- D: system-level
View Answer
A
Q3014: Unlike Mutex, CRITICAL_SECTION cannot be used across ________.
- A: DLLs
- B: libraries
- C: threads
- D: processes
View Answer
D
Q3015: CRITICAL_SECTION is considered ________ than mutex in intra-process scenarios.
- A: heavier
- B: slower
- C: lighter
- D: complex
View Answer
C
Q3016: The function ________ is used to non-blockingly test access to a critical section.
- A: WaitForObject()
- B: Sleep()
- C: TryEnterCriticalSection()
- D: PollSection()
View Answer
C
Q3017: What does the CRITICAL_SECTION construct help protect?
- A: file names
- B: thread priorities
- C: shared variables
- D: CPU registers
View Answer
C
Q3018: Shared variables like number of requests must be modified by ________.
- A: all threads at once
- B: multiple processes simultaneously
- C: only one thread at a time
- D: kernel modules
View Answer
C
Q3019: In multithreaded applications, access to shared variables should be ________.
- A: sequential
- B: concurrent
- C: asynchronous
- D: uncontrolled
View Answer
A
Q3020: CRITICAL_SECTION ensures ________ access to shared variables.
- A: random
- B: secure
- C: synchronized
- D: delayed
View Answer
C