Bird
0
0

Why is it important to minimize the duration a lock is held in concurrent systems?

hard🧠 Conceptual Q10 of 15
LLD - Design — Parking Lot System
Why is it important to minimize the duration a lock is held in concurrent systems?
ATo make the system use more memory
BTo reduce waiting time and increase system throughput
CTo ensure threads never block
DTo allow threads to skip critical sections
Step-by-Step Solution
Solution:
  1. Step 1: Understand lock duration impact

    Long lock holding causes other threads to wait, reducing concurrency and throughput.
  2. Step 2: Identify benefit of minimizing lock time

    Shorter lock duration reduces waiting, improving overall system performance.
  3. Final Answer:

    To reduce waiting time and increase system throughput -> Option B
  4. Quick Check:

    Minimize lock time = better throughput [OK]
Quick Trick: Hold locks briefly to boost concurrency [OK]
Common Mistakes:
MISTAKES
  • Thinking longer locks improve safety
  • Assuming threads never block regardless
  • Believing skipping critical sections is safe

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes