Operating Systems

OS Synchronization Mechanisms

In modern operating systems, efficient synchronization is necessary for performance and reliability. While semaphores, mutexes, and condition variables provide fundamental solutions, contemporary OS architectures demand advanced techniques. Below is a good to know list to understand the context with respect to state-of-art OS synchronization matters. Mutexes vs. Semaphores: We need to understand when to use… Continue reading OS Synchronization Mechanisms

Operating Systems

Busy Wait and Peterson’s

Busy waiting occurs when a process continuously checks a condition (e.g., a flag or a variable) in a loop without yielding control of the CPU. This wastes CPU cycles because the process remains active instead of sleeping or being blocked until it can proceed. An example code can be seen below: Here, the process does… Continue reading Busy Wait and Peterson’s

Operating Systems

The Producer and Consumer

The producer-consumer problem is a classic synchronization issue in operating systems where multiple producers generate data or resources, and multiple consumers use that data. It is usually addressed using synchronization mechanisms like semaphores, mutex locks, and condition variables to have proper coordination, preventing race conditions and deadlocks. The problem plays a major role in managing… Continue reading The Producer and Consumer

Operating Systems

Burst Time

Burst time is the total time taken by the process to run on a CPU and this is also called as execution time or running time. It is a crucial factor in CPU scheduling that impacts on system performance, process turnaround time, and response time. Different scheduling algorithms use burst time to determine execution order.… Continue reading Burst Time