Concurrency & Asynchronous Performance Questions

Using parallelism, concurrency, and asynchronous execution to improve throughput and responsiveness. Covers thread pools, event loops, async/non-blocking I/O, contention and lock overhead, and the coordination costs that limit parallel speedup. Focuses on the performance implications of concurrency choices rather than concurrency correctness alone.

HardSystem Design
63 practiced

Design a thread-safe concurrent sorted set API that supports insert(key), remove(key), contains(key), iterate-in-order with weak consistency, and snapshot views. Discuss underlying data structures (concurrent skip lists, lock-coupling B-trees), lock-free versus fine-grained locking strategies, memory reclamation, and performance trade-offs for reads versus writes.

HardSystem Design
64 practiced

Design a parallel sorting approach for a multi-core server that sorts very large in-memory arrays. Compare parallel quicksort, sample sort, and parallel merge sort in terms of load balancing, cache locality, synchronization costs, and scalability. Recommend an approach and justify your choice for a production in-memory sort service.

HardTechnical
60 practiced

A high-throughput image cache implemented in Java uses a plain HashMap and LRU eviction. Under heavy concurrent access the app sees intermittent crashes and corrupted cache state. Design a thread-safe, performant caching approach for mobile that preserves LRU behavior. Discuss lock strategies (coarse lock vs striping), use of concurrent collections, memory pressure handling, and testing approaches to validate correctness under concurrency.

That is every published Concurrency & Asynchronous Performance question for Software Engineer so far. Browse the other topics in this category, or practice this one interactively.