← Coding for Infra
Advanced
Concurrency in Python, Go and C++
Concurrency primitives coordinate overlapping work and shared state. Choose threads, processes or asynchronous tasks from the runtime and the work they must perform.
This concept is part of Premium, which includes all concepts, course lessons and answers.
Get Premium · ₹2,000 / $256 months of access · one payment · no auto-renew
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS
Coding for InfraWrite a thread-safe counter in C++ that many threads increment. What are the memory-ordering and layout choices?→Coding for InfraIn Go, download many model shards concurrently with a concurrency limit, a timeout and clean cancellation. Write it.→Coding for InfraImplement a batcher that flushes when the batch is full or when a timeout expires. What breaks in the timer path?→Networking, Interconnects & StorageWhat does NCCL actually do when you call all-reduce, and how does it decide which algorithm to use?→Coding for InfraImplement a bounded request log with timers that remain correct under concurrency→CUDA, Triton & Kernel EngineeringSum 100 million floats on the GPU as fast as the hardware allows. Write the kernel and justify each step.→
