NSCT – Concurrency & Parallelism (Introductory) MCQs 20 min Score: 0 Attempted: 0/20 Subscribe 1. What is concurrency in programming? (A) Executing tasks one after another (B) Executing multiple tasks at the same time (C) Allocating memory (D) Creating loopsShow All AnswersShow All Answers 2. What is parallelism in programming? (A) Handling exceptions (B) Running tasks sequentially (C) Performing multiple operations exactly at the same time (D) Defining variablesShow All Answers 3. Which is the main difference between concurrency and parallelism? (A) There is no difference (B) Concurrency is faster than parallelism (C) Parallelism uses loops, concurrency does not (D) Concurrency is about managing multiple tasks; parallelism is about executing them simultaneouslyShow All Answers 4. What is a thread? (A) A loop structure (B) A type of variable (C) The smallest unit of a process that can be executed independently (D) A functionShow All Answers 5. What is a process in programming? (A) An instance of a program in execution (B) A function (C) A loop (D) A variableShow All Answers 6. Which problem occurs when two threads try to access the same resource simultaneously? (A) Memory leak (B) Deadlock (C) Syntax error (D) Race conditionShow All Answers 7. What is a deadlock? (A) A memory allocation issue (B) A type of loop (C) A syntax error (D) A situation where two or more processes wait indefinitely for resourcesShow All Answers 8. What is a critical section? (A) A loop (B) A part of the program where shared resources are accessed (C) A variable declaration (D) A functionShow All Answers 9. Which of the following is used to control access to shared resources? (A) Locks / Mutex (B) Loops (C) Variables (D) FunctionsShow All Answers 10. What is synchronization in concurrent programming? (A) Running tasks sequentially (B) Coordinating threads or processes to avoid conflicts (C) Allocating memory (D) Defining variablesShow All Answers 11. Which of the following can improve program performance by executing tasks simultaneously? (A) Concurrency (B) Parallelism (C) Loops (D) VariablesShow All Answers 12. Which is a common method to implement concurrency in programming? (A) Functions (B) Loops (C) Multithreading (D) VariablesShow All Answers 13. What is a thread-safe operation? (A) An operation executed only in a single loop (B) An operation that can be executed by multiple threads without causing conflicts (C) An operation that uses variables (D) An operation inside a functionShow All Answers 14. Which is a common challenge in concurrent programming? (A) Syntax errors (B) Race conditions and deadlocks (C) Infinite loops (D) Memory allocationShow All Answers 15. Which scheduling technique allows multiple tasks to share CPU time effectively? (A) Time slicing (B) Loop iteration (C) Function calling (D) Variable assignmentShow All Answers 16. Which programming model divides a program into independent threads for execution? (A) Multithreading (B) Single-threaded (C) Sequential (D) Loop-basedShow All Answers 17. Which of the following is true about parallelism? (A) Handles exceptions automatically (B) Can be done with a single core only (C) Avoids loops (D) Requires multiple cores or processorsShow All Answers 18. Which of the following helps prevent conflicts when multiple threads access shared data? (A) Loops (B) Synchronization mechanisms (C) Variables (D) FunctionsShow All Answers 19. What is context switching? (A) Saving and restoring the state of a thread or process so the CPU can switch to another task (B) Allocating memory (C) Running loops (D) Handling exceptionsShow All Answers 20. What is the main goal of concurrency and parallelism? (A) To improve performance and resource utilization by executing multiple tasks efficiently (B) To create loops (C) To store variables (D) To handle input/outputShow All Answers