<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hemanth Vasudev N P on Medium]]></title>
        <description><![CDATA[Stories by Hemanth Vasudev N P on Medium]]></description>
        <link>https://medium.com/@hemanthvasu822?source=rss-782181b47cf8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*w1p7E7q0RBEJmdfT</url>
            <title>Stories by Hemanth Vasudev N P on Medium</title>
            <link>https://medium.com/@hemanthvasu822?source=rss-782181b47cf8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:24:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hemanthvasu822/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Invisible Juggler Inside Your Computer: Scheduling Algorithms Explained with Real-Life…]]></title>
            <link>https://medium.com/@hemanthvasu822/the-invisible-juggler-inside-your-computer-scheduling-algorithms-explained-with-real-life-0ab052ae6a2a?source=rss-782181b47cf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ab052ae6a2a</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[os]]></category>
            <dc:creator><![CDATA[Hemanth Vasudev N P]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 11:32:56 GMT</pubDate>
            <atom:updated>2026-02-01T11:32:56.812Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>The Invisible Juggler Inside Your Computer: Scheduling Algorithms Explained with Real-Life Analogies</strong></h3><p>Every time I open a browser tab, play music, or type a document, my computer is doing a lot more work than I realize. Behind the scenes, dozens — sometimes hundreds — of tasks are competing for attention. Yet everything feels smooth (most of the time).</p><p>That smoothness doesn’t happen by accident.</p><p>At the heart of it lies <strong>CPU scheduling</strong> — the operating system’s way of deciding which task gets to use the processor next. While this sounds deeply technical, the logic behind scheduling is surprisingly human. In fact, we see the same patterns play out in everyday life.</p><p>Let’s step away from operating system jargon and look at scheduling algorithms through real-world situations we all understand.</p><h3>First-Come, First-Served (FCFS): The Drive-In Restaurant</h3><p>Imagine pulling into a drive-in restaurant. Cars line up, orders are taken one by one, and food is served strictly in the order of arrival. Simple and fair — right?</p><p>That’s exactly how <strong>First-Come, First-Served (FCFS)</strong> scheduling works. The process that arrives first gets the CPU first.</p><p>The problem appears when the car ahead of you orders half the menu. Everyone behind waits, no matter how small their order is. This situation is called the <strong>convoy effect</strong>, and operating systems suffer from it too. One long-running process can block many smaller, faster tasks.</p><h3>Shortest Job Next (SJN): The Barber’s Choice</h3><p>Now picture a barber shop. The barber decides to serve customers who need a quick trim before someone who wants a full makeover. This approach clears more customers quickly and keeps the shop moving.</p><p>This is the idea behind <strong>Shortest Job Next (SJN)</strong> scheduling. By executing the shortest task first, the system reduces average waiting time.</p><p>But there’s a downside. If quick jobs keep arriving, long jobs may never get their turn. In scheduling terms, this is known as <strong>starvation</strong> — and no one likes waiting endlessly in a barber shop.</p><h3>Round Robin (RR): Gym Circuit Training</h3><p>Think about circuit training at the gym. You spend a fixed amount of time at each exercise station before moving on. Every workout gets equal attention, and no single exercise dominates your session.</p><p>That’s <strong>Round Robin scheduling</strong> in action. Each process gets a fixed time slice of the CPU.</p><p>This ensures fairness, especially in interactive systems. However, if the time slice is too small, the system spends more time switching between tasks than actually executing them. This overhead is known as <strong>context switching</strong>, and it can hurt performance.</p><h3>Priority Scheduling: The Emergency Room</h3><p>In an emergency room, patients aren’t treated based on arrival time. Someone with a life-threatening condition is attended to immediately, while minor injuries wait.</p><p>This is how <strong>Priority Scheduling</strong> works. Tasks with higher priority get CPU time first.</p><p>While this is ideal for critical processes, lower-priority tasks may suffer. If high-priority tasks keep coming, background processes may never run, leading once again to starvation.</p><h3>Multilevel Queue Scheduling: Amusement Park Lines</h3><p>At an amusement park, not everyone stands in the same line. There are VIP queues, fast-track passes, and regular lines. Each queue follows its own rules.</p><p>This reflects <strong>Multilevel Queue Scheduling</strong>, where processes are grouped into separate queues based on type — interactive jobs, batch jobs, background tasks, and so on.</p><p>The advantage is better organization. The drawback is perceived unfairness. If one queue always gets preference, others feel stuck watching people cut ahead.</p><h3>Multilevel Feedback Queue (MLFQ): The Adaptive Classroom</h3><p>Imagine a classroom where the teacher adjusts difficulty based on student performance. Fast learners get more challenging tasks, while others receive more time and simpler work. Over time, students move between levels.</p><p>This adaptive approach mirrors <strong>Multilevel Feedback Queue (MLFQ)</strong> scheduling. Processes can move between queues depending on how they behave.</p><p>MLFQ balances fairness and efficiency better than most algorithms, but it’s also complex to design and tune. The system must constantly monitor and adjust priorities.</p><h3>Final Thoughts: Your OS as a Traffic Controller</h3><p>Scheduling algorithms may sound abstract, but they’re deeply rooted in everyday logic. Restaurants, barber shops, gyms, hospitals, amusement parks, and classrooms all follow similar rules for managing limited resources.</p><p>So the next time your system feels slow, remember — it’s not just “lag.” It’s your operating system acting like a traffic controller, deciding who moves next and who waits.</p><p>In the end, scheduling isn’t only about speed. It’s about <strong>fairness, balance, and adaptability</strong> — and that’s what keeps our digital world running smoothly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ab052ae6a2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>