Operating Systems

Page? or Segment?

It then so happened, that, memory management couldn’t pick a favorite: Segmentation or Paging. So, in true sitcom style, it mashed both together and chaos (and brilliance) ensued. Welcome to the quirky world of Segmented Paging and Paged Segmentation — the memory management odd couple. What is Segmented Paging? This one is like ordering pizza… Continue reading Page? or Segment?

Operating Systems

Logical and Physical Addresses

Imagine a scenario where you live in flat number 05 of the apartment. This flat is actually located on the third floor, house number 305. You have invited your friend to home and you say, “I am at flat number 05”. Your friends, unaware of the building’s quirky numbering system, assumes that Flat 05 must… Continue reading Logical and Physical Addresses

Operating Systems

Are You a Party Planner?

Note: As you read through below, do the book keeping work. Imagine you have been invited to a high-profile party. The venue? A massive hall filled with thousands of guests. The twist? You, the party planner, have to figure out how to fit everyone in without anyone feeling cramped or out of place. Everyone has… Continue reading Are You a Party Planner?

General Discussions · Operating Systems

When Computers Play Musical Chairs

Imagine you’re at a party playing musical chairs. In this twisted game, there are five people and one chair (Oh, does that remind of something else as well? only that there would be four chairs ). The music stops, and everyone scrambles. But instead of sitting, each person grabs part of a chair. Aryan takes… Continue reading When Computers Play Musical Chairs

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

Operating Systems

Inter-Process Communication

IPC is a mechanism that allows processes to exchange data and signals in an operating system. Processes may need to communicate to share resources, synchronize tasks, or distribute workloads efficiently. IPC can be achieved using various techniques, including message passing, shared memory, pipes, sockets, and signals. There are five major ways by which IPC is… Continue reading Inter-Process Communication