<?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 PRANAV P K on Medium]]></title>
        <description><![CDATA[Stories by PRANAV P K on Medium]]></description>
        <link>https://medium.com/@pkpranavirs?source=rss-0510dccbd219------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*eHZcY7SBpkZ5SKDY</url>
            <title>Stories by PRANAV P K on Medium</title>
            <link>https://medium.com/@pkpranavirs?source=rss-0510dccbd219------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:31:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pkpranavirs/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 OS Doesn’t Run Programs — It Negotiates With Them]]></title>
            <link>https://medium.com/@pkpranavirs/the-os-doesnt-run-programs-it-negotiates-with-them-742bca115230?source=rss-0510dccbd219------2</link>
            <guid isPermaLink="false">https://medium.com/p/742bca115230</guid>
            <dc:creator><![CDATA[PRANAV P K]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 12:16:16 GMT</pubDate>
            <atom:updated>2026-02-02T04:40:05.270Z</atom:updated>
            <content:encoded><![CDATA[<h3>The OS Doesn’t Run Programs — It Negotiates With Them</h3><h3>Introduction: A Misleading Mental Model</h3><p>Operating systems are commonly described as entities that <em>run</em> programs. This description is simple, intuitive, and wrong. While it works at a surface level, it hides how modern operating systems actually behave under the hood.</p><p>Research in operating systems consistently shows that programs are not executed through rigid commands issued to the kernel. Instead, programs express <em>intent</em>, and the OS decides how to respond based on available resources, global system state, and competing workloads. Execution becomes adaptive, conditional, and cooperative rather than deterministic.</p><p>In practice, an operating system is not an executor — it is a mediator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TRPPh6j_i9_8QQtO2lhVCA.png" /></figure><h3>System Calls Are Expressions of Intent</h3><p>At the interface level, system calls appear authoritative. A program calls malloc(),read(),or fork() and expects a result. Internally, however, these calls are best understood as <em>requests</em> rather than instructions.</p><p>Operating systems research emphasizes that:</p><ul><li>System calls do not imply ownership of resources</li><li>The kernel evaluates requests dynamically</li><li>The outcome may be delayed, modified, or reversed later</li></ul><p>For example, memory allocation does not immediately imply physical memory assignment. Virtual memory allows the OS to defer actual allocation until access occurs. Similarly, file I/O may be buffered, reordered, or postponed. The application requests service; the OS decides when and how to fulfill it.</p><p>This decoupling is fundamental to scalability and performance.</p><h3>CPU Scheduling as Arbitration, Not Control</h3><p>Scheduling is often explained as the OS choosing which process runs next. In reality, scheduling is a complex arbitration problem involving fairness, latency, and throughput.</p><p>The <strong>Lottery Scheduling</strong> research formalizes this idea by treating CPU time as a shared resource distributed through probabilistic mechanisms. Processes hold tickets that represent priority, but those tickets do not guarantee execution.</p><p>From this model, several insights emerge:</p><ul><li>Priority signals preference, not entitlement</li><li>CPU time is allocated proportionally, not absolutely</li><li>Execution order adapts continuously</li></ul><p>The OS does not “run” a program when it requests CPU time. It negotiates between all runnable processes, balancing competing demands without offering strict guarantees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLbbj0qgPksIZ6wsuFy4jw.png" /></figure><h3>Memory Management Is an Ongoing Conversation</h3><p>Memory management further illustrates the negotiated nature of execution. Research on working sets and virtual memory shows that memory allocation is never final.</p><p>Operating systems continuously:</p><ul><li>Observe access patterns</li><li>Predict future behavior</li><li>Adjust allocations under pressure</li></ul><p>Techniques such as demand paging, copy-on-write, and page replacement delay commitment until modification or access occurs. Programs behave as if they own memory, but that ownership is provisional. Pages may be reclaimed, relocated, or shared without the program’s involvement.</p><p>Memory pressure introduces further negotiation. The OS may reduce allocations, swap pages, or invoke out-of-memory policies. Allocation is not a promise — it is a conditional agreement.</p><h3>Overcommitment and Best-Effort Guarantees</h3><p>Modern operating systems deliberately overcommit resources. They allow programs to request more memory, threads, or file descriptors than can physically be supported at once.</p><p>This design choice reflects an important research insight:</p><ul><li>Most programs do not use all requested resources simultaneously</li><li>Strict guarantees waste capacity</li><li>Best-effort policies maximize utilization</li></ul><p>As a result, the OS makes optimistic assumptions and adjusts when reality diverges. When overcommitment fails, corrective actions — such as throttling or termination — occur. These are not failures of execution but consequences of negotiation under constrained conditions.</p><h3>Exokernels: Making Negotiation Explicit</h3><p>The <strong>Exokernel</strong> architecture challenges the traditional role of the kernel by stripping it of policy decisions. Instead of managing resources directly, the kernel enforces protection and exposes raw hardware capabilities to applications.</p><p>In this design:</p><ul><li>Applications choose how to manage resources</li><li>The kernel ensures isolation and safety</li><li>Policy moves to user space</li></ul><p>Exokernels make explicit what conventional kernels imply: the OS is not responsible for deciding <em>how</em> resources are used, only for arbitrating access. Control is shared rather than centralized.</p><p>This model reveals that negotiation is not a limitation — it is a design principle.</p><h3>The End-to-End Argument and Shared Responsibility</h3><p>The <strong>End-to-End Arguments in System Design</strong> further reinforce this perspective. They demonstrate that correctness and efficiency cannot be guaranteed solely by lower system layers.</p><p>Key conclusions include:</p><ul><li>Some guarantees cannot be enforced centrally</li><li>Applications must participate in decision-making</li><li>System layers cooperate rather than dominate</li></ul><p>Once correctness becomes a shared responsibility, the idea of negotiation becomes unavoidable. The OS provides mechanisms, not outcomes. Programs adapt to behavior rather than command it.</p><h3>Blocking, Latency, and Cooperative Progress</h3><p>Research on concurrency and I/O emphasizes that blocking is expensive and often undesirable. When a program blocks, it relinquishes control and relies on the OS to resume it appropriately.</p><p>The OS responds by:</p><ul><li>Scheduling other work</li><li>Deferring completion</li><li>Managing wake-up conditions</li></ul><p>Here again, progress depends on cooperation. Programs yield control; the OS decides when to resume them. Execution becomes a dialogue rather than a directive.</p><h3>Why This Model Matters</h3><p>Understanding execution as negotiation explains many real-world behaviors:</p><ul><li>Performance variability under load</li><li>Non-deterministic scheduling outcomes</li><li>Memory allocation surprises</li><li>Resource throttling and prioritization</li></ul><p>These behaviors are not bugs. They are consequences of a system designed to balance competing demands rather than enforce rigid control.</p><h3>Conclusion: The OS as Mediator</h3><p>Operating systems do not run programs in the strict sense. They arbitrate access to shared resources, adapt to dynamic conditions, and balance fairness against performance. Programs request services; the OS negotiates outcomes.</p><p>This negotiated execution model enables scalability, flexibility, and resilience. It trades certainty for adaptability — a trade that has defined successful operating systems for decades.</p><p>Once this perspective is adopted, the OS stops looking like an executor and starts looking like what it truly is: a silent mediator, constantly negotiating beneath every running program.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=742bca115230" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>