Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q3761: The worker thread increments tasksComplete while holding the _______.
  • A: Exclusive SRW lock
  • B: Mutex
  • C: Spin lock
  • D: Semaphore
View Answer
A

Q3762: The delay_cpu function simulates a delay by _______.
  • A: Pausing CPU cycles
  • B: Allocating memory
  • C: Terminating thread
  • D: Creating a new thread
View Answer
A

Q3763: traceFlag controls whether _______ are printed during execution.
  • A: debug messages
  • B: error messages
  • C: thread IDs
  • D: task completion status
View Answer
A

Q3764: Worker threads terminate after completing _______.
  • A: All assigned tasks
  • B: A set time interval
  • C: A fixed CPU usage
  • D: A fixed number of threads
View Answer
A

Q3765: The _aligned_malloc function is used to allocate memory aligned to _______.
  • A: cache line size
  • B: page size
  • C: thread size
  • D: stack size
View Answer
A

Q3766: Closing the thread pool work object is done using _______.
  • A: CloseThreadpoolWork
  • B: DestroyThreadpool
  • C: FreeThreadpool
  • D: CloseThreadpool
View Answer
A

Q3767: Freeing the memory allocated for thread arguments uses _______.
  • A: _aligned_free
  • B: free
  • C: malloc
  • D: realloc
View Answer
A

Q3768: The function _tprintf is used for _______.
  • A: Formatted console output
  • B: Memory allocation
  • C: Thread creation
  • D: Lock initialization
View Answer
A

Q3769: The objectNumber in THARG identifies the _______.
  • A: Thread index
  • B: CPU core number
  • C: Work unit
  • D: Lock ID
View Answer
A

Q3770: The program takes the number of threads and tasks as _______.
  • A: command line arguments
  • B: hardcoded variables
  • C: user input
  • D: function parameters
View Answer
A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now