System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q3461: Using HeapCreate() allows each thread to have its own ________.
- A: Stack
- B: Heap
- C: Memory cache
- D: Global memory
View Answer
B
Q3462: Threads compete for resources such as CPU and ________.
- A: Memory
- B: Input devices
- C: Network
- D: Files
View Answer
B
Q3463: To improve performance in concurrent threads, competition for resources should be ________.
- A: minimized
- B: maximized
- C: ignored
- D: duplicated
View Answer
A
Q3464: Third-party APIs can be considered for managing ________ in concurrent threads.
- A: Network access
- B: Memory management
- C: CPU scheduling
- D: File handling
View Answer
B
Q3465: malloc() function allocates memory from the ________.
- A: Stack
- B: Heap
- C: Register
- D: Global memory
View Answer
B
Q3466: free() function is used to ________ dynamically allocated memory.
- A: Allocate
- B: Lock
- C: Unlock
- D: Deallocate
View Answer
D
Q3467: To allocate memory safely in multithreaded programs, HeapAlloc() should be used with a ________.
- A: Heap handle
- B: Thread ID
- C: Process ID
- D: Mutex
View Answer
A
Q3468: Which function is used to create a new heap in Windows threading?
- A: HeapAlloc()
- B: HeapCreate()
- C: malloc()
- D: free()
View Answer
B
Q3469: Synchronization can negatively impact ________.
- A: security
- B: application size
- C: performance
- D: user interface
View Answer
C
Q3470: Locking, waiting, and interlocked operations are considered ________.
- A: fast
- B: expensive
- C: invisible
- D: redundant
View Answer
B