System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3481: Which of the following reduces concurrency in multithreaded environments?
- A: Shared memory
- B: Lock-free structures
- C: Critical section locking
- D: Thread pooling
View Answer
C
Q3482: What leads to serialization-like behavior in multithreaded applications?
- A: Semaphore pooling
- B: Multiple threads executing together
- C: Single thread critical section execution
- D: Heap fragmentation
View Answer
C
Q3483: What is the main performance cost of using synchronization mechanisms?
- A: Memory overflow
- B: Increased latency
- C: Reduced interface speed
- D: Thread termination
View Answer
B
Q3484: Why is locking considered costly in synchronization?
- A: It requires pointer arithmetic
- B: It creates deadlocks
- C: It involves kernel operations
- D: It allocates memory
View Answer
C
Q3485: Which synchronization construct showed almost the same performance as no synchronization?
- A: Mutexes
- B: Critical Section
- C: Semaphore
- D: Interlocked Functions
View Answer
D
Q3486: What is the main purpose of declspec(align) modifier?
- A: Increase heap size
- B: Align memory to minimize contention
- C: Reduce thread count
- D: Improve I/O speed
View Answer
B
Q3487: Which function is used to allocate memory with alignment?
- A: malloc()
- B: aligned_memory()
- C: HeapAlloc()
- D: align_malloc()
View Answer
D
Q3488: Which of the following deallocates aligned memory?
- A: free()
- B: memory_delete()
- C: align_free()
- D: release_block()
View Answer
C
Q3489: What is the main trade-off when enforcing synchronization?
- A: More memory usage
- B: Increased complexity
- C: Performance impact
- D: Lower CPU frequency
View Answer
C
Q3490: What synchronization mechanism showed the worst performance at high processor count?
- A: Interlocked functions
- B: Mutexes
- C: Critical sections
- D: Semaphores
View Answer
B