System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2801: In the given example, initial value of N is ________.
- A: 5
- B: 4
- C: 6
- D: 3
View Answer
B
Q2802: After thread 1 executes alone, what are the values of M and N?
- A: M=5, N=5
- B: M=4, N=4
- C: M=6, N=6
- D: M=5, N=4
View Answer
A
Q2803: After thread 2 executes after thread 1 (normal), what are the final values?
- A: M=4, N=4
- B: M=5, N=5
- C: M=6, N=6
- D: M=5, N=6
View Answer
C
Q2804: Worker threads should not access each other’s data before all workers are ________.
- A: Terminated
- B: Created
- C: Blocked
- D: Optimized
View Answer
B
Q2805: Synchronization ensures that a thread completes ________ before another uses its data.
- A: Debugging
- B: Execution
- C: Termination
- D: Switching
View Answer
B
Q2806: Which data structure is mentioned in relation to thread conflict?
- A: Stack
- B: Queue
- C: Heap
- D: Array
View Answer
B
Q2807: In the code example, which operation is performed by both threads?
- A: M = N + 2
- B: M = N
- C: M = M * 2
- D: N = M + 1
View Answer
B
Q2808: What must be prevented when multiple threads remove from a queue?
- A: Empty queue
- B: Multiple deletions
- C: Delays
- D: Memory overflow
View Answer
B
Q2809: What kind of error arises due to improper handling of shared resources in parallel processing?
- A: Syntax error
- B: Compilation error
- C: Critical section problem
- D: Runtime warning
View Answer
C
Q2810: The solution using a global variable uses a flag to indicate if a variable is being ________.
- A: Printed
- B: Skipped
- C: Modified
- D: Copied
View Answer
C