<?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 Nishalini on Medium]]></title>
        <description><![CDATA[Stories by Nishalini on Medium]]></description>
        <link>https://medium.com/@nishalini017?source=rss-af44a9fa8e3d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Nishalini on Medium</title>
            <link>https://medium.com/@nishalini017?source=rss-af44a9fa8e3d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:15:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nishalini017/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[Why Your Music Doesn’t Stop When You Open Instagram]]></title>
            <link>https://medium.com/@nishalini017/why-your-music-doesnt-stop-when-you-open-instagram-4f0c1120eda8?source=rss-af44a9fa8e3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f0c1120eda8</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[cpu]]></category>
            <dc:creator><![CDATA[Nishalini]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 06:26:19 GMT</pubDate>
            <atom:updated>2026-02-05T06:26:19.278Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever noticed this? You’re listening to music on your phone, then you open Instagram, start scrolling reels, replying to messages, maybe even switch to WhatsApp for a second — and the music just keeps playing in the background. No interruption, no restart. It almost feels like your phone has multiple brains working at the same time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*bn_aAp0djksUCRNFsjBbEQ.png" /></figure><p>But the truth is a bit different — and way more interesting.</p><p>At the core of your phone is the Operating System , and its main job is to manage all the running applications and the hardware resources like the CPU and memory. Even though we open many apps, there is usually only one main CPU handling everything. The OS creates the illusion that everything is running at once.</p><p>This happens through something called multitasking. In simple terms, multitasking means the OS allows multiple processes (running apps) to share the CPU. But here’s the catch — the CPU can only execute one instruction at a time. So instead of doing things truly simultaneously, the OS switches between apps extremely fast. This is known as context switching.</p><p>During a context switch, the OS saves the state of the current process (like where it stopped, what data it was using) and loads the state of another process. This switching happens in tiny time slices, often in milliseconds. Because it’s so fast, we don’t notice the transitions. To us, it feels like music, Instagram, and messaging apps are all running together smoothly.</p><p>Now let’s talk specifically about your music app. Once a song starts playing, the app mostly streams audio data to the speaker using small, regular CPU bursts. This kind of task is not very demanding. In OS terms, it’s often treated as a background process with steady but low resource needs. The OS scheduler makes sure it keeps getting enough CPU time to maintain uninterrupted playback.</p><p>Instagram, on the other hand, is a much heavier process. It constantly loads images and videos, handles user input, runs animations, and communicates with servers over the internet. This requires more CPU time and memory. The OS scheduler notices this higher demand and allocates more time slices to Instagram — but without completely starving the music app.</p><p>This balancing act is handled by the CPU scheduling algorithm inside the OS. The scheduler decides which process runs next and for how long. It aims to keep the system responsive while ensuring background tasks, like music playback, continue smoothly. That’s why even while Instagram is busy loading a reel, the OS still briefly switches back to the music process to keep the audio flowing without gaps.</p><p>Another important factor is priority levels. Many operating systems give media playback tasks a slightly higher priority than normal background apps because interruptions in audio are very noticeable to users. So the OS is designed to avoid glitches in sound, even when other apps are competing for attention.</p><p>Of course, this system has limits. If you open a very heavy game that uses intense graphics and processing power, it can consume a large share of CPU and memory. Now the scheduler has less flexibility, and other processes might get delayed. That’s when music may stutter or apps may reload.</p><p>So when your music keeps playing while you scroll through Instagram, it’s not magic. It’s your Operating System constantly managing processes, performing rapid context switches, and smartly scheduling CPU time. All of this happens silently in the background — just so your experience feels smooth and effortless.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f0c1120eda8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>