Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q3381: The producer thread releases the mutex by calling:
  • A: ReleaseMutex
  • B: WaitForSingleObject
  • C: CloseHandle
  • D: SetEvent
View Answer
A

Q3382: The message block mutex and event are created in the:
  • A: Main function
  • B: Produce function
  • C: Consume function
  • D: MessageFill function
View Answer
A

Q3383: What does the Sleep function call simulate in the producer thread?
  • A: Random delay between message generation
  • B: Waiting for consumer thread
  • C: Checksum calculation
  • D: Message display
View Answer
A

Q3384: The consumer thread uses _tscanf_s to:
  • A: Get user commands
  • B: Read message data
  • C: Generate checksum
  • D: Signal event
View Answer
A

Q3385: The variable fReady is set to 0 after:
  • A: Message consumption
  • B: Message generation
  • C: Mutex release
  • D: Event signaling
View Answer
A

Q3386: The function _leave is used to:
  • A: Exit the current thread
  • B: Elevate thread priority
  • C: Wait for event
  • D: Reset message flags
View Answer
A

Q3387: What is the data size defined by DATA_SIZE macro?
  • A: 256
  • B: 128
  • C: 512
  • D: 1024
View Answer
A

Q3388: The producer thread stops producing messages when:
  • A: fStop flag is set
  • B: mReady is set
  • C: mGuard is released
  • D: nCons equals mSequence
View Answer
A

Q3389: Which of the following is TRUE about auto-reset events?
  • A: They automatically reset after releasing a single thread
  • B: They require manual reset
  • C: They can release multiple threads simultaneously
  • D: They do not signal threads
View Answer
A

Q3390: What does the variable mTimestamp hold?
  • A: Time message was created
  • B: Checksum value
  • C: Message sequence number
  • D: Mutex handle
View Answer
A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now