Bird
0
0

In a reservation system, if multiple holds expire simultaneously, what is the best approach to handle releasing them efficiently?

medium📝 Analysis Q5 of 15
LLD - Design — Library Management System
In a reservation system, if multiple holds expire simultaneously, what is the best approach to handle releasing them efficiently?
AIgnore expired holds until system restart
BRelease each hold immediately on expiry using separate threads
CBatch process expired holds periodically using a scheduled job
DManually release holds when users log in
Step-by-Step Solution
Solution:
  1. Step 1: Understand simultaneous expiry challenge

    Many holds expiring at once can cause resource spikes if handled individually.
  2. Step 2: Identify efficient handling method

    Batch processing expired holds periodically reduces overhead and improves efficiency.
  3. Final Answer:

    Batch process expired holds periodically using a scheduled job -> Option C
  4. Quick Check:

    Batch expiry handling = efficient resource use [OK]
Quick Trick: Batch expired holds release to save resources [OK]
Common Mistakes:
MISTAKES
  • Using separate threads for each hold causing overhead
  • Relying on manual user action
  • Ignoring expired holds leads to stale data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes