Concurrency

  • Threads That Think They Are Independent But They Never Truly Are

    Threads That Think They Are Independent But They Never Truly Are

    In concurrent programming, every thread behaves as if it owns its timeline. It “believes” it runs independently, executes its logic, and progresses based on its internal state. But this sense of autonomy is an illusion. Beneath the surface, a far more powerful entity dictates the true order of reality: the scheduler. The Illusion of…

  • Kernel Locking and Concurrency Pitfalls in Operating Systems

    Kernel Locking and Concurrency Pitfalls in Operating Systems

    In modern operating systems, concurrency isn’t optional — it’s fundamental. Multiple threads and processes access shared resources constantly: memory, I/O, scheduling queues, filesystem metadata. Without strict synchronization, the kernel becomes a war zone of race conditions, data corruption, and unpredictable crashes. The kernel sits at the lowest level of control. If a locking mistake…