<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet href="/static/feed.xsl" type="text/xsl" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:quartz="https://quartz.jzhao.xyz/ns">
  <script xmlns="http://www.w3.org/1999/xhtml" src="/static/scripts/xslt-polyfill-214fd525.js"></script>
  <title>/wiki / os</title>
  <subtitle>Recent notes in /wiki / os on Animesh Mishra</subtitle>
  <link href="https://animishraa05.github.io/wiki/os" />
  <link rel="alternate" type="text/html" href="https://animishraa05.github.io/wiki/os" />
  <category term="wiki/os" />
  <id>https://animishraa05.github.io/wiki/os</id>
  <updated>2026-06-11T00:00:00.000Z</updated>
  <contributor>
    <name>Animesh Mishra</name>
    <email>animesh.mishra818@gmail.com</email>
  </contributor>
  <logo>https://animishraa05.github.io/icon.png</logo>
  <icon>https://animishraa05.github.io/icon.png</icon>
  <generator>Quartz v4.6.0 -- quartz.jzhao.xyz</generator>
  <rights type="html">&amp;amp;copy; 2026 Animesh Mishra</rights>
  
  <entry>
    <title>batch-operating-system</title>
    <link href="https://animishraa05.github.io/wiki/os/batch-operating-system" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/batch-operating-system.md" />
    <summary>Formal Definition “Batch Operating System is an operating system in which similar jobs are grouped into batches and executed automatically without user interaction.” Explanation A batch OS was one of the earliest operating system types, designed for the era when computers were expensive, slow, and s...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Batch Operating System is an operating system in which similar jobs are grouped into batches and executed automatically without user interaction.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;A batch OS was one of the earliest operating system types, designed for the era when computers were expensive, slow, and scarce. Instead of each user interactively running their program, jobs (punch cards or tape reels) were collected into a batch and submitted to the computer at once. The batch OS would load and execute each job automatically, one after another, without any user interaction during execution. When one job finished, the system immediately started the next. This maximized the utilization of the expensive computer by eliminating idle time between jobs. The tradeoff was that users had to wait — sometimes hours or days — for their output.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Users submit jobs (programs + data) on punch cards or magnetic tape&lt;/li&gt;
&lt;li&gt;The operator collects jobs into a batch — grouping similar jobs together for efficiency&lt;/li&gt;
&lt;li&gt;The batch OS (resident monitor) loads the first job from the batch into memory&lt;/li&gt;
&lt;li&gt;The job executes to completion (or until an error) with no user interaction&lt;/li&gt;
&lt;li&gt;Output (results) is written to a printer or output tape&lt;/li&gt;
&lt;li&gt;The OS loads the next job automatically&lt;/li&gt;
&lt;li&gt;After all jobs in the batch complete, results are returned to users&lt;/li&gt;
&lt;li&gt;The resident monitor stays in memory and manages the job-to-job transition&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: batch_os Pages: 1 --&gt;
&lt;svg width=&quot;891pt&quot; height=&quot;82pt&quot; viewBox=&quot;0.00 0.00 891.00 82.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 77.6)&quot;&gt;
&lt;title&gt;batch_os&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-77.6 886.77,-77.6 886.77,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- JOBS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;JOBS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;106.25,-41.6 0,-41.6 0,0 106.25,0 106.25,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;53.12&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;User Jobs&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;53.12&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Cards / Tape)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BATCH --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;BATCH&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;260.41,-38.8 143.25,-38.8 143.25,-2.8 260.41,-2.8 260.41,-38.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;201.83&quot; y=&quot;-16.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Batch Collection&lt;/text&gt;
&lt;/g&gt;
&lt;!-- JOBS&amp;#45;&amp;gt;BATCH --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;JOBS-&gt;BATCH&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M106.67,-20.8C114.76,-20.8 123.21,-20.8 131.59,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;131.41,-24.3 141.41,-20.8 131.41,-17.3 131.41,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- MON --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MON&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;476.16,-41.6 354.33,-41.6 354.33,0 476.16,0 476.16,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;415.25&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Resident Monitor&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;415.25&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Batch OS)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BATCH&amp;#45;&amp;gt;MON --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;BATCH-&gt;MON&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M260.88,-20.8C286.23,-20.8 316.21,-20.8 342.9,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;342.6,-24.3 352.6,-20.8 342.6,-17.3 342.6,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;307.37&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;load batch&lt;/text&gt;
&lt;/g&gt;
&lt;!-- CPU --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;CPU&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;673.64,-38.8 562.71,-38.8 562.71,-2.8 673.64,-2.8 673.64,-38.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;618.18&quot; y=&quot;-16.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;CPU Execution&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MON&amp;#45;&amp;gt;CPU --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;MON-&gt;CPU&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M476.53,-20.8C499.98,-20.8 526.92,-20.8 550.9,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;550.9,-24.3 560.9,-20.8 550.9,-17.3 550.9,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;519.44&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;run job 1&lt;/text&gt;
&lt;/g&gt;
&lt;!-- CPU&amp;#45;&amp;gt;CPU --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;CPU-&gt;CPU&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M600.32,-38.95C597.57,-48.34 603.52,-56.8 618.18,-56.8 626.42,-56.8 631.91,-54.12 634.65,-50.11&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;638.09,-50.81 635.85,-40.45 631.14,-49.95 638.09,-50.81&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;618.18&quot; y=&quot;-61&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;job 2 ...&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OUT --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OUT&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;882.77,-41.6 772.63,-41.6 772.63,0 882.77,0 882.77,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;827.7&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Output&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;827.7&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Printer / Tape)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- CPU&amp;#45;&amp;gt;OUT --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;CPU-&gt;OUT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M673.97,-20.8C700.68,-20.8 732.99,-20.8 761.01,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;760.8,-24.3 770.8,-20.8 760.8,-17.3 760.8,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;723.14&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;completion&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_batch_os Pages: 1 --&gt;
&lt;svg width=&quot;292pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 292.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_batch_os&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 287.63,-205.07 287.63,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;147.87&quot; cy=&quot;-100.51&quot; rx=&quot;103.89&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.87&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Batch Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;219.27&quot; cy=&quot;-59.01&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;219.27&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M178.15,-82.91C182.41,-80.44 186.77,-77.9 190.99,-75.45&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;166.06&quot; y=&quot;-81.88&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTI --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTI&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;147.71&quot; cy=&quot;-18&quot; rx=&quot;76.08&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.71&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multiprogramming OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTI --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTI&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M147.84,-82.2C147.81,-68.53 147.77,-49.92 147.75,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.79&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTIT --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTIT&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;77.13&quot; cy=&quot;-142.96&quot; rx=&quot;57.55&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;77.13&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multitasking OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTIT --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTIT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M118.69,-118.02C113.82,-120.95 108.79,-123.97 103.98,-126.85&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;138.84&quot; y=&quot;-125.14&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RTOS --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;RTOS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;219.85&quot; cy=&quot;-141.05&quot; rx=&quot;53.01&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;219.85&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Real-Time OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;RTOS --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--RTOS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M178.82,-117.94C183.24,-120.43 187.76,-122.98 192.11,-125.43&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;157.96&quot; y=&quot;-113.58&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DIST --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DIST&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;149.31&quot; cy=&quot;-183.07&quot; rx=&quot;54.15&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;149.31&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Distributed OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;DIST --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--DIST&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M148.19,-118.83C148.43,-132.52 148.76,-151.13 148.99,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;148.59&quot; y=&quot;-133.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PROC --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PROC&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;76.09&quot; cy=&quot;-59.9&quot; rx=&quot;76.09&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;76.09&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Process Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PROC --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PROC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M117.02,-83.05C113.37,-80.99 109.65,-78.88 106.01,-76.83&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;125.27&quot; y=&quot;-82.64&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Jobs are grouped into batches and processed sequentially without user interaction&lt;/li&gt;
&lt;li&gt;Maximizes hardware utilization by eliminating manual job-switching idle time&lt;/li&gt;
&lt;li&gt;No interactivity — users submit jobs and come back later for results&lt;/li&gt;
&lt;li&gt;Resident monitor (a simple OS) manages job loading and execution&lt;/li&gt;
&lt;li&gt;Suitable for large, repetitive, non-interactive workloads (payroll, billing, report generation)&lt;/li&gt;
&lt;li&gt;Poor turnaround time — users may wait hours or days for output&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — batch OS is a historical type of OS&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../multiprogramming-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multiprogramming-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multiprogramming Operating System&lt;/a&gt; — batch OS runs one job at a time; multiprogramming keeps many in memory and switches on I/O&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../multitasking-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multitasking-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multitasking Operating System&lt;/a&gt; — batch OS has no interactivity; multitasking provides responsive user experience&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../real-time-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;real-time-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Real-Time Operating System&lt;/a&gt; — batch OS has no timing constraints; RTOS guarantees response deadlines&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../process-management&quot; class=&quot;internal alias&quot; data-slug=&quot;process-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Process Management&lt;/a&gt; — even batch OS needs basic process management to load and execute jobs&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../distributed-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;distributed-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Distributed Operating System&lt;/a&gt; — both solve different aspects of maximizing resource utilization&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Batch OS is largely obsolete for general-purpose computing but survives in high-throughput computing (HPC batch schedulers like SLURM, PBS)&lt;/li&gt;
&lt;li&gt;A batch with a long-running job delays all subsequent jobs — no preemption&lt;/li&gt;
&lt;li&gt;Debugging was extremely painful: if a job failed, the programmer got a printout (core dump) hours later&lt;/li&gt;
&lt;li&gt;No priority mechanism — FIFO processing within the batch, though priority batch scheduling was later developed&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>cpu-privilege-rings</title>
    <link href="https://animishraa05.github.io/wiki/os/cpu-privilege-rings" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/cpu-privilege-rings.md" />
    <summary>Formal Definition “Protection rings are a hierarchical mechanism to protect system data and functionality from faults and malicious behavior by restricting the privilege level at which code can execute.” Explanation CPU privilege rings are a hardware-enforced security model baked into the processor ...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Protection rings are a hierarchical mechanism to protect system data and functionality from faults and malicious behavior by restricting the privilege level at which code can execute.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;CPU privilege rings are a hardware-enforced security model baked into the processor itself. Most modern architectures (x86, ARM) support multiple privilege levels — typically 4 rings on x86 (Ring 0 through Ring 3). The operating system uses only two: Ring 0 (kernel mode, most privileged) and Ring 3 (user mode, least privileged). Rings 1 and 2 exist in the hardware but are rarely used by mainstream OSes. The critical insight is that this protection is enforced by the CPU at the instruction level — even if a user-mode program tries to execute a privileged instruction, the CPU blocks it and raises an exception before any harm is done. This makes rings a fundamental building block of OS security.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The current privilege level (CPL) is stored in a CPU register (CS register’s RPL field on x86)&lt;/li&gt;
&lt;li&gt;Every memory segment and page has a descriptor privilege level (DPL) — the CPU checks CPL against DPL before allowing access&lt;/li&gt;
&lt;li&gt;Privileged instructions (LGDT, LIDT, HLT, IN, OUT, STI, CLI) can only execute at CPL 0&lt;/li&gt;
&lt;li&gt;When the OS boots, the CPU runs at CPL 0 (Ring 0) — the kernel sets up page tables, interrupt handlers, and process structures&lt;/li&gt;
&lt;li&gt;When launching a user process, the kernel sets CPL to 3 (Ring 3) and transfers control&lt;/li&gt;
&lt;li&gt;A syscall raises the CPL from 3 to 0; a return-from-interrupt lowers it back to 3&lt;/li&gt;
&lt;li&gt;The CPU automatically checks CPL on every instruction fetch and memory access — no software overhead for the check&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: privilege_rings Pages: 1 --&gt;
&lt;svg width=&quot;221pt&quot; height=&quot;418pt&quot; viewBox=&quot;0.00 0.00 221.00 418.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 413.64)&quot;&gt;
&lt;title&gt;privilege_rings&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-413.64 216.98,-413.64 216.98,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- R0 --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;R0&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; cx=&quot;106.49&quot; cy=&quot;-368.35&quot; rx=&quot;67.44&quot; ry=&quot;41.3&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-380.95&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Ring 0&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-364.15&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-347.35&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Full Access&lt;/text&gt;
&lt;/g&gt;
&lt;!-- R1 --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;R1&lt;/title&gt;
&lt;ellipse fill=&quot;#e0e0e0&quot; stroke=&quot;black&quot; cx=&quot;106.49&quot; cy=&quot;-244.84&quot; rx=&quot;106.49&quot; ry=&quot;29.42&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-249.04&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Ring 1&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-232.24&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Unused by most OS)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- R0&amp;#45;&amp;gt;R1 --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;R0-&gt;R1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M106.49,-326.89C106.49,-313.64 106.49,-298.95 106.49,-285.75&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;109.99,-286.12 106.49,-276.12 102.99,-286.12 109.99,-286.12&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;150.62&quot; y=&quot;-296.45&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;less privilege →&lt;/text&gt;
&lt;/g&gt;
&lt;!-- R2 --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;R2&lt;/title&gt;
&lt;ellipse fill=&quot;#e0e0e0&quot; stroke=&quot;black&quot; cx=&quot;106.49&quot; cy=&quot;-149.01&quot; rx=&quot;106.49&quot; ry=&quot;29.42&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-153.21&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Ring 2&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-136.41&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Unused by most OS)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- R1&amp;#45;&amp;gt;R2 --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;R1-&gt;R2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M106.49,-215.17C106.49,-207.25 106.49,-198.49 106.49,-190.04&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;109.99,-190.33 106.49,-180.33 102.99,-190.33 109.99,-190.33&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- R3 --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;R3&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;106.49&quot; cy=&quot;-41.3&quot; rx=&quot;59.73&quot; ry=&quot;41.3&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-53.9&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Ring 3&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-37.1&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;User Mode&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.49&quot; y=&quot;-20.3&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Restricted&lt;/text&gt;
&lt;/g&gt;
&lt;!-- R2&amp;#45;&amp;gt;R3 --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;R2-&gt;R3&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M106.49,-119.12C106.49,-111.47 106.49,-102.97 106.49,-94.5&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;109.99,-94.55 106.49,-84.55 102.99,-94.55 109.99,-94.55&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_cpu_privilege_rings Pages: 1 --&gt;
&lt;svg width=&quot;273pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 273.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_cpu_privilege_rings&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 268.71,-205.07 268.71,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;150.14&quot; cy=&quot;-100.51&quot; rx=&quot;88.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;150.14&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;CPU Privilege Rings&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UMODE --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;221.53&quot; cy=&quot;-59.01&quot; rx=&quot;43.18&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;221.53&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;User Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;UMODE --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--UMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M180,-83.15C185.35,-80.04 190.88,-76.83 196.09,-73.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;167.79&quot; y=&quot;-70.38&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KMODE --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;149.98&quot; cy=&quot;-18&quot; rx=&quot;48.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;149.98&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KMODE --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M150.1,-82.2C150.08,-68.53 150.04,-49.92 150.01,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;160.19&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MODE --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MODE&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;79.39&quot; cy=&quot;-142.96&quot; rx=&quot;57.94&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;79.39&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Mode Switching&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MODE --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M121.37,-117.78C116.47,-120.72 111.4,-123.76 106.54,-126.67&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;132.46&quot; y=&quot;-124.93&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;222.12&quot; cy=&quot;-141.05&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;222.12&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M180.67,-117.7C187.26,-121.42 194.1,-125.27 200.28,-128.75&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;171.97&quot; y=&quot;-125.93&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HYPER --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HYPER&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;151.58&quot; cy=&quot;-183.07&quot; rx=&quot;77.21&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;151.58&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Hypervisor (VMX root)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;HYPER --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--HYPER&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M150.46,-118.83C150.7,-132.52 151.02,-151.13 151.26,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;178.37&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SEG --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SEG&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;78.36&quot; cy=&quot;-59.9&quot; rx=&quot;78.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;78.36&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Memory Segmentation&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SEG --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SEG&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M119.7,-83.29C115.88,-81.13 111.97,-78.92 108.16,-76.76&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;127.69&quot; y=&quot;-82.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Hardware-enforced privilege separation — the CPU blocks unauthorized access at the instruction level&lt;/li&gt;
&lt;li&gt;x86 architecture defines 4 rings (0–3); most OSes use only 0 and 3&lt;/li&gt;
&lt;li&gt;Ring 0 has full access to all instructions and memory; Ring 3 is restricted&lt;/li&gt;
&lt;li&gt;Rings 1 and 2 exist in hardware but are unused by mainstream OSes (some microkernels or virtualization solutions use them)&lt;/li&gt;
&lt;li&gt;The current privilege level is tracked by the CPU on every instruction&lt;/li&gt;
&lt;li&gt;Attempting a privileged instruction from a lower ring triggers a general protection fault (#GP)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel sets up and manages the privilege ring configuration&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — user mode corresponds to Ring 3&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — kernel mode corresponds to Ring 0&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — ring transitions are what mode switching fundamentally is&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../hypervisor&quot; class=&quot;internal alias&quot; data-slug=&quot;hypervisor&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Hypervisor&lt;/a&gt; — hypervisors run at a new “Ring -1” (VMX root mode) introduced by virtualization extensions&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — system calls are the controlled mechanism for Ring 3 → Ring 0 transitions&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Some OSes (like OS/2) used Rings 1 and 2 — modern OSes do not, but the hardware still supports them&lt;/li&gt;
&lt;li&gt;Virtualization extensions (Intel VT-x, AMD-V) add a ring below 0 called “Ring -1” (VMX root) for hypervisors&lt;/li&gt;
&lt;li&gt;ARM architectures have EL0 (user), EL1 (kernel), EL2 (hypervisor), EL3 (secure monitor) — a different naming but same concept&lt;/li&gt;
&lt;li&gt;A program cannot simply “lower” its CPL — the CPU prevents this; only an interrupt/syscall gate can change CPL to a more privileged level&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>device-management</title>
    <link href="https://animishraa05.github.io/wiki/os/device-management" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/device-management.md" />
    <summary>Formal Definition “Device Management is the function of an operating system that handles communication with hardware peripherals through device drivers and provides a uniform interface to applications.” Explanation Device management is the OS function that controls all hardware peripherals — keyboar...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Device Management is the function of an operating system that handles communication with hardware peripherals through device drivers and provides a uniform interface to applications.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;Device management is the OS function that controls all hardware peripherals — keyboard, mouse, display, disk, printer, GPU, network card. Applications cannot (and should not) talk directly to hardware, because each device has a different protocol, register layout, and behavior. Instead, the OS provides device drivers — specialized software that knows how to communicate with a specific piece of hardware. Applications interact with devices through the OS’s standardized abstractions (e.g., read/write to a file descriptor for disk, sockets for network). This allows a programmer to write &lt;code class=&quot;notranslate&quot;&gt;open(&quot;file.txt&quot;)&lt;/code&gt; without knowing whether the disk is SSD or HDD, SATA or NVMe.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;A device driver is loaded into the OS (in kernel space for monolithic kernels, user space for microkernels)&lt;/li&gt;
&lt;li&gt;When an application performs a device-related system call (e.g., &lt;code class=&quot;notranslate&quot;&gt;read&lt;/code&gt; from a keyboard, &lt;code class=&quot;notranslate&quot;&gt;write&lt;/code&gt; to a file), the kernel routes it to the appropriate driver&lt;/li&gt;
&lt;li&gt;The driver communicates with the hardware using I/O ports, memory-mapped I/O, or DMA (Direct Memory Access)&lt;/li&gt;
&lt;li&gt;For input devices, the hardware sends interrupts — the CPU stops its current work, the kernel’s interrupt handler processes the input, and the result is delivered to the waiting application&lt;/li&gt;
&lt;li&gt;For output, the kernel may buffer data (e.g., network packets, disk writes) for efficiency&lt;/li&gt;
&lt;li&gt;The OS provides a uniform interface (device files in Unix, device objects in Windows) so applications don’t need device-specific code&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: device_management Pages: 1 --&gt;
&lt;svg width=&quot;974pt&quot; height=&quot;82pt&quot; viewBox=&quot;0.00 0.00 974.00 82.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 78.17)&quot;&gt;
&lt;title&gt;device_management&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-78.17 970.49,-78.17 970.49,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- APP --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;APP&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;84.49,-44.17 0,-44.17 0,-8.17 84.49,-8.17 84.49,-44.17&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;42.24&quot; y=&quot;-21.97&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Application&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SC&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;306.83,-74.17 177.23,-74.17 177.23,-38.17 306.83,-38.17 306.83,-74.17&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;242.03&quot; y=&quot;-51.97&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;System Call Layer&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APP&amp;#45;&amp;gt;SC --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;APP-&gt;SC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M84.71,-32.46C108.2,-36.02 138.32,-40.59 165.83,-44.77&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;165.12,-48.2 175.54,-46.24 166.17,-41.28 165.12,-48.2&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;130.86&quot; y=&quot;-47.17&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;read/write&lt;/text&gt;
&lt;/g&gt;
&lt;!-- FS --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;FS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;501.95,-74.17 373.93,-74.17 373.93,-38.17 501.95,-38.17 501.95,-74.17&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;437.94&quot; y=&quot;-51.97&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;File System / VFS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC&amp;#45;&amp;gt;FS --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;SC-&gt;FS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M307.06,-56.17C324.7,-56.17 343.99,-56.17 362.18,-56.17&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;362.12,-59.67 372.12,-56.17 362.12,-52.67 362.12,-59.67&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- DRV --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DRV&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;694.34,-44.17 594.33,-44.17 594.33,-8.17 694.34,-8.17 694.34,-44.17&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;644.33&quot; y=&quot;-21.97&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Device Driver&lt;/text&gt;
&lt;/g&gt;
&lt;!-- FS&amp;#45;&amp;gt;DRV --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;FS-&gt;DRV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M502.21,-46.89C527.83,-43.12 557.29,-38.8 582.65,-35.08&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;583.09,-38.55 592.48,-33.64 582.08,-31.63 583.09,-38.55&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;548.14&quot; y=&quot;-48.06&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;driver ops&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DRV&amp;#45;&amp;gt;APP --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;DRV-&gt;APP&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M594.04,-26.17C482.46,-26.17 211.29,-26.17 96.25,-26.17&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;96.48,-22.67 86.48,-26.17 96.48,-29.67 96.48,-22.67&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;340.38&quot; y=&quot;-30.37&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;result&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HW --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HW&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;966.49,-44.17 843.12,-44.17 843.12,-8.17 966.49,-8.17 966.49,-44.17&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;904.81&quot; y=&quot;-21.97&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Hardware Device&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DRV&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;DRV-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M694.56,-26.17C733.28,-26.17 787.81,-26.17 831.49,-26.17&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;831.41,-29.67 841.41,-26.17 831.41,-22.67 831.41,-29.67&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;768.73&quot; y=&quot;-30.37&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;I/O / DMA / MMIO&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HW&amp;#45;&amp;gt;DRV --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;HW-&gt;DRV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M842.69,-8.38C836.79,-7.16 830.87,-6.12 825.12,-5.37 775.41,1.09 761.9,2.14 712.34,-5.37 710.17,-5.7 707.98,-6.09 705.77,-6.52&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;705.16,-3.07 696.18,-8.69 706.71,-9.89 705.16,-3.07&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;768.73&quot; y=&quot;-9.57&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;interrupt / data&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_device_management Pages: 1 --&gt;
&lt;svg width=&quot;258pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 258.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_device_management&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 253.89,-205.07 253.89,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;132.84&quot; cy=&quot;-100.51&quot; rx=&quot;89.54&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;132.84&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Device Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;204.24&quot; cy=&quot;-59.01&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;204.24&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M162.71,-83.15C169.43,-79.24 176.44,-75.17 182.74,-71.5&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;154.22&quot; y=&quot;-69.23&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;132.68&quot; cy=&quot;-18&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;132.68&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M132.81,-82.2C132.78,-68.53 132.74,-49.92 132.71,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;151.27&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MONO --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MONO&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;62.1&quot; cy=&quot;-142.96&quot; rx=&quot;62.1&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;62.1&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Monolithic Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MONO --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MONO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M104.07,-117.78C99.32,-120.62 94.42,-123.57 89.7,-126.4&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;117.15&quot; y=&quot;-124.79&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MICRO --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MICRO&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;204.82&quot; cy=&quot;-141.05&quot; rx=&quot;45.07&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;204.82&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Microkernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MICRO --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MICRO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M163.37,-117.7C168.43,-120.55 173.63,-123.48 178.57,-126.27&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;150.71&quot; y=&quot;-124.69&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- FILE --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;FILE&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;134.28&quot; cy=&quot;-183.07&quot; rx=&quot;62.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;134.28&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;File Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;FILE --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--FILE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M133.16,-118.83C133.4,-132.52 133.72,-151.13 133.96,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.32&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYS&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;61.06&quot; cy=&quot;-59.9&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;61.06&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SYS --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SYS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M102.4,-83.29C97.66,-80.61 92.79,-77.85 88.14,-75.22&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;109.03&quot; y=&quot;-71.15&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Device drivers translate generic OS I/O requests into hardware-specific commands&lt;/li&gt;
&lt;li&gt;Communication methods: programmed I/O (CPU busy-waits), interrupt-driven I/O (CPU notified), DMA (device writes directly to RAM)&lt;/li&gt;
&lt;li&gt;Uniform interface: applications use the same read/write API for files, devices, and sockets&lt;/li&gt;
&lt;li&gt;In monolithic kernels, drivers run in kernel mode (performance, but risky); in microkernels, drivers run in user mode (safer, slower)&lt;/li&gt;
&lt;li&gt;Plug-and-Play allows automatic detection and driver loading for newly connected devices&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel manages device drivers and I/O routing&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — device management is a core OS function&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — device drivers run in kernel space in monolithic kernels&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../microkernel&quot; class=&quot;internal alias&quot; data-slug=&quot;microkernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Microkernel&lt;/a&gt; — device drivers run in user space in microkernels&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — device access is mediated by system calls (read, write, ioctl)&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../file-management&quot; class=&quot;internal alias&quot; data-slug=&quot;file-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;File Management&lt;/a&gt; — the file system often sits atop block device drivers&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;A buggy device driver in a monolithic kernel can crash the entire OS — this is the primary motivation for microkernels&lt;/li&gt;
&lt;li&gt;DMA can bypass the CPU and write data directly to memory — while efficient, it creates security concerns (a malicious device could modify kernel memory)&lt;/li&gt;
&lt;li&gt;Device drivers are the largest source of OS bugs (more than the kernel core) because they are written by third parties with varying quality&lt;/li&gt;
&lt;li&gt;Power management requires close coordination between device drivers and the kernel (e.g., suspending a disk when unused)&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>distributed-operating-system</title>
    <link href="https://animishraa05.github.io/wiki/os/distributed-operating-system" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/distributed-operating-system.md" />
    <summary>Formal Definition “A Distributed Operating System manages multiple independent computers and makes them appear as a single system.” Explanation A distributed OS connects multiple independent computers over a network and presents them to the user as a single unified system.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“A Distributed Operating System manages multiple independent computers and makes them appear as a single system.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;A distributed OS connects multiple independent computers over a network and presents them to the user as a single unified system. Instead of logging into one machine, the user sees one pool of resources — CPU cores, memory, storage — spread across many physical machines. The OS handles task distribution, data replication, fault tolerance, and consistency transparently. This is fundamentally different from a network of standalone computers, where each machine is managed separately. True distributed OSes are rare (Plan 9, Amoeba) but the concept heavily influences modern distributed systems infrastructure (Kubernetes, distributed databases, cloud computing platforms).&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Multiple computers (nodes) are connected via a high-speed network&lt;/li&gt;
&lt;li&gt;A distributed OS layer runs on each node, coordinating with others through message passing&lt;/li&gt;
&lt;li&gt;A global scheduler distributes processes across nodes — the user does not choose which node runs their task&lt;/li&gt;
&lt;li&gt;The file system is distributed: a file may be stored across multiple nodes, with replication for fault tolerance&lt;/li&gt;
&lt;li&gt;Memory can be shared across nodes via distributed shared memory (DSM) — each node sees a single address space&lt;/li&gt;
&lt;li&gt;If a node fails, the OS transparently migrates its tasks to other nodes and redirects resource requests&lt;/li&gt;
&lt;li&gt;Clock synchronization (NTP) and consensus algorithms (Paxos, Raft) maintain consistency across nodes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: distributed_os Pages: 1 --&gt;
&lt;svg width=&quot;431pt&quot; height=&quot;290pt&quot; viewBox=&quot;0.00 0.00 431.00 290.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 286)&quot;&gt;
&lt;title&gt;distributed_os&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-286 426.77,-286 426.77,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- USER --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;USER&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;280.46,-282 142.31,-282 142.31,-240.4 280.46,-240.4 280.46,-282&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;211.39&quot; y=&quot;-265.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;User / Application&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;211.39&quot; y=&quot;-248.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Sees One System)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DOS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DOS&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;284.36,-203.4 138.41,-203.4 138.41,-167.4 284.36,-167.4 284.36,-203.4&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;211.39&quot; y=&quot;-181.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Distributed OS Layer&lt;/text&gt;
&lt;/g&gt;
&lt;!-- USER&amp;#45;&amp;gt;DOS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;USER-&gt;DOS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M211.39,-240.03C211.39,-232.26 211.39,-223.23 211.39,-214.82&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;214.89,-215.05 211.39,-205.05 207.89,-215.05 214.89,-215.05&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- N1 --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;N1&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;128.77,-114.6 0,-114.6 0,-73 128.77,-73 128.77,-114.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.39&quot; y=&quot;-98&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Node A&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.39&quot; y=&quot;-81.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(CPU, RAM, Disk)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DOS&amp;#45;&amp;gt;N1 --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;DOS-&gt;N1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M182.69,-166.91C161.25,-153.84 131.58,-135.76 107.32,-120.97&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;109.28,-118.07 98.92,-115.85 105.64,-124.04 109.28,-118.07&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;177.3&quot; y=&quot;-136.8&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;process 1&lt;/text&gt;
&lt;/g&gt;
&lt;!-- N2 --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;N2&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;275.77,-114.6 147,-114.6 147,-73 275.77,-73 275.77,-114.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;211.39&quot; y=&quot;-98&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Node B&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;211.39&quot; y=&quot;-81.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(CPU, RAM, Disk)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DOS&amp;#45;&amp;gt;N2 --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;DOS-&gt;N2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M211.39,-167.12C211.39,-155.56 211.39,-140 211.39,-126.28&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;214.89,-126.35 211.39,-116.35 207.89,-126.35 214.89,-126.35&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;237.63&quot; y=&quot;-136.8&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;process 2&lt;/text&gt;
&lt;/g&gt;
&lt;!-- N3 --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;N3&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;422.77,-114.6 294,-114.6 294,-73 422.77,-73 422.77,-114.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;358.39&quot; y=&quot;-98&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Node C&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;358.39&quot; y=&quot;-81.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(CPU, RAM, Disk)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DOS&amp;#45;&amp;gt;N3 --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;DOS-&gt;N3&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M240.08,-166.91C261.52,-153.84 291.19,-135.76 315.46,-120.97&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;317.13,-124.04 323.85,-115.85 313.49,-118.07 317.13,-124.04&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;319.93&quot; y=&quot;-136.8&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;process 3&lt;/text&gt;
&lt;/g&gt;
&lt;!-- NET --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;NET&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;285.53,-36 137.25,-36 137.25,0 285.53,0 285.53,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;211.39&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Network Interconnect&lt;/text&gt;
&lt;/g&gt;
&lt;!-- N1&amp;#45;&amp;gt;NET --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;N1-&gt;NET&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M104.55,-72.63C123.72,-63.01 146.73,-51.46 166.47,-41.55&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;168.04,-44.68 175.41,-37.06 164.9,-38.42 168.04,-44.68&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- N2&amp;#45;&amp;gt;NET --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;N2-&gt;NET&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M211.39,-72.63C211.39,-64.86 211.39,-55.83 211.39,-47.42&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;214.89,-47.65 211.39,-37.65 207.89,-47.65 214.89,-47.65&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- N3&amp;#45;&amp;gt;NET --&gt;
&lt;g id=&quot;edge7&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;N3-&gt;NET&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M318.22,-72.63C299.05,-63.01 276.05,-51.46 256.3,-41.55&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;257.87,-38.42 247.37,-37.06 254.73,-44.68 257.87,-38.42&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_distributed_os Pages: 1 --&gt;
&lt;svg width=&quot;293pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 293.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_distributed_os&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 289.06,-205.07 289.06,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;146.83&quot; cy=&quot;-100.51&quot; rx=&quot;66.56&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.83&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Distributed OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;218.22&quot; cy=&quot;-59.01&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;218.22&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M175.45,-83.87C180.26,-81.07 185.25,-78.17 190.05,-75.38&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;201.26&quot; y=&quot;-82.33&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BATCH --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;BATCH&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;146.66&quot; cy=&quot;-18&quot; rx=&quot;39.02&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.66&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Batch OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;BATCH --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--BATCH&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M146.79,-82.2C146.76,-68.53 146.72,-49.92 146.7,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.74&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTI --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTI&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;76.08&quot; cy=&quot;-142.96&quot; rx=&quot;76.08&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;76.08&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multiprogramming OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTI --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTI&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M118.86,-117.29C114.08,-120.16 109.1,-123.15 104.3,-126.03&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;125.34&quot; y=&quot;-124.36&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- CLUSTER --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;CLUSTER&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;218.8&quot; cy=&quot;-141.05&quot; rx=&quot;66.25&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;218.8&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Cluster Computing&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;CLUSTER --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--CLUSTER&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M176.1,-117C180.62,-119.54 185.28,-122.17 189.79,-124.71&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;203.21&quot; y=&quot;-112.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;148.26&quot; cy=&quot;-183.07&quot; rx=&quot;56.8&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;148.26&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Virtual Machine&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;VM --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--VM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M147.14,-118.83C147.38,-132.52 147.71,-151.13 147.94,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;167.81&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- NET --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;NET&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;75.04&quot; cy=&quot;-59.9&quot; rx=&quot;70.03&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;75.04&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Computer Networks&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;NET --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--NET&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M117.63,-83.99C113.28,-81.53 108.8,-79 104.45,-76.53&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;97.28&quot; y=&quot;-82.96&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Multiple independent computers appear as one unified system&lt;/li&gt;
&lt;li&gt;Transparent resource sharing: processes, files, and memory are distributed across nodes&lt;/li&gt;
&lt;li&gt;Fault tolerance: node failure does not stop the system — tasks migrate to surviving nodes&lt;/li&gt;
&lt;li&gt;Scalability: adding more nodes increases total capacity&lt;/li&gt;
&lt;li&gt;Requires consensus algorithms (Paxos, Raft) for coordination and consistency&lt;/li&gt;
&lt;li&gt;True distributed OSes are rare — most modern “distributed systems” use networked standalone OSes with middleware (Kubernetes, Spark)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — a distributed OS extends OS concepts across multiple machines&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../batch-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;batch-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Batch Operating System&lt;/a&gt; — batch processing at scale is a distributed computing problem&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../multitasking-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multitasking-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multitasking Operating System&lt;/a&gt; — multitasking shares CPU on one machine; distributed OS shares across machines&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../virtual-machine&quot; class=&quot;internal alias&quot; data-slug=&quot;virtual-machine&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Virtual Machine&lt;/a&gt; — VMs are building blocks for distributed infrastructure (cloud)&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../inter-process-communication&quot; class=&quot;internal alias&quot; data-slug=&quot;inter-process-communication&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Inter-Process Communication&lt;/a&gt; — IPC across nodes (network communication) is fundamental to distributed OS&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../security-and-protection&quot; class=&quot;internal alias&quot; data-slug=&quot;security-and-protection&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Security and Protection&lt;/a&gt; — distributed OS must secure communication and authenticate nodes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Network partitions are the hardest problem in distributed systems — a split network creates split-brain scenarios (two nodes both think they are the leader)&lt;/li&gt;
&lt;li&gt;True distributed OSes (Plan 9, Amoeba) never achieved mainstream adoption — most modern systems use “networked OS” + middleware&lt;/li&gt;
&lt;li&gt;Latency across nodes is orders of magnitude higher than local memory access — distributed algorithms must account for this&lt;/li&gt;
&lt;li&gt;Partial failure is the defining challenge: some nodes may fail while others continue, and the system must detect and handle this gracefully&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>file-management</title>
    <link href="https://animishraa05.github.io/wiki/os/file-management" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/file-management.md" />
    <summary>Formal Definition “File Management is the function of an operating system that handles the creation, deletion, reading, writing, and organization of files on storage devices.” Explanation File management turns a raw block storage device (SSD, HDD) into a structured, named hierarchy of files and dire...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“File Management is the function of an operating system that handles the creation, deletion, reading, writing, and organization of files on storage devices.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;File management turns a raw block storage device (SSD, HDD) into a structured, named hierarchy of files and directories. Without it, storing data would mean tracking raw sector numbers manually. The OS’s file system organizes data into files (named byte sequences) and directories (containers for files), manages permissions, handles disk space allocation, and ensures data integrity. The file system also provides a uniform API (open, read, write, close) so applications work the same way across different storage hardware. Popular file systems include ext4, NTFS, APFS, and FAT32.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The OS implements a Virtual File System (VFS) layer that provides a common interface for all file system types&lt;/li&gt;
&lt;li&gt;When a file is created, the file system allocates space on disk: metadata (inode in Unix) stores file attributes (size, permissions, timestamps, block pointers)&lt;/li&gt;
&lt;li&gt;Directories are special files that map filenames to inode numbers&lt;/li&gt;
&lt;li&gt;On read, the OS translates the file path to an inode, reads the block pointers, and fetches the data blocks from disk&lt;/li&gt;
&lt;li&gt;The file system manages free space using bitmaps or free lists, and handles fragmentation&lt;/li&gt;
&lt;li&gt;Permissions (read/write/execute for owner/group/others) are checked on every file access against the process’s credentials&lt;/li&gt;
&lt;li&gt;Journaling or copy-on-write mechanisms protect against corruption during crashes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: file_management Pages: 1 --&gt;
&lt;svg width=&quot;759pt&quot; height=&quot;98pt&quot; viewBox=&quot;0.00 0.00 759.00 98.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 94)&quot;&gt;
&lt;title&gt;file_management&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-94 754.67,-94 754.67,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- APP --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;APP&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;84.49,-63 0,-63 0,-27 84.49,-27 84.49,-63&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;42.24&quot; y=&quot;-40.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Application&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VFS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VFS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;293.63,-63 120.49,-63 120.49,-27 293.63,-27 293.63,-63&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;207.06&quot; y=&quot;-40.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Virtual File System (VFS)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APP&amp;#45;&amp;gt;VFS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;APP-&gt;VFS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M84.75,-45C92.26,-45 100.38,-45 108.73,-45&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;108.71,-48.5 118.71,-45 108.71,-41.5 108.71,-48.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- EXT4 --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;EXT4&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;418.35,-90 334.67,-90 334.67,-54 418.35,-54 418.35,-90&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;376.51&quot; y=&quot;-67.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;ext4 Driver&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VFS&amp;#45;&amp;gt;EXT4 --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;VFS-&gt;EXT4&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M293.75,-58.82C303.82,-60.44 313.85,-62.06 323.26,-63.57&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;322.46,-66.99 332.89,-65.13 323.58,-60.08 322.46,-66.99&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- NTFSDRV --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;NTFSDRV&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;423.4,-36 329.63,-36 329.63,0 423.4,0 423.4,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;376.51&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;NTFS Driver&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VFS&amp;#45;&amp;gt;NTFSDRV --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;VFS-&gt;NTFSDRV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M293.75,-31.18C301.97,-29.86 310.16,-28.54 318.01,-27.27&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;318.42,-30.75 327.73,-25.7 317.3,-23.84 318.42,-30.75&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- BLOCK --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;BLOCK&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;595.23,-63 459.4,-63 459.4,-27 595.23,-27 595.23,-63&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;527.31&quot; y=&quot;-40.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Block Device Layer&lt;/text&gt;
&lt;/g&gt;
&lt;!-- EXT4&amp;#45;&amp;gt;BLOCK --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;EXT4-&gt;BLOCK&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M418.57,-64.55C427.79,-62.88 437.88,-61.05 448.06,-59.2&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;448.4,-62.69 457.62,-57.46 447.15,-55.81 448.4,-62.69&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- NTFSDRV&amp;#45;&amp;gt;BLOCK --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;NTFSDRV-&gt;BLOCK&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M423.78,-26.39C431.46,-27.79 439.62,-29.27 447.83,-30.76&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;447.09,-34.18 457.56,-32.52 448.34,-27.3 447.09,-34.18&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- DISK --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DISK&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;750.67,-63 631.23,-63 631.23,-27 750.67,-27 750.67,-63&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;690.95&quot; y=&quot;-40.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Disk (SSD/HDD)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BLOCK&amp;#45;&amp;gt;DISK --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;BLOCK-&gt;DISK&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M595.46,-45C603.32,-45 611.37,-45 619.28,-45&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;619.23,-48.5 629.23,-45 619.23,-41.5 619.23,-48.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_file_management Pages: 1 --&gt;
&lt;svg width=&quot;296pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 296.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_file_management&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 292.48,-205.07 292.48,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;143.06&quot; cy=&quot;-100.51&quot; rx=&quot;77.1&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;143.06&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;File Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;214.45&quot; cy=&quot;-59.01&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;214.45&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M172.1,-83.63C176.73,-80.94 181.52,-78.16 186.13,-75.47&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;160.61&quot; y=&quot;-71.45&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;142.89&quot; cy=&quot;-18&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;142.89&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M143.02,-82.2C142.99,-68.53 142.96,-49.92 142.93,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;133.72&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DEV --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DEV&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;72.31&quot; cy=&quot;-142.96&quot; rx=&quot;72.31&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;72.31&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Device Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;DEV --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--DEV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M114.69,-117.53C110.08,-120.3 105.3,-123.17 100.68,-125.94&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;121.45&quot; y=&quot;-124.44&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SEC --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SEC&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;215.03&quot; cy=&quot;-141.05&quot; rx=&quot;73.44&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;215.03&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Security &amp;#x26; Protection&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SEC --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SEC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M173.17,-117.47C177.17,-119.73 181.28,-122.04 185.28,-124.29&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;165.46&quot; y=&quot;-123.58&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYS&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;144.49&quot; cy=&quot;-183.07&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;144.49&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SYS --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SYS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M143.38,-118.83C143.61,-132.52 143.94,-151.13 144.18,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;157.54&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VIRT --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VIRT&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;71.27&quot; cy=&quot;-59.9&quot; rx=&quot;56.8&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;71.27&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Virtual Machine&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;VIRT --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--VIRT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M113.03,-83.52C108.57,-81 103.99,-78.41 99.57,-75.91&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;126.57&quot; y=&quot;-71.62&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Provides a hierarchical namespace (directories/files) over raw block storage&lt;/li&gt;
&lt;li&gt;VFS abstraction allows multiple file system types to coexist (ext4, NTFS, FAT32, etc.)&lt;/li&gt;
&lt;li&gt;Metadata (inodes or MFT entries) stores file attributes separate from file data&lt;/li&gt;
&lt;li&gt;Permissions are enforced per file: read/write/execute for owner, group, and others&lt;/li&gt;
&lt;li&gt;Journaling ensures crash recovery: metadata updates are logged before being applied&lt;/li&gt;
&lt;li&gt;Common operations: create, open, read, write, seek, close, delete, truncate&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — file management is a core OS function&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel’s VFS and file system drivers implement file operations&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../virtual-machine&quot; class=&quot;internal alias&quot; data-slug=&quot;virtual-machine&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Virtual Machine&lt;/a&gt; — virtual disks are files on the host file system&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../device-management&quot; class=&quot;internal alias&quot; data-slug=&quot;device-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Device Management&lt;/a&gt; — file systems sit atop block device drivers&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — all file operations go through system calls (open, read, write, close)&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../security-and-protection&quot; class=&quot;internal alias&quot; data-slug=&quot;security-and-protection&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Security and Protection&lt;/a&gt; — file permissions are a key OS security mechanism&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;File deletion does NOT erase data — it removes metadata pointers; the data remains on disk until overwritten (this is how file recovery tools work)&lt;/li&gt;
&lt;li&gt;Fragmentation slows down file access over time — SSDs handle fragmentation differently than HDDs (seek time penalty is negligible on SSDs)&lt;/li&gt;
&lt;li&gt;Maximum file size and maximum volume size vary by file system (FAT32: 4 GB per file; ext4: 16 TB; NTFS: 256 TB)&lt;/li&gt;
&lt;li&gt;Hard links vs symlinks: hard links share the same inode (same data), symlinks are path-based references (can dangle or cross file systems)&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>hypervisor</title>
    <link href="https://animishraa05.github.io/wiki/os/hypervisor" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/hypervisor.md" />
    <summary>Formal Definition “A Hypervisor is software or firmware that creates and manages virtual machines by allocating hardware resources.” Explanation A hypervisor (also called a Virtual Machine Monitor or VMM) is the layer that makes virtualization possible.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“A Hypervisor is software or firmware that creates and manages virtual machines by allocating hardware resources.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;A hypervisor (also called a Virtual Machine Monitor or VMM) is the layer that makes virtualization possible. It sits between the physical hardware and the virtual machines, abstracting the underlying hardware into virtualized resources. Each VM believes it has its own dedicated CPU, RAM, disk, and network card, but the hypervisor is actually multiplexing the real hardware. Hypervisors come in two flavors: Type 1 (bare metal) runs directly on hardware without a host OS (used in servers and cloud — VMware ESXi, Hyper-V) and Type 2 (hosted) runs on top of an existing OS (used by developers — VirtualBox, VMware Workstation). The hypervisor handles resource allocation, VM isolation, and the translation of guest OS instructions to physical hardware operations.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Type 1 hypervisor is installed directly on hardware — it includes its own minimal device drivers and scheduler&lt;/li&gt;
&lt;li&gt;Type 2 hypervisor runs as a process on a host OS — the host OS handles hardware; the hypervisor manages VMs on top&lt;/li&gt;
&lt;li&gt;When a VM starts, the hypervisor allocates virtual CPU cores (vCPUs), virtual RAM, and virtual storage&lt;/li&gt;
&lt;li&gt;The guest OS inside the VM issues instructions that the hypervisor intercepts; most instructions execute directly on the CPU (hardware-assisted virtualization via Intel VT-x / AMD-V)&lt;/li&gt;
&lt;li&gt;Privileged instructions from the guest OS are trapped by the CPU and handled by the hypervisor (trap-and-emulate)&lt;/li&gt;
&lt;li&gt;The hypervisor ensures VM isolation: one VM cannot read another VM’s memory or access its storage&lt;/li&gt;
&lt;li&gt;For Type 2, the hypervisor process itself runs in user mode on the host, adding a layer of overhead&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: hypervisor Pages: 1 --&gt;
&lt;svg width=&quot;601pt&quot; height=&quot;227pt&quot; viewBox=&quot;0.00 0.00 601.00 227.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 223)&quot;&gt;
&lt;title&gt;hypervisor&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-223 596.94,-223 596.94,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;g id=&quot;clust1&quot; class=&quot;cluster&quot;&gt;
&lt;title&gt;cluster_vms&lt;/title&gt;
&lt;polygon fill=&quot;none&quot; stroke=&quot;black&quot; points=&quot;8,-8 8,-211 121.68,-211 121.68,-8 8,-8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.84&quot; y=&quot;-194.4&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;Virtual Machines&lt;/text&gt;
&lt;/g&gt;
&lt;g id=&quot;clust2&quot; class=&quot;cluster&quot;&gt;
&lt;title&gt;cluster_type&lt;/title&gt;
&lt;polygon fill=&quot;none&quot; stroke=&quot;black&quot; points=&quot;225.65,-68 225.65,-151 361.11,-151 361.11,-68 225.65,-68&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;293.38&quot; y=&quot;-134.4&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;Type 1: Bare Metal&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM1 --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM1&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;113.68,-177.8 16,-177.8 16,-136.2 113.68,-136.2 113.68,-177.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.84&quot; y=&quot;-161.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Windows VM&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.84&quot; y=&quot;-144.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Guest OS)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HV1 --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HV1&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;353.11,-117.8 233.65,-117.8 233.65,-76.2 353.11,-76.2 353.11,-117.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;293.38&quot; y=&quot;-101.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Hypervisor&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;293.38&quot; y=&quot;-84.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(ESXi / Hyper-V)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM1&amp;#45;&amp;gt;HV1 --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;VM1-&gt;HV1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M114.16,-144.2C145.72,-135.84 187.44,-124.79 222.58,-115.49&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;223.03,-118.99 231.8,-113.05 221.23,-112.22 223.03,-118.99&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;173.67&quot; y=&quot;-143.47&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;trap &amp;#x26; emulate&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM2 --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM2&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;108.24,-117.8 21.44,-117.8 21.44,-76.2 108.24,-76.2 108.24,-117.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.84&quot; y=&quot;-101.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Linux VM&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.84&quot; y=&quot;-84.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Guest OS)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM2&amp;#45;&amp;gt;HV1 --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;VM2-&gt;HV1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M108.72,-97C140.69,-97 185.05,-97 222.16,-97&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;221.91,-100.5 231.91,-97 221.91,-93.5 221.91,-100.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- VM3 --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM3&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;108.24,-57.8 21.44,-57.8 21.44,-16.2 108.24,-16.2 108.24,-57.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.84&quot; y=&quot;-41.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kali VM&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.84&quot; y=&quot;-24.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Guest OS)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM3&amp;#45;&amp;gt;HV1 --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;VM3-&gt;HV1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M108.72,-48.36C140.82,-56.86 185.43,-68.67 222.64,-78.53&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;221.4,-81.82 231.96,-81 223.19,-75.06 221.4,-81.82&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- HW --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HW&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;592.94,-117.8 460.23,-117.8 460.23,-76.2 592.94,-76.2 592.94,-117.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;526.59&quot; y=&quot;-101.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Physical Hardware&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;526.59&quot; y=&quot;-84.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(CPU, RAM, Disk)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HV1&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;HV1-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M353.32,-97C382.28,-97 417.53,-97 448.59,-97&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;448.31,-100.5 458.31,-97 448.31,-93.5 448.31,-100.5&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;406.67&quot; y=&quot;-101.2&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;direct access&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_hypervisor Pages: 1 --&gt;
&lt;svg width=&quot;302pt&quot; height=&quot;194pt&quot; viewBox=&quot;0.00 0.00 302.00 194.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 189.56)&quot;&gt;
&lt;title&gt;semantic_hypervisor&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-189.56 297.81,-189.56 297.81,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;149.88&quot; cy=&quot;-86.38&quot; rx=&quot;51.73&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;149.88&quot; y=&quot;-82.48&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Hypervisor&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;201.74&quot; cy=&quot;-23.83&quot; rx=&quot;56.8&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;201.74&quot; y=&quot;-20.53&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Virtual Machine&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;VM --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--VM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M164.33,-68.96C171.4,-60.43 179.9,-50.17 187.02,-41.6&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;155.41&quot; y=&quot;-57.98&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;106.13&quot; cy=&quot;-18&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.13&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M138.39,-68.41C131.8,-58.13 123.59,-45.29 117.09,-35.14&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;100.23&quot; y=&quot;-54.48&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PRIV --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PRIV&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;71.54&quot; cy=&quot;-107.72&quot; rx=&quot;71.54&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;71.54&quot; y=&quot;-104.42&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;CPU Privilege Rings&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PRIV --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PRIV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M108.88,-97.55C108.73,-97.59 108.58,-97.63 108.43,-97.67&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;90.15&quot; y=&quot;-100.31&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VBOX --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VBOX&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;225.67&quot; cy=&quot;-115.84&quot; rx=&quot;68.14&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;225.67&quot; y=&quot;-112.54&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;VirtualBox (Type 2)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;VBOX --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--VBOX&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M184.67,-99.9C185.45,-100.2 186.23,-100.51 187.01,-100.81&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;199.6&quot; y=&quot;-92.26&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- ESXI --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;ESXI&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;146.05&quot; cy=&quot;-167.56&quot; rx=&quot;79.1&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.05&quot; y=&quot;-164.26&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;VMware ESXi (Type 1)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;ESXI --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--ESXI&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M149.01,-104.8C148.39,-118.09 147.54,-135.95 146.92,-149.22&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;134.21&quot; y=&quot;-129.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Type 1 (bare-metal): runs directly on hardware, no host OS, enterprise/cloud use&lt;/li&gt;
&lt;li&gt;Type 2 (hosted): runs as a process on a host OS, development/testing use&lt;/li&gt;
&lt;li&gt;Provides hardware abstraction: each VM gets virtualized CPU, RAM, disk, and network&lt;/li&gt;
&lt;li&gt;Enforces strong isolation between VMs — one VM cannot access another VM’s resources&lt;/li&gt;
&lt;li&gt;Uses hardware virtualization extensions (Intel VT-x, AMD-V) for efficient guest execution&lt;/li&gt;
&lt;li&gt;Manages resource allocation: CPU scheduling, memory ballooning, disk provisioning&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../cpu-privilege-rings&quot; class=&quot;internal alias&quot; data-slug=&quot;cpu-privilege-rings&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;CPU Privilege Rings&lt;/a&gt; — hypervisors use a new privilege level (Ring -1 via VT-x/AMD-V)&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../virtual-machine&quot; class=&quot;internal alias&quot; data-slug=&quot;virtual-machine&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Virtual Machine&lt;/a&gt; — hypervisors create and manage VMs&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — a kernel manages processes on one OS; a hypervisor manages multiple OSes on one machine&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — Type 1 hypervisors run in a privilege mode below kernel mode&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — VM exits (guest→hypervisor) are a form of mode switch with high overhead&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../device-management&quot; class=&quot;internal alias&quot; data-slug=&quot;device-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Device Management&lt;/a&gt; — hypervisors virtualize hardware devices for guest OSes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Type 2 hypervisors have double overhead: guest → hypervisor → host OS → hardware, making them slower for I/O-intensive workloads&lt;/li&gt;
&lt;li&gt;Paravirtualization (guest OS knows it’s virtualized and uses special hypercalls) can outperform full hardware emulation&lt;/li&gt;
&lt;li&gt;Nested virtualization (running a hypervisor inside a VM) is possible but complex and slow&lt;/li&gt;
&lt;li&gt;The “hypervisor” is NOT the same as a “virtual machine” — the hypervisor creates and manages VMs, it is not itself a VM&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>inter-process-communication</title>
    <link href="https://animishraa05.github.io/wiki/os/inter-process-communication" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/inter-process-communication.md" />
    <summary>Formal Definition “Inter-Process Communication (IPC) is a mechanism that allows processes to communicate with each other and synchronize their actions, typically through message passing or shared memory.” Explanation IPC is the nervous system of a multi-process operating system.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Inter-Process Communication (IPC) is a mechanism that allows processes to communicate with each other and synchronize their actions, typically through message passing or shared memory.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;IPC is the nervous system of a multi-process operating system. Since each process has its own isolated virtual address space (for security and stability), they cannot directly access each other’s data. IPC provides controlled channels for processes to exchange data, send signals, and coordinate. IPC is especially critical in microkernel architectures, where even fundamental OS services like file systems and drivers run as separate processes and must communicate with each other and with applications. Key IPC mechanisms include message passing, shared memory, semaphores, pipes, sockets, and signals.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Processes use message passing: process A sends a message, the kernel copies it to process B’s address space&lt;/li&gt;
&lt;li&gt;Shared memory: the kernel maps a region of physical memory into the address spaces of both processes, allowing direct reads and writes&lt;/li&gt;
&lt;li&gt;Pipes: a unidirectional or bidirectional byte stream (e.g., &lt;code class=&quot;notranslate&quot;&gt;ls | grep foo&lt;/code&gt; in Unix shells)&lt;/li&gt;
&lt;li&gt;Sockets: IPC across a network (or locally via Unix domain sockets) — the same API used for network communication&lt;/li&gt;
&lt;li&gt;Semaphores and mutexes: synchronization primitives that coordinate access to shared resources&lt;/li&gt;
&lt;li&gt;In microkernels, IPC is the fundamental communication primitive — all service requests travel through IPC channels&lt;/li&gt;
&lt;li&gt;The kernel validates each IPC operation to prevent unauthorized data access between processes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: ipc Pages: 1 --&gt;
&lt;svg width=&quot;515pt&quot; height=&quot;253pt&quot; viewBox=&quot;0.00 0.00 515.00 253.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 248.8)&quot;&gt;
&lt;title&gt;ipc&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-248.8 510.62,-248.8 510.62,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;g id=&quot;clust1&quot; class=&quot;cluster&quot;&gt;
&lt;title&gt;cluster_methods&lt;/title&gt;
&lt;polygon fill=&quot;none&quot; stroke=&quot;black&quot; points=&quot;182.06,-51.8 182.06,-236.8 324.56,-236.8 324.56,-51.8 182.06,-51.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;253.31&quot; y=&quot;-220.2&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;IPC Methods&lt;/text&gt;
&lt;/g&gt;
&lt;!-- P1 --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;P1&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;79.8,-149.8 0,-149.8 0,-113.8 79.8,-113.8 79.8,-149.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;39.9&quot; y=&quot;-127.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Process A&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MSG --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MSG&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;316.56,-203.8 190.06,-203.8 190.06,-167.8 316.56,-167.8 316.56,-203.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;253.31&quot; y=&quot;-181.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Message Passing&lt;/text&gt;
&lt;/g&gt;
&lt;!-- P1&amp;#45;&amp;gt;MSG --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;P1-&gt;MSG&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M80.14,-147.11C86.02,-149.16 92.03,-151.13 97.8,-152.8 123.85,-160.35 152.82,-166.99 178.58,-172.29&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;177.8,-175.71 188.3,-174.26 179.19,-168.85 177.8,-175.71&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;134.93&quot; y=&quot;-174.53&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;send()&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SHM --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SHM&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;311.11,-149.8 195.51,-149.8 195.51,-113.8 311.11,-113.8 311.11,-149.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;253.31&quot; y=&quot;-127.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Shared Memory&lt;/text&gt;
&lt;/g&gt;
&lt;!-- P1&amp;#45;&amp;gt;SHM --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;P1-&gt;SHM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M80.17,-131.8C109.24,-131.8 149.59,-131.8 183.92,-131.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;183.79,-135.3 193.79,-131.8 183.79,-128.3 183.79,-135.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;134.93&quot; y=&quot;-136&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;map memory&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PIPE --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PIPE&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;302.55,-95.8 204.07,-95.8 204.07,-59.8 302.55,-59.8 302.55,-95.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;253.31&quot; y=&quot;-73.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Pipe / Socket&lt;/text&gt;
&lt;/g&gt;
&lt;!-- P1&amp;#45;&amp;gt;PIPE --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;P1-&gt;PIPE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M80.17,-121.77C111.77,-113.7 156.69,-102.22 192.72,-93.02&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;193.3,-96.49 202.12,-90.62 191.57,-89.7 193.3,-96.49&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- P2 --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;P2&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;506.62,-95.8 426.82,-95.8 426.82,-59.8 506.62,-59.8 506.62,-95.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;466.72&quot; y=&quot;-73.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Process B&lt;/text&gt;
&lt;/g&gt;
&lt;!-- P2&amp;#45;&amp;gt;SHM --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;P2-&gt;SHM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M426.52,-87.81C397.37,-95.26 356.86,-105.61 322.46,-114.39&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;321.81,-110.95 312.99,-116.81 323.54,-117.73 321.81,-110.95&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;371.69&quot; y=&quot;-115.42&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;map memory&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERNEL --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERNEL&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;311.11,-41.6 195.51,-41.6 195.51,0 311.11,0 311.11,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;253.31&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kernel&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;253.31&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Copy/Mapping)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERNEL&amp;#45;&amp;gt;P2 --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KERNEL-&gt;P2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M311.25,-32.42C340.61,-38.85 376.88,-47.46 408.82,-57 411.06,-57.67 413.35,-58.38 415.65,-59.12&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;414.41,-62.4 425.01,-62.26 416.64,-55.76 414.41,-62.4&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;371.69&quot; y=&quot;-61.2&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;receive()&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MSG&amp;#45;&amp;gt;KERNEL --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;MSG-&gt;KERNEL&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M189.7,-182.3C167.51,-177.64 144.73,-168.24 130.93,-149.8 106.17,-116.7 106.17,-89.9 130.93,-56.8 143.52,-39.97 163.6,-30.67 183.89,-25.63&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;184.59,-29.06 193.65,-23.56 183.14,-22.21 184.59,-29.06&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- PIPE&amp;#45;&amp;gt;P2 --&gt;
&lt;g id=&quot;edge7&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;PIPE-&gt;P2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M302.81,-77.8C336.55,-77.8 381.4,-77.8 415.5,-77.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;415.11,-81.3 425.11,-77.8 415.11,-74.3 415.11,-81.3&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_ipc Pages: 1 --&gt;
&lt;svg width=&quot;268pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 268.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_ipc&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 264.39,-205.07 264.39,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;130.1&quot; cy=&quot;-100.51&quot; rx=&quot;123.97&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;130.1&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Inter-Process Communication&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;201.49&quot; cy=&quot;-59.01&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;201.49&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M160.79,-82.67C167.14,-78.98 173.71,-75.16 179.66,-71.7&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;151.72&quot; y=&quot;-69.09&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MICRO --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MICRO&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;129.94&quot; cy=&quot;-18&quot; rx=&quot;45.07&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;129.94&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Microkernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MICRO --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MICRO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M130.06,-82.2C130.04,-68.53 130,-49.92 129.97,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;150.28&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;59.35&quot; cy=&quot;-142.96&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;59.35&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SYS --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SYS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M100.51,-118.27C95.51,-121.27 90.35,-124.36 85.45,-127.3&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;111.49&quot; y=&quot;-125.49&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SHM --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SHM&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;202.08&quot; cy=&quot;-141.05&quot; rx=&quot;58.31&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;202.08&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Shared Memory&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SHM --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SHM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M161.46,-118.18C165.55,-120.48 169.73,-122.83 173.76,-125.1&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;153.85&quot; y=&quot;-124.34&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PIPE --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PIPE&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;131.54&quot; cy=&quot;-183.07&quot; rx=&quot;27&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;131.54&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Pipe&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PIPE --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PIPE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M130.42,-118.83C130.66,-132.52 130.98,-151.13 131.22,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;123.94&quot; y=&quot;-133.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYNCH --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYNCH&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;58.32&quot; cy=&quot;-59.9&quot; rx=&quot;58.32&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;58.32&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Synchronization&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SYNCH --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SYNCH&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M98.83,-82.82C94.74,-80.51 90.58,-78.15 86.56,-75.87&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.45&quot; y=&quot;-82.05&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Enables data exchange and coordination between isolated processes&lt;/li&gt;
&lt;li&gt;Primary mechanisms: message passing, shared memory, pipes, sockets, signals&lt;/li&gt;
&lt;li&gt;Message passing involves kernel-mediated copying — slower but fully isolated&lt;/li&gt;
&lt;li&gt;Shared memory is faster but requires explicit synchronization (semaphores, mutexes)&lt;/li&gt;
&lt;li&gt;IPC is the backbone of microkernel architectures — all OS services communicate via IPC&lt;/li&gt;
&lt;li&gt;IPC operations (especially message passing) are more expensive than direct function calls due to kernel involvement&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel implements and mediates IPC mechanisms&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — IPC operations are accessed via system calls (send, receive, mmap, pipe)&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../microkernel&quot; class=&quot;internal alias&quot; data-slug=&quot;microkernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Microkernel&lt;/a&gt; — microkernels rely on IPC as their primary communication mechanism between user-space services&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — in monolithic kernels, internal services use direct function calls, not IPC&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — IPC between processes involves mode switches (user→kernel→user)&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../process-management&quot; class=&quot;internal alias&quot; data-slug=&quot;process-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Process Management&lt;/a&gt; — processes are the endpoints of IPC&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;IPC over shared memory looks like direct access but requires synchronization — without mutexes, two processes could corrupt shared data&lt;/li&gt;
&lt;li&gt;Message passing has overhead from context switching and data copying — zero-copy IPC techniques (like memory-mapped files) mitigate this&lt;/li&gt;
&lt;li&gt;Pipes are unidirectional by default — bidirectional communication requires two pipes&lt;/li&gt;
&lt;li&gt;Performance of IPC is critical in microkernels: L4 microkernel optimizes IPC to ~50-100 instructions per call&lt;/li&gt;
&lt;li&gt;Deadlocks can occur if two processes wait on each other’s IPC responses indefinitely&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>kernel-mode</title>
    <link href="https://animishraa05.github.io/wiki/os/kernel-mode" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/kernel-mode.md" />
    <summary>Formal Definition “Kernel mode is the privileged mode of execution in which the operating system kernel runs with unrestricted access to hardware and system resources.” Explanation Kernel mode is the highest privilege level in a modern operating system.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Kernel mode is the privileged mode of execution in which the operating system kernel runs with unrestricted access to hardware and system resources.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;Kernel mode is the highest privilege level in a modern operating system. When the CPU runs in kernel mode, it can execute any instruction, access any memory address, and control any hardware device. This unrestricted access is necessary because the kernel must manage all system resources — but it is also dangerous: a single bug in kernel mode can crash the entire system (kernel panic or BSOD). Only the operating system kernel and trusted kernel modules run in kernel mode; everything else runs in user mode. The CPU enforces this separation at the hardware level, so even a malicious application cannot simply “switch itself” to kernel mode.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;At boot, the CPU starts in kernel mode; the OS kernel initializes all hardware&lt;/li&gt;
&lt;li&gt;When the OS launches a user process, it sets the CPU mode bit to user mode before handing control over&lt;/li&gt;
&lt;li&gt;The kernel remains in memory, and when a system call or hardware interrupt occurs, the CPU switches back to kernel mode&lt;/li&gt;
&lt;li&gt;In kernel mode, the kernel can access any physical memory address, execute privileged instructions (LGDT, LIDT, HLT, IN/OUT), and directly interact with hardware&lt;/li&gt;
&lt;li&gt;The kernel handles interrupts: when a key is pressed, the hardware signals an interrupt, the CPU switches to kernel mode, and the kernel’s interrupt handler processes the input&lt;/li&gt;
&lt;li&gt;Kernel mode code must be extremely careful — there is no protection boundary separating it from the hardware, so memory corruption can be catastrophic&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: kernel_mode Pages: 1 --&gt;
&lt;svg width=&quot;763pt&quot; height=&quot;122pt&quot; viewBox=&quot;0.00 0.00 763.00 122.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 117.6)&quot;&gt;
&lt;title&gt;kernel_mode&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-117.6 758.89,-117.6 758.89,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- KM --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KM&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;468.62,-113.6 319.56,-113.6 319.56,-72 468.62,-72 468.62,-113.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;394.09&quot; y=&quot;-97&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kernel Mode (Ring 0)&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;394.09&quot; y=&quot;-80.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Full Privileges&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PROC --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PROC&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;152.18,-36 0,-36 0,0 152.18,0 152.18,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;76.09&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Process Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KM&amp;#45;&amp;gt;PROC --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KM-&gt;PROC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M319.13,-74.64C272.54,-63.97 212.44,-50.21 163.66,-39.05&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;164.48,-35.65 153.95,-36.83 162.92,-42.47 164.48,-35.65&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- MEM --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MEM&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;322.17,-36 170.01,-36 170.01,0 322.17,0 322.17,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;246.09&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Memory Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KM&amp;#45;&amp;gt;MEM --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KM-&gt;MEM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M352.86,-71.52C333.87,-62.18 311.26,-51.06 291.75,-41.46&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;293.45,-38.39 282.93,-37.12 290.36,-44.68 293.45,-38.39&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- DEV --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DEV&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;448,-36 340.18,-36 340.18,0 448,0 448,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;394.09&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Device Control&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KM&amp;#45;&amp;gt;DEV --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KM-&gt;DEV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M394.09,-71.52C394.09,-64.15 394.09,-55.66 394.09,-47.7&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;397.59,-47.73 394.09,-37.73 390.59,-47.73 397.59,-47.73&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- INT --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;INT&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;593.73,-36 466.44,-36 466.44,0 593.73,0 593.73,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;530.09&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Interrupt Handling&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KM&amp;#45;&amp;gt;INT --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KM-&gt;INT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M431.97,-71.52C449.19,-62.31 469.63,-51.37 487.38,-41.86&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;488.99,-44.97 496.15,-37.17 485.68,-38.8 488.99,-44.97&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- SYSC --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYSC&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;754.89,-36 611.29,-36 611.29,0 754.89,0 754.89,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;683.09&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;System Call Handler&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KM&amp;#45;&amp;gt;SYSC --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KM-&gt;SYSC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M468.89,-72.96C510.03,-62.59 561.09,-49.73 603.04,-39.16&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;603.74,-42.6 612.59,-36.76 602.03,-35.81 603.74,-42.6&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_kernel_mode Pages: 1 --&gt;
&lt;svg width=&quot;283pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 283.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_kernel_mode&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 279.14,-205.07 279.14,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;145.22&quot; cy=&quot;-100.51&quot; rx=&quot;59.4&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;145.22&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UMODE --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;216.62&quot; cy=&quot;-59.01&quot; rx=&quot;43.18&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;216.62&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;User Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;UMODE --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--UMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M173.03,-84.35C178.98,-80.89 185.24,-77.25 191.1,-73.84&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;209.58&quot; y=&quot;-81.79&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PRIV --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PRIV&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;145.06&quot; cy=&quot;-18&quot; rx=&quot;71.54&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;145.06&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;CPU Privilege Rings&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PRIV --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PRIV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M145.19,-82.2C145.16,-68.53 145.12,-49.92 145.09,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;154.39&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYS&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;74.48&quot; cy=&quot;-142.96&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;74.48&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SYS --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SYS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M118.07,-116.8C112.31,-120.26 106.23,-123.91 100.51,-127.34&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;129.55&quot; y=&quot;-124.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MODE --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MODE&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;217.2&quot; cy=&quot;-141.05&quot; rx=&quot;57.94&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;217.2&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Mode Switching&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MODE --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M173.67,-116.53C178.7,-119.37 183.94,-122.32 188.96,-125.15&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;201.58&quot; y=&quot;-112.74&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;146.66&quot; cy=&quot;-183.07&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.66&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M145.54,-118.83C145.78,-132.52 146.1,-151.13 146.34,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;145.94&quot; y=&quot;-133.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PANIC --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PANIC&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;73.44&quot; cy=&quot;-59.9&quot; rx=&quot;73.44&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;73.44&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel Panic / BSOD&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PANIC --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PANIC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M116.85,-84.46C112.31,-81.89 107.59,-79.22 103.02,-76.63&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;96.18&quot; y=&quot;-83.25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Full access to all hardware, memory, and CPU instructions&lt;/li&gt;
&lt;li&gt;Only the kernel and its trusted modules execute here&lt;/li&gt;
&lt;li&gt;Errors in kernel mode can crash the entire OS (kernel panic / BSOD)&lt;/li&gt;
&lt;li&gt;The CPU enforces mode separation at the hardware level — user code cannot arbitrarily switch to kernel mode&lt;/li&gt;
&lt;li&gt;Hardware interrupts are handled in kernel mode&lt;/li&gt;
&lt;li&gt;Switching to kernel mode is expensive (hundreds of CPU cycles) due to context save/restore&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../cpu-privilege-rings&quot; class=&quot;internal alias&quot; data-slug=&quot;cpu-privilege-rings&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;CPU Privilege Rings&lt;/a&gt; — kernel mode corresponds to Ring 0, the most privileged ring&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel runs in kernel mode exclusively&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — user mode has restricted privileges; kernel mode has full privileges&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — every system call transitions from user to kernel mode and back&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — the kernel-mode handler processes system calls&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — in monolithic kernels, more code runs in kernel mode (increasing crash risk)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Not all code in the OS runs in kernel mode — the GUI, terminal, and most utilities run in user mode&lt;/li&gt;
&lt;li&gt;Kernel mode is NOT the same as the “OS” — it is a CPU privilege level, not a visual or conceptual layer&lt;/li&gt;
&lt;li&gt;A bug in a kernel-mode device driver can crash the OS even if the kernel itself is perfect — this is why microkernels move drivers to user space&lt;/li&gt;
&lt;li&gt;Some CPUs support virtualization extensions (Intel VT-x, AMD-V) that add a “root mode” below Ring 0 for hypervisors&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>kernel</title>
    <link href="https://animishraa05.github.io/wiki/os/kernel" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/kernel.md" />
    <summary>Formal Definition “The Kernel is the central part of an operating system that manages computer hardware resources and provides essential services to application software.” “Kernel is the core component of an Operating System that manages system resources and acts as an interface between hardware and...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“The Kernel is the central part of an operating system that manages computer hardware resources and provides essential services to application software.”&lt;/p&gt;
&lt;p dir=&quot;auto&quot;&gt;“Kernel is the core component of an Operating System that manages system resources and acts as an interface between hardware and software. It controls CPU, memory, devices, and system operations.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;The kernel is the trusted core of the operating system — the only component that runs in kernel mode with full hardware access. Every other part of the system (applications, utilities, even the GUI) runs in user mode and must ask the kernel to perform privileged operations. Without the kernel, there is no coordination: multiple programs would fight over the CPU, clobber each other’s memory, and access hardware unsafely. The kernel solves this by being the single authority that manages processes, memory, devices, and security.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The kernel is loaded into memory at boot time and remains resident for the entire system session&lt;/li&gt;
&lt;li&gt;It handles process management: creating, scheduling, and terminating processes with algorithms like round-robin or priority scheduling&lt;/li&gt;
&lt;li&gt;It manages memory: allocating RAM to processes, enforcing protection boundaries, and handling paging/virtual memory&lt;/li&gt;
&lt;li&gt;It controls device access: all hardware communication goes through device drivers that live inside (monolithic) or communicate with (microkernel) the kernel&lt;/li&gt;
&lt;li&gt;It provides a system call interface — a controlled entry point — so that user-space programs can request privileged operations&lt;/li&gt;
&lt;li&gt;The kernel also handles interrupts: hardware signals (keyboard press, timer tick) are caught by the kernel and routed to the appropriate handler&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: kernel Pages: 1 --&gt;
&lt;svg width=&quot;704pt&quot; height=&quot;90pt&quot; viewBox=&quot;0.00 0.00 704.00 90.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 85.62)&quot;&gt;
&lt;title&gt;kernel&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-85.62 700.25,-85.62 700.25,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- Apps --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;Apps&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;93.79,-47.42 0,-47.42 0,-5.82 93.79,-5.82 93.79,-47.42&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;46.9&quot; y=&quot;-30.82&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Applications&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;46.9&quot; y=&quot;-14.02&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(User Mode)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SC&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;267.9,-81.62 170.22,-81.62 170.22,-45.62 267.9,-45.62 267.9,-81.62&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;219.06&quot; y=&quot;-59.42&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- Apps&amp;#45;&amp;gt;SC --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;Apps-&gt;SC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M93.95,-36.63C113.89,-40.97 137.48,-46.1 158.71,-50.72&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;157.9,-54.12 168.42,-52.83 159.39,-47.28 157.9,-54.12&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;132.01&quot; y=&quot;-52.63&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;request&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;479.37,-47.42 374.66,-47.42 374.66,-5.82 479.37,-5.82 479.37,-47.42&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;427.01&quot; y=&quot;-30.82&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kernel&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;427.01&quot; y=&quot;-14.02&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Kernel Mode)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC&amp;#45;&amp;gt;KERN --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;SC-&gt;KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M268.35,-54.95C296.73,-49.85 332.91,-43.35 363.46,-37.86&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;363.72,-41.37 372.94,-36.16 362.48,-34.48 363.72,-41.37&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;321.28&quot; y=&quot;-55.85&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;trap / syscall&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN&amp;#45;&amp;gt;Apps --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KERN-&gt;Apps&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M374.57,-23.61C322.91,-20.98 241.05,-17.85 170.22,-19.82 149.06,-20.41 125.87,-21.57 105.42,-22.76&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;105.33,-19.26 95.56,-23.36 105.75,-26.25 105.33,-19.26&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;219.06&quot; y=&quot;-24.02&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;return&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HW --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HW&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;696.25,-44.62 619.57,-44.62 619.57,-8.62 696.25,-8.62 696.25,-44.62&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;657.91&quot; y=&quot;-22.42&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Hardware&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KERN-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M479.67,-26.62C518.15,-26.62 570.34,-26.62 608.11,-26.62&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;607.83,-30.12 617.83,-26.62 607.83,-23.12 607.83,-30.12&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;549.47&quot; y=&quot;-30.82&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;driver / instruction&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HW&amp;#45;&amp;gt;KERN --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;HW-&gt;KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M619.31,-10.45C613.47,-8.53 607.42,-6.88 601.57,-5.82 556,2.46 543.19,0.9 497.37,-5.82 495.17,-6.14 492.95,-6.52 490.72,-6.94&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;490.03,-3.51 481,-9.06 491.52,-10.35 490.03,-3.51&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;549.47&quot; y=&quot;-10.02&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;interrupt / data&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_kernel Pages: 1 --&gt;
&lt;svg width=&quot;293pt&quot; height=&quot;207pt&quot; viewBox=&quot;0.00 0.00 293.00 207.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 203.13)&quot;&gt;
&lt;title&gt;semantic_kernel&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-203.13 289,-203.13 289,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;137.03&quot; cy=&quot;-99.52&quot; rx=&quot;35.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;137.03&quot; y=&quot;-95.62&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;220.64&quot; cy=&quot;-100.14&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;220.64&quot; y=&quot;-96.84&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M172.97,-99.79C173.06,-99.79 173.15,-99.79 173.24,-99.79&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;191.61&quot; y=&quot;-102.49&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MODE --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;119.11&quot; cy=&quot;-18&quot; rx=&quot;48.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;119.11&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MODE --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M133.05,-81.43C130.1,-68.01 126.1,-49.79 123.14,-36.32&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.6&quot; y=&quot;-61.58&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MONO --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MONO&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;62.1&quot; cy=&quot;-136.37&quot; rx=&quot;62.1&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;62.1&quot; y=&quot;-133.07&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Monolithic Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MONO --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MONO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M111.24,-112.2C105.74,-114.91 99.86,-117.8 94.16,-120.61&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;82.44&quot; y=&quot;-108.3&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MICRO --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MICRO&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;189.23&quot; cy=&quot;-164.83&quot; rx=&quot;45.07&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;189.23&quot; y=&quot;-161.53&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Microkernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MICRO --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MICRO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M150.47,-116.34C158.09,-125.86 167.59,-137.76 175.29,-147.39&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;183.14&quot; y=&quot;-134.56&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SC&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;119.07&quot; cy=&quot;-181.13&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;119.07&quot; y=&quot;-177.83&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SC --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M133.04,-117.63C130.09,-131.06 126.07,-149.3 123.11,-162.79&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.58&quot; y=&quot;-132.11&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HYPER --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HYPER&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;61.82&quot; cy=&quot;-63.33&quot; rx=&quot;42.42&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;61.82&quot; y=&quot;-60.03&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Hypervisor&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;HYPER --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--HYPER&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M111.15,-87.07C104.43,-83.84 97.16,-80.34 90.32,-77.05&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;73.22&quot; y=&quot;-84.76&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DRIVER --&gt;
&lt;g id=&quot;node8&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DRIVER&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;189.84&quot; cy=&quot;-34.8&quot; rx=&quot;50.74&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;189.84&quot; y=&quot;-31.5&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Device Driver&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;DRIVER --&gt;
&lt;g id=&quot;edge7&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--DRIVER&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M150.91,-82.51C158.48,-73.23 167.86,-61.74 175.51,-52.36&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;176.97&quot; y=&quot;-70.14&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Runs in the most privileged CPU mode (Ring 0 / kernel mode)&lt;/li&gt;
&lt;li&gt;Manages processes, memory, devices, and files&lt;/li&gt;
&lt;li&gt;Provides system calls as a secure gateway for user-space requests&lt;/li&gt;
&lt;li&gt;Loaded at boot and stays in memory (resident)&lt;/li&gt;
&lt;li&gt;Can be monolithic, micro, or hybrid in architecture&lt;/li&gt;
&lt;li&gt;Is a strict subset of the full operating system&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — the OS contains the kernel as its core component&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — the kernel executes in kernel mode with full privileges&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — the kernel exposes system calls for user-space interaction&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — one architectural pattern where all kernel services run in kernel space&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../microkernel&quot; class=&quot;internal alias&quot; data-slug=&quot;microkernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Microkernel&lt;/a&gt; — an alternative pattern where only essential services run in kernel space&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../hypervisor&quot; class=&quot;internal alias&quot; data-slug=&quot;hypervisor&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Hypervisor&lt;/a&gt; — a hypervisor manages VMs, while a kernel manages processes on one OS&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — the restricted mode where applications run, contrasted with kernel mode&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;“Kernel” is often confused with “Operating System” — the kernel is a subset; the OS includes shell, utilities, libraries, and GUI&lt;/li&gt;
&lt;li&gt;A kernel panic (Linux) or BSOD (Windows) occurs when the kernel encounters a fatal error — any bug in kernel mode can crash the entire system&lt;/li&gt;
&lt;li&gt;Microkernels reduce crash surface by moving services to user space, but pay a performance cost from IPC overhead&lt;/li&gt;
&lt;li&gt;Modern Linux uses a monolithic kernel with dynamically loadable modules, blurring the pure monolithic vs microkernel distinction&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>memory-management</title>
    <link href="https://animishraa05.github.io/wiki/os/memory-management" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/memory-management.md" />
    <summary>Formal Definition “Memory Management is the function of an operating system that handles the allocation and deallocation of memory space to processes and ensures protection between them.” Explanation Memory management is the OS function that acts as the traffic controller for RAM.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Memory Management is the function of an operating system that handles the allocation and deallocation of memory space to processes and ensures protection between them.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;Memory management is the OS function that acts as the traffic controller for RAM. Physical RAM is limited (typically 4-64 GB on modern systems), and multiple processes must share it without interfering with each other. The OS’s memory manager allocates memory to processes when they start, tracks which parts of RAM are free or in use, deallocates memory when processes terminate, and most importantly, enforces protection so that Process A cannot read or write Process B’s memory. Modern OSes use virtual memory, giving each process its own private address space and mapping it to physical RAM through page tables. This provides both isolation and the illusion of nearly unlimited memory (via paging to disk).&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The OS maintains a page table for each process, mapping virtual addresses to physical memory frames&lt;/li&gt;
&lt;li&gt;When a process requests memory (e.g., via &lt;code class=&quot;notranslate&quot;&gt;malloc&lt;/code&gt;), the kernel allocates pages (typically 4 KB each) and maps them into the process’s virtual address space&lt;/li&gt;
&lt;li&gt;The Memory Management Unit (MMU) in the CPU performs the virtual-to-physical translation on every memory access&lt;/li&gt;
&lt;li&gt;If a process accesses a virtual page not currently in physical RAM, a page fault occurs — the OS loads the page from disk (swap) into RAM&lt;/li&gt;
&lt;li&gt;The OS prevents one process from accessing another process’s pages because page tables are process-specific and the kernel controls them&lt;/li&gt;
&lt;li&gt;When memory is tight, the OS uses page replacement algorithms (LRU, Clock, Working Set) to decide which pages to evict to disk&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: memory_management Pages: 1 --&gt;
&lt;svg width=&quot;899pt&quot; height=&quot;110pt&quot; viewBox=&quot;0.00 0.00 899.00 110.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 105.6)&quot;&gt;
&lt;title&gt;memory_management&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-105.6 895.2,-105.6 895.2,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- P1 --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;P1&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;132.73,-101.6 0,-101.6 0,-60 132.73,-60 132.73,-101.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;66.37&quot; y=&quot;-85&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Process A&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;66.37&quot; y=&quot;-68.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Virtual Addr Space&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MMU --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MMU&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;392.81,-71.6 233.65,-71.6 233.65,-30 392.81,-30 392.81,-71.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;313.23&quot; y=&quot;-55&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;MMU&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;313.23&quot; y=&quot;-38.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Hardware Translation)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- P1&amp;#45;&amp;gt;MMU --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;P1-&gt;MMU&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M132.98,-72.76C160.37,-69.41 192.63,-65.45 222.17,-61.83&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;222.35,-65.34 231.85,-60.65 221.49,-58.39 222.35,-65.34&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;183.19&quot; y=&quot;-74.44&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;virtual addr&lt;/text&gt;
&lt;/g&gt;
&lt;!-- P2 --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;P2&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;132.73,-41.6 0,-41.6 0,0 132.73,0 132.73,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;66.37&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Process B&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;66.37&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Virtual Addr Space&lt;/text&gt;
&lt;/g&gt;
&lt;!-- P2&amp;#45;&amp;gt;MMU --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;P2-&gt;MMU&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M132.98,-28.84C160.37,-32.19 192.63,-36.15 222.17,-39.77&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;221.49,-43.21 231.85,-40.95 222.35,-36.26 221.49,-43.21&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- RAM --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;RAM&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;685.54,-71.6 503.84,-71.6 503.84,-30 685.54,-30 685.54,-71.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;594.69&quot; y=&quot;-55&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Physical RAM&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;594.69&quot; y=&quot;-38.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Random Access Memory)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MMU&amp;#45;&amp;gt;RAM --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;MMU-&gt;RAM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M393.19,-50.8C423.87,-50.8 459.41,-50.8 491.97,-50.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;491.83,-54.3 501.83,-50.8 491.83,-47.3 491.83,-54.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;448.33&quot; y=&quot;-55&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;physical addr&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SWAP --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SWAP&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;891.2,-71.6 769.36,-71.6 769.36,-30 891.2,-30 891.2,-71.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;830.28&quot; y=&quot;-55&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Swap / Page File&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;830.28&quot; y=&quot;-38.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Disk)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RAM&amp;#45;&amp;gt;SWAP --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;RAM-&gt;SWAP&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M686,-50.8C709.84,-50.8 735.22,-50.8 757.9,-50.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;757.63,-54.3 767.63,-50.8 757.63,-47.3 757.63,-54.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;727.45&quot; y=&quot;-55&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;page out&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SWAP&amp;#45;&amp;gt;RAM --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;SWAP-&gt;RAM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M769.19,-33.1C763.21,-31.84 757.19,-30.76 751.36,-30 733.87,-27.71 715.28,-27.9 697.25,-29.47&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;696.91,-25.99 687.32,-30.5 697.63,-32.95 696.91,-25.99&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;727.45&quot; y=&quot;-34.2&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;page in&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_memory_management Pages: 1 --&gt;
&lt;svg width=&quot;287pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 287.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_memory_management&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 283.3,-205.07 283.3,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;145.22&quot; cy=&quot;-100.51&quot; rx=&quot;94.31&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;145.22&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Memory Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;216.62&quot; cy=&quot;-59.01&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;216.62&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M175.09,-83.15C181.81,-79.24 188.82,-75.17 195.12,-71.5&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;166.6&quot; y=&quot;-69.23&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;145.06&quot; cy=&quot;-18&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;145.06&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M145.19,-82.2C145.16,-68.53 145.12,-49.92 145.09,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;163.65&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;74.48&quot; cy=&quot;-142.96&quot; rx=&quot;56.8&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;74.48&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Virtual Machine&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;VM --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--VM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M116.04,-118.02C111.17,-120.95 106.13,-123.97 101.32,-126.85&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;128.95&quot; y=&quot;-125.14&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- CONT --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;CONT&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;217.2&quot; cy=&quot;-141.05&quot; rx=&quot;62.1&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;217.2&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Monolithic Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;CONT --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--CONT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M176.17,-117.94C180.28,-120.26 184.49,-122.63 188.56,-124.92&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;168.6&quot; y=&quot;-113.33&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PROC --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PROC&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;146.66&quot; cy=&quot;-183.07&quot; rx=&quot;76.09&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.66&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Process Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PROC --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PROC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M145.54,-118.83C145.78,-132.52 146.1,-151.13 146.34,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;145.94&quot; y=&quot;-133.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SEC --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SEC&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;73.44&quot; cy=&quot;-59.9&quot; rx=&quot;73.44&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;73.44&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Security &amp;#x26; Protection&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SEC --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SEC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M114.36,-83.05C110.56,-80.9 106.69,-78.71 102.91,-76.57&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;122.4&quot; y=&quot;-82.51&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Each process has an isolated virtual address space mapped to physical pages via page tables&lt;/li&gt;
&lt;li&gt;The MMU handles address translation in hardware — no software overhead on each memory access&lt;/li&gt;
&lt;li&gt;Page faults trigger OS intervention to load pages from disk swap&lt;/li&gt;
&lt;li&gt;Page replacement algorithms (LRU, Clock, FIFO, Working Set) manage memory pressure&lt;/li&gt;
&lt;li&gt;Memory protection is hardware-enforced: the CPU checks page-level permissions on every access&lt;/li&gt;
&lt;li&gt;Virtual memory allows overcommitting: processes can allocate more virtual memory than physical RAM exists&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel’s memory manager implements all memory operations&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — memory management is a core OS function&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../virtual-machine&quot; class=&quot;internal alias&quot; data-slug=&quot;virtual-machine&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Virtual Machine&lt;/a&gt; — hypervisors manage virtual RAM for each VM using memory management techniques&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../process-management&quot; class=&quot;internal alias&quot; data-slug=&quot;process-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Process Management&lt;/a&gt; — processes need memory to execute; scheduling and memory management interact closely&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../security-and-protection&quot; class=&quot;internal alias&quot; data-slug=&quot;security-and-protection&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Security and Protection&lt;/a&gt; — memory protection is a fundamental security mechanism&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — in monolithic kernels, memory management calls other components via direct function calls&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Memory leaks in applications cause gradual memory pressure; the OS cannot fix this — it must keep allocating until OOM killer activates&lt;/li&gt;
&lt;li&gt;Thrashing occurs when the system spends more time swapping pages to/from disk than executing code — the system effectively freezes&lt;/li&gt;
&lt;li&gt;Fragmentation: external fragmentation (free memory split into small chunks) can prevent large allocations despite total free space being sufficient&lt;/li&gt;
&lt;li&gt;Kernel memory is separate from user memory and cannot be swapped out — a bug in kernel memory management can crash the OS&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>microkernel</title>
    <link href="https://animishraa05.github.io/wiki/os/microkernel" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/microkernel.md" />
    <summary>Formal Definition “A Microkernel is a type of operating system architecture in which only essential services run in kernel space, while other services run in user space.” “A microkernel provides minimal operating system functionality such as process management, memory management, and communication, ...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“A Microkernel is a type of operating system architecture in which only essential services run in kernel space, while other services run in user space.”&lt;/p&gt;
&lt;p dir=&quot;auto&quot;&gt;“A microkernel provides minimal operating system functionality such as process management, memory management, and communication, while services like device drivers and file systems execute outside the kernel.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;A microkernel is the philosophical opposite of a monolithic kernel. It follows the principle of minimality: keep the kernel as small as possible. Only the absolutely essential services — process management, basic memory management, inter-process communication (IPC), and interrupt handling — stay in kernel mode. Everything else (file systems, device drivers, network stacks, system services) runs as regular user-space processes. This drastically reduces the attack surface and crash surface: a buggy graphics driver cannot crash the kernel because it runs with user-level privileges. The tradeoff is performance — communication between components requires IPC and multiple mode switches, which is slower than the direct function calls in a monolithic kernel.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The microkernel provides only a few core services: IPC, low-level process/thread management, and interrupt dispatching&lt;/li&gt;
&lt;li&gt;Other OS services (file server, network server, device drivers) run as separate user-space processes&lt;/li&gt;
&lt;li&gt;When an application needs a service, the request flows: application → microkernel (via syscall) → service process (via IPC) → microkernel → hardware&lt;/li&gt;
&lt;li&gt;Each message crossing requires a mode switch — the application to kernel, kernel to service, service back to kernel, kernel to application&lt;/li&gt;
&lt;li&gt;IPC in microkernels is carefully optimized (e.g., L4 microkernel can do IPC in ~50 instructions) to minimize overhead&lt;/li&gt;
&lt;li&gt;If a service crashes (e.g., the file server), the microkernel can restart it without rebooting the entire system&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: microkernel Pages: 1 --&gt;
&lt;svg width=&quot;610pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 610.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205)&quot;&gt;
&lt;title&gt;microkernel&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205 606.19,-205 606.19,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;g id=&quot;clust1&quot; class=&quot;cluster&quot;&gt;
&lt;title&gt;cluster_userspace&lt;/title&gt;
&lt;polygon fill=&quot;#e8f5e9&quot; stroke=&quot;black&quot; points=&quot;366.21,-8 366.21,-193 496.5,-193 496.5,-8 366.21,-8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;431.36&quot; y=&quot;-176.4&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;User Space Services&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APPS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;APPS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;98.47,-124.8 0,-124.8 0,-83.2 98.47,-83.2 98.47,-124.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;49.23&quot; y=&quot;-108.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Applications&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;49.23&quot; y=&quot;-91.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(User Space)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UK --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UK&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;316.42,-133.2 172.57,-133.2 172.57,-74.8 316.42,-74.8 316.42,-133.2&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;244.5&quot; y=&quot;-116.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Microkernel&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;244.5&quot; y=&quot;-99.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Kernel Space)&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;244.5&quot; y=&quot;-83&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;IPC | Process | Mem&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APPS&amp;#45;&amp;gt;UK --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;APPS-&gt;UK&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M98.5,-104C117.36,-104 139.53,-104 160.79,-104&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;160.62,-107.5 170.62,-104 160.62,-100.5 160.62,-107.5&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;135.52&quot; y=&quot;-108.2&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;syscall&lt;/text&gt;
&lt;/g&gt;
&lt;!-- FS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;FS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;472.7,-160 389.01,-160 389.01,-124 472.7,-124 472.7,-160&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;430.86&quot; y=&quot;-137.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;File Server&lt;/text&gt;
&lt;/g&gt;
&lt;!-- FS&amp;#45;&amp;gt;UK --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;FS-&gt;UK&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M388.62,-145.6C371.68,-146.15 351.95,-145.59 334.42,-142 328.46,-140.78 322.41,-139.14 316.4,-137.23&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;317.7,-133.98 307.11,-134.02 315.42,-140.6 317.7,-133.98&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;345.32&quot; y=&quot;-149.08&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;IPC&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DRV --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DRV&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;484.36,-106 377.35,-106 377.35,-70 484.36,-70 484.36,-106&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;430.86&quot; y=&quot;-83.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Device Drivers&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HW --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HW&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;602.19,-82 525.5,-82 525.5,-46 602.19,-46 602.19,-82&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;563.85&quot; y=&quot;-59.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Hardware&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DRV&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;DRV-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M484.76,-78.31C494.35,-76.55 504.31,-74.72 513.79,-72.99&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;514.35,-76.44 523.56,-71.2 513.09,-69.56 514.35,-76.44&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- NET --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;NET&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;487.09,-52 374.62,-52 374.62,-16 487.09,-16 487.09,-52&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;430.86&quot; y=&quot;-29.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Network Server&lt;/text&gt;
&lt;/g&gt;
&lt;!-- NET&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge7&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;NET-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M487.41,-46.72C496.23,-48.74 505.3,-50.82 513.96,-52.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;513.04,-56.18 523.57,-55 514.6,-49.36 513.04,-56.18&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- UK&amp;#45;&amp;gt;FS --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;UK-&gt;FS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M316.74,-117.26C329.88,-119.81 343.47,-122.53 356.21,-125.2 363.12,-126.65 370.37,-128.23 377.53,-129.83&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;376.62,-133.21 387.15,-131.99 378.16,-126.38 376.62,-133.21&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;345.32&quot; y=&quot;-129.4&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;IPC&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UK&amp;#45;&amp;gt;DRV --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;UK-&gt;DRV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M316.64,-87.6C322.63,-86.63 328.62,-85.81 334.42,-85.2 344.06,-84.19 346.53,-85.02 356.21,-85.2 359.39,-85.26 362.64,-85.34 365.93,-85.42&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;365.55,-88.91 375.65,-85.71 365.76,-81.91 365.55,-88.91&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;345.32&quot; y=&quot;-89.4&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;IPC&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UK&amp;#45;&amp;gt;NET --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;UK-&gt;NET&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M309.25,-74.42C317.65,-70.83 326.2,-67.33 334.42,-64.2 343.69,-60.67 353.56,-57.22 363.31,-53.98&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;364.37,-57.32 372.79,-50.89 362.2,-50.66 364.37,-57.32&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;345.32&quot; y=&quot;-68.4&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;IPC&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_microkernel Pages: 1 --&gt;
&lt;svg width=&quot;308pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 308.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_microkernel&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 304.19,-205.07 304.19,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;170.28&quot; cy=&quot;-100.51&quot; rx=&quot;55.08&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;170.28&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Microkernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;241.67&quot; cy=&quot;-59.01&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;241.67&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M197.68,-84.59C205.07,-80.29 212.96,-75.7 220,-71.61&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;190.33&quot; y=&quot;-70&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MONO --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MONO&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;170.11&quot; cy=&quot;-18&quot; rx=&quot;62.1&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;170.11&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Monolithic Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MONO --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MONO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M170.24,-82.2C170.21,-68.53 170.18,-49.92 170.15,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;183.95&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- IPC --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;IPC&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;99.53&quot; cy=&quot;-142.96&quot; rx=&quot;99.53&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;99.53&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Inter-Process Communication&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;IPC --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--IPC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M143.53,-116.56C138.68,-119.47 133.6,-122.52 128.68,-125.47&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;117.6&quot; y=&quot;-112.92&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MODE --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MODE&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;242.26&quot; cy=&quot;-141.05&quot; rx=&quot;57.94&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;242.26&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Mode Switching&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MODE --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M198.31,-116.3C203.36,-119.15 208.64,-122.12 213.7,-124.97&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;219.77&quot; y=&quot;-112.54&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MINIX --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MINIX&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;171.71&quot; cy=&quot;-183.07&quot; rx=&quot;34.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;171.71&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;MINIX 3&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MINIX --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MINIX&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M170.6,-118.83C170.83,-132.52 171.16,-151.13 171.4,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;160.87&quot; y=&quot;-133.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- QNX --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;QNX&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;98.49&quot; cy=&quot;-59.9&quot; rx=&quot;27&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;98.49&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;QNX&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;QNX --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--QNX&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M142.32,-84.69C134.6,-80.33 126.37,-75.67 119.15,-71.58&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;151&quot; y=&quot;-70.04&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Minimal kernel — only IPC, process scheduling, and interrupt handling in kernel mode&lt;/li&gt;
&lt;li&gt;Most services run as user-space processes with limited privileges&lt;/li&gt;
&lt;li&gt;Higher security and stability — service crashes remain isolated; kernel survives&lt;/li&gt;
&lt;li&gt;Slower than monolithic kernels due to IPC overhead and mode switches&lt;/li&gt;
&lt;li&gt;Examples: MINIX 3, QNX, L4 family, Mach&lt;/li&gt;
&lt;li&gt;Preferred in safety-critical systems (automotive, medical, aerospace) where reliability trumps speed&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the microkernel is an architectural approach to kernel design&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../inter-process-communication&quot; class=&quot;internal alias&quot; data-slug=&quot;inter-process-communication&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Inter-Process Communication&lt;/a&gt; — IPC is the backbone of microkernel communication&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — monolithic kernel keeps all services in kernel mode; microkernel minimizes kernel-mode code&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../real-time-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;real-time-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Real-Time Operating System&lt;/a&gt; — QNX (microkernel) is widely used in RTOS applications&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — microkernels incur more mode switches due to IPC between user-space services&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — most OS services run in user mode in a microkernel-based system&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Not all microkernels are equally minimal — the L4 family is more minimalist than Mach, which has a relatively large microkernel&lt;/li&gt;
&lt;li&gt;The IPC overhead can be mitigated with hardware acceleration (like L4’s fast IPC) but is still higher than function calls&lt;/li&gt;
&lt;li&gt;Pure microkernels are rare in mainstream computing — most consumer OSes use hybrid or monolithic kernels&lt;/li&gt;
&lt;li&gt;MINIX 3 was designed as a “highly reliable” microkernel OS and influenced Intel’s Management Engine (ME)&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>mode-switching</title>
    <link href="https://animishraa05.github.io/wiki/os/mode-switching" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/mode-switching.md" />
    <summary>Formal Definition “Mode switching is the transition between user mode and kernel mode that occurs when a system call, interrupt, or exception requires privileged execution.” Explanation Mode switching is the mechanism by which the CPU changes its privilege level between user mode (restricted) and ke...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Mode switching is the transition between user mode and kernel mode that occurs when a system call, interrupt, or exception requires privileged execution.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;Mode switching is the mechanism by which the CPU changes its privilege level between user mode (restricted) and kernel mode (full access). This is not the same as a process context switch (switching between processes) — it is a change in the CPU’s privilege level within the same process. Every system call, hardware interrupt, or CPU exception triggers a mode switch. Because mode switches involve saving and restoring CPU registers, flushing the TLB on some architectures, and privilege validation, they are significantly more expensive than regular function calls. Experienced OS engineers and systems programmers minimize mode switches for performance-critical code.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;A user-mode program executes a special instruction: &lt;code class=&quot;notranslate&quot;&gt;syscall&lt;/code&gt; (x86-64), &lt;code class=&quot;notranslate&quot;&gt;svc&lt;/code&gt; (ARM), or &lt;code class=&quot;notranslate&quot;&gt;int 0x80&lt;/code&gt; (legacy x86)&lt;/li&gt;
&lt;li&gt;The CPU saves the current user-mode state (instruction pointer, stack pointer, registers) to kernel stack&lt;/li&gt;
&lt;li&gt;The CPU loads the kernel’s stack and instruction pointer, and sets the mode bit to kernel mode&lt;/li&gt;
&lt;li&gt;The kernel’s system call handler executes the requested operation&lt;/li&gt;
&lt;li&gt;Upon completion, the kernel executes a return-from-interrupt instruction (&lt;code class=&quot;notranslate&quot;&gt;iret&lt;/code&gt;, &lt;code class=&quot;notranslate&quot;&gt;sysret&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;The CPU restores the user-mode state, sets the mode bit back to user mode, and the program continues&lt;/li&gt;
&lt;li&gt;Interrupts and exceptions follow a similar flow but are triggered by hardware or CPU faults rather than program instructions&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: mode_switch Pages: 1 --&gt;
&lt;svg width=&quot;1019pt&quot; height=&quot;62pt&quot; viewBox=&quot;0.00 0.00 1019.00 62.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 58.4)&quot;&gt;
&lt;title&gt;mode_switch&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-58.4 1015.07,-58.4 1015.07,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- UM --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UM&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;100.83,-41.6 0,-41.6 0,0 100.83,0 100.83,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;50.41&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;User Mode&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;50.41&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(App running)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TRAP --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;TRAP&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;328.22,-38.8 207.18,-38.8 207.18,-2.8 328.22,-2.8 328.22,-38.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;267.7&quot; y=&quot;-16.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;syscall / interrupt&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UM&amp;#45;&amp;gt;TRAP --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;UM-&gt;TRAP&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M101.07,-20.8C129.17,-20.8 164.77,-20.8 195.76,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;195.43,-24.3 205.43,-20.8 195.43,-17.3 195.43,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;154&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;event occurs&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;559.91,-41.6 454.43,-41.6 454.43,0 559.91,0 559.91,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;507.17&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;507.17&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Handler runs)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TRAP&amp;#45;&amp;gt;KERN --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;TRAP-&gt;KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M328.62,-20.8C363.46,-20.8 407.34,-20.8 442.76,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;442.42,-24.3 452.42,-20.8 442.42,-17.3 442.42,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;391.32&quot; y=&quot;-41.8&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;CPU saves state&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;391.32&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;mode bit = 0&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RET --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;RET&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;757.59,-38.8 703.59,-38.8 703.59,-2.8 757.59,-2.8 757.59,-38.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;730.59&quot; y=&quot;-16.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;return&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN&amp;#45;&amp;gt;RET --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KERN-&gt;RET&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M560.36,-20.8C600.68,-20.8 655.53,-20.8 691.71,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;691.71,-24.3 701.71,-20.8 691.71,-17.3 691.71,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;631.75&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;operation complete&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UM2 --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UM2&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;1011.07,-41.6 897.01,-41.6 897.01,0 1011.07,0 1011.07,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;954.04&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;User Mode&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;954.04&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(App continues)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RET&amp;#45;&amp;gt;UM2 --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;RET-&gt;UM2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M757.86,-20.8C789.1,-20.8 842.41,-20.8 885.43,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;885.18,-24.3 895.18,-20.8 885.18,-17.3 885.18,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;827.3&quot; y=&quot;-41.8&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;CPU restores state&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;827.3&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;mode bit = 1&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_mode_switching Pages: 1 --&gt;
&lt;svg width=&quot;287pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 287.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_mode_switching&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 283.3,-205.07 283.3,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;135.78&quot; cy=&quot;-100.51&quot; rx=&quot;71.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;135.78&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Mode Switching&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UMODE --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;207.17&quot; cy=&quot;-59.01&quot; rx=&quot;43.18&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;207.17&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;User Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;UMODE --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--UMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M164.82,-83.63C170.37,-80.4 176.16,-77.04 181.6,-73.88&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;154.7&quot; y=&quot;-70.65&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KMODE --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;135.61&quot; cy=&quot;-18&quot; rx=&quot;48.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;135.61&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KMODE --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M135.74,-82.2C135.71,-68.53 135.68,-49.92 135.65,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;144.95&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYS&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;65.03&quot; cy=&quot;-142.96&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;65.03&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SYS --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SYS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M107.82,-117.29C102.25,-120.63 96.44,-124.12 90.95,-127.41&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;79.12&quot; y=&quot;-114.25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PRIV --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PRIV&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;207.75&quot; cy=&quot;-141.05&quot; rx=&quot;71.54&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;207.75&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;CPU Privilege Rings&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PRIV --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PRIV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M165.47,-117.24C169.65,-119.59 173.95,-122.01 178.13,-124.37&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;190.3&quot; y=&quot;-112.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;137.21&quot; cy=&quot;-183.07&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;137.21&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M136.1,-118.83C136.33,-132.52 136.66,-151.13 136.9,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;122.74&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- INT --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;INT&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;63.99&quot; cy=&quot;-59.9&quot; rx=&quot;63.99&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;63.99&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Interrupt Handling&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;INT --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--INT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M106.17,-83.76C101.84,-81.31 97.39,-78.79 93.07,-76.35&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;113.38&quot; y=&quot;-82.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Different from a process context switch — mode switch changes privilege level within the same process&lt;/li&gt;
&lt;li&gt;Triggered by system calls, hardware interrupts, and CPU exceptions&lt;/li&gt;
&lt;li&gt;Involves saving/restoring CPU registers and switching stacks&lt;/li&gt;
&lt;li&gt;More expensive (~50-200 CPU cycles) than a regular function call (~5-10 cycles)&lt;/li&gt;
&lt;li&gt;Mode switching overhead is a key reason buffered I/O exists (amortize switch cost over large reads/writes)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — mode switching starts in user mode before transitioning to kernel mode&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — mode switching transitions into kernel mode for privileged work&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../cpu-privilege-rings&quot; class=&quot;internal alias&quot; data-slug=&quot;cpu-privilege-rings&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;CPU Privilege Rings&lt;/a&gt; — the hardware privilege ring mechanism enables mode switching&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — every system call requires a mode switch&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel orchestrates mode switches through its handler routines&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — fewer mode switches needed when kernel services are in-kernel vs user-space&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Mode switch is NOT the same as context switch — a context switch changes which process runs; a mode switch changes privilege level within the same process&lt;/li&gt;
&lt;li&gt;Too many mode switches degrade performance — this is why &lt;code class=&quot;notranslate&quot;&gt;read(fd, buf, 4096)&lt;/code&gt; is better than 4096 calls to &lt;code class=&quot;notranslate&quot;&gt;read(fd, byte, 1)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Some kernel bypass techniques (DPDK, io_uring) reduce mode switches by allowing user-space to directly interact with hardware in controlled ways&lt;/li&gt;
&lt;li&gt;Virtual machines add another layer: VM exits cause a switch from guest kernel mode to host hypervisor mode&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>monolithic-kernel</title>
    <link href="https://animishraa05.github.io/wiki/os/monolithic-kernel" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/monolithic-kernel.md" />
    <summary>Formal Definition “A Monolithic Kernel is a type of operating system architecture in which all operating system services execute in kernel space.” “In a monolithic kernel, all basic services such as process management, memory management, file management, and device drivers run in a single kernel add...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“A Monolithic Kernel is a type of operating system architecture in which all operating system services execute in kernel space.”&lt;/p&gt;
&lt;p dir=&quot;auto&quot;&gt;“In a monolithic kernel, all basic services such as process management, memory management, file management, and device drivers run in a single kernel address space.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;A monolithic kernel is the traditional and most common kernel architecture. Every OS service — process scheduler, memory manager, file system, device drivers, network stack, interrupt handler — runs in a single giant block of code in kernel mode. Because all components share the same address space, they communicate directly via function calls with no overhead. This makes monolithic kernels very fast. Linux is the most famous example. The tradeoff is that any bug in any kernel component — even a third-party device driver — can crash the entire operating system, since all code runs with full hardware privileges.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;All kernel services are compiled into one large binary that runs in kernel space (Ring 0)&lt;/li&gt;
&lt;li&gt;Components communicate by direct function calls — the file system calls the memory manager’s function directly&lt;/li&gt;
&lt;li&gt;No message passing or IPC is needed between kernel services because they all share the same address space&lt;/li&gt;
&lt;li&gt;Device drivers are loaded into kernel space, either compiled in or as dynamically loadable kernel modules (LKMs)&lt;/li&gt;
&lt;li&gt;When an application makes a system call, the kernel handles it entirely within kernel space, often without switching back to user mode until the full operation completes&lt;/li&gt;
&lt;li&gt;Modular monolithic kernels (like Linux) allow loading/unloading modules at runtime, providing some of the flexibility of microkernels without the IPC overhead&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: monolithic_kernel Pages: 1 --&gt;
&lt;svg width=&quot;670pt&quot; height=&quot;216pt&quot; viewBox=&quot;0.00 0.00 670.00 216.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 212)&quot;&gt;
&lt;title&gt;monolithic_kernel&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-212 666.05,-212 666.05,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;g id=&quot;clust1&quot; class=&quot;cluster&quot;&gt;
&lt;title&gt;cluster_kernel&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;286.62,-15 286.62,-200 557.36,-200 557.36,-15 286.62,-15&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;421.99&quot; y=&quot;-183.4&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;Monolithic Kernel (Kernel Space)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APPS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;APPS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;124.94,-167 0,-167 0,-131 124.94,-131 124.94,-167&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;62.47&quot; y=&quot;-144.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;User Applications&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SC&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;258.62,-167 160.94,-167 160.94,-131 258.62,-131 258.62,-167&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;209.78&quot; y=&quot;-144.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APPS&amp;#45;&amp;gt;SC --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;APPS-&gt;SC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M125.09,-149C133.1,-149 141.28,-149 149.25,-149&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;149.21,-152.5 159.21,-149 149.21,-145.5 149.21,-152.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- PM --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PM&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;400.48,-167 295.01,-167 295.01,-131 400.48,-131 400.48,-167&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;347.74&quot; y=&quot;-144.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Process Mgmt&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC&amp;#45;&amp;gt;PM --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;SC-&gt;PM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M259.1,-149C266.98,-149 275.26,-149 283.44,-149&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;283.38,-152.5 293.38,-149 283.38,-145.5 283.38,-152.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- MM --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MM&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;545.84,-167 440.39,-167 440.39,-131 545.84,-131 545.84,-167&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;493.11&quot; y=&quot;-144.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Memory Mgmt&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC&amp;#45;&amp;gt;MM --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;SC-&gt;MM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M254.61,-167.46C264.93,-171 276.02,-174.17 286.62,-176 336.66,-184.64 350.62,-183.28 400.87,-176 410.15,-174.66 419.81,-172.58 429.21,-170.16&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;429.91,-173.6 438.64,-167.59 428.07,-166.85 429.91,-173.6&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- FS --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;FS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;392.31,-113 303.18,-113 303.18,-77 392.31,-77 392.31,-113&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;347.74&quot; y=&quot;-90.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;File System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC&amp;#45;&amp;gt;FS --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;SC-&gt;FS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M257.19,-130.57C268.5,-126.08 280.7,-121.23 292.34,-116.61&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;293.43,-119.94 301.43,-113 290.84,-113.44 293.43,-119.94&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- PM&amp;#45;&amp;gt;MM --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;PM-&gt;MM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M400.91,-149C410.02,-149 419.58,-149 428.94,-149&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;428.71,-152.5 438.71,-149 428.71,-145.5 428.71,-152.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- SCHED --&gt;
&lt;g id=&quot;node8&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SCHED&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;549.36,-113 436.87,-113 436.87,-77 549.36,-77 549.36,-113&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;493.11&quot; y=&quot;-90.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;CPU Scheduler&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PM&amp;#45;&amp;gt;SCHED --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;PM-&gt;SCHED&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M397.68,-130.57C408.99,-126.31 421.13,-121.74 432.82,-117.33&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;433.85,-120.68 441.98,-113.88 431.39,-114.13 433.85,-120.68&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- DRV --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DRV&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;546.62,-59 439.61,-59 439.61,-23 546.62,-23 546.62,-59&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;493.11&quot; y=&quot;-36.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Device Drivers&lt;/text&gt;
&lt;/g&gt;
&lt;!-- FS&amp;#45;&amp;gt;DRV --&gt;
&lt;g id=&quot;edge7&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;FS-&gt;DRV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M392.54,-78.5C405.14,-73.76 419.11,-68.5 432.5,-63.45&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;433.54,-66.8 441.66,-60 431.07,-60.25 433.54,-66.8&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- HW --&gt;
&lt;g id=&quot;node9&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HW&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;662.05,-36 585.36,-36 585.36,0 662.05,0 662.05,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;623.7&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Hardware&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DRV&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge8&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;DRV-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M546.79,-31.58C555.66,-29.99 564.84,-28.35 573.62,-26.78&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;574.15,-30.24 583.38,-25.03 572.92,-23.35 574.15,-30.24&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- NET --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;NET&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;400.87,-59 294.62,-59 294.62,-23 400.87,-23 400.87,-59&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;347.74&quot; y=&quot;-36.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Network Stack&lt;/text&gt;
&lt;/g&gt;
&lt;!-- NET&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge9&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;NET-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M399.87,-22.54C411.86,-18.99 424.68,-15.82 436.87,-14 489.83,-6.07 503.83,-12.36 557.36,-14 562.69,-14.16 568.26,-14.4 573.8,-14.68&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;573.37,-18.16 583.54,-15.22 573.75,-11.17 573.37,-18.16&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_monolithic_kernel Pages: 1 --&gt;
&lt;svg width=&quot;252pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 252.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_monolithic_kernel&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 248.1,-205.07 248.1,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;121.39&quot; cy=&quot;-100.51&quot; rx=&quot;76.62&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;121.39&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Monolithic Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;192.78&quot; cy=&quot;-59.01&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;192.78&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M150.42,-83.63C157.37,-79.59 164.67,-75.35 171.21,-71.55&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;142.31&quot; y=&quot;-69.49&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MICRO --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MICRO&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;121.22&quot; cy=&quot;-18&quot; rx=&quot;45.07&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;121.22&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Microkernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MICRO --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MICRO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M121.35,-82.2C121.32,-68.53 121.28,-49.92 121.26,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;135.06&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MODE --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;50.64&quot; cy=&quot;-142.96&quot; rx=&quot;48.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;50.64&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MODE --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M93.02,-117.53C87.64,-120.76 82.03,-124.13 76.72,-127.31&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;103.38&quot; y=&quot;-125.12&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DRV --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DRV&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;193.36&quot; cy=&quot;-141.05&quot; rx=&quot;50.74&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;193.36&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Device Driver&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;DRV --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--DRV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M151.49,-117.47C156.27,-120.16 161.19,-122.93 165.9,-125.58&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;144.94&quot; y=&quot;-124.23&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- LINUX --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;LINUX&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;122.82&quot; cy=&quot;-183.07&quot; rx=&quot;27&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;122.82&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Linux&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;LINUX --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--LINUX&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M121.7,-118.83C121.94,-132.52 122.27,-151.13 122.5,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;122.1&quot; y=&quot;-133.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYS&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;49.6&quot; cy=&quot;-59.9&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;49.6&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SYS --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SYS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M91.36,-83.52C86.44,-80.74 81.37,-77.87 76.54,-75.14&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;97.71&quot; y=&quot;-71.23&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;All OS services run in kernel space — no separation between components&lt;/li&gt;
&lt;li&gt;Very fast due to direct function calls (no IPC overhead between services)&lt;/li&gt;
&lt;li&gt;Large codebase — millions of lines of code running with full privileges&lt;/li&gt;
&lt;li&gt;High risk: a bug in any single component can crash the entire system&lt;/li&gt;
&lt;li&gt;Linux is the most prominent example of a monolithic kernel (with modular extensions)&lt;/li&gt;
&lt;li&gt;Dynamic loadable modules (LKMs) provide some flexibility — drivers can be loaded/unloaded at runtime&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the monolithic kernel is one architectural pattern for kernel design&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — all monolithic kernel services execute in kernel mode&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../microkernel&quot; class=&quot;internal alias&quot; data-slug=&quot;microkernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Microkernel&lt;/a&gt; — microkernel keeps only essential services in kernel mode, moving others to user space&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — Linux (monolithic kernel) is a complete OS&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — system calls from applications enter the monolithic kernel&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../device-management&quot; class=&quot;internal alias&quot; data-slug=&quot;device-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Device Management&lt;/a&gt; — device drivers run inside the monolithic kernel space&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Modern Linux is not a “pure” monolithic kernel — it supports loadable kernel modules, which is a hybrid feature&lt;/li&gt;
&lt;li&gt;The line between monolithic and microkernel is blurry: Linux can load/unload drivers dynamically, while some microkernels allow loading kernel extensions&lt;/li&gt;
&lt;li&gt;Monolithic kernels are NOT inherently less secure — the attack surface is larger, but the code has been battle-tested for decades (Linux)&lt;/li&gt;
&lt;li&gt;Windows NT uses a hybrid kernel — some services run in kernel mode, some in user mode — occupying a middle ground&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>Monolithic vs Microkernel — Performance vs Safety</title>
    <link href="https://animishraa05.github.io/wiki/os/monolithic-vs-microkernel" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/monolithic-vs-microkernel.md" />
    <summary>Framing This synthesis compares the two dominant operating system kernel architectures — monolithic and microkernel.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;framing&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Framing&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#framing&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;This synthesis compares the two dominant operating system kernel architectures — monolithic and microkernel. Both solve the same problem (how to organize the kernel’s internal components) but make opposite tradeoffs: monolithic kernels prioritize performance by running everything in kernel space, while microkernels prioritize safety and modularity by running only the minimum in kernel space. The choice between them shapes the entire OS’s performance profile, security posture, maintainability, and fault tolerance.&lt;/p&gt;
&lt;h2 id=&quot;structured-comparison&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Structured Comparison&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#structured-comparison&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Monolithic Kernel&lt;/th&gt;
&lt;th&gt;Microkernel&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Services location&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;All in kernel space&lt;/td&gt;
&lt;td&gt;Essential only in kernel; rest in user space&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Communication&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Direct function calls&lt;/td&gt;
&lt;td&gt;IPC (message passing)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fast — no IPC overhead&lt;/td&gt;
&lt;td&gt;Slower — IPC and mode switch overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lower — large attack surface&lt;/td&gt;
&lt;td&gt;Higher — most services run with limited privilege&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Stability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lower — one bug crashes the OS&lt;/td&gt;
&lt;td&gt;Higher — service crashes are isolated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kernel size&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Large (millions of LOC)&lt;/td&gt;
&lt;td&gt;Small (tens of thousands LOC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Linux, traditional Unix&lt;/td&gt;
&lt;td&gt;MINIX 3, QNX, L4, Mach&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Maximum performance&lt;/td&gt;
&lt;td&gt;Maximum reliability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Maintenance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Complex — tightly coupled code&lt;/td&gt;
&lt;td&gt;Easier — modular, independent services&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;insights-beyond-individual-concepts&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Insights Beyond Individual Concepts&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#insights-beyond-individual-concepts&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;the-performance-safety-spectrum&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;The Performance-Safety Spectrum&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#the-performance-safety-spectrum&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;Monolithic and microkernel architectures exist on a spectrum, not a binary divide. Modern Linux is not a “pure” monolithic kernel — it supports dynamically loadable kernel modules (LKMs), which adds a degree of modularity. Conversely, many microkernels allow certain performance-critical drivers to run in kernel space as an optimization. The practical distinction is where the boundary is drawn, not whether it exists.&lt;/p&gt;
&lt;h3 id=&quot;why-microkernels-havent-won&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Why Microkernels Haven’t Won&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#why-microkernels-havent-won&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;Despite their theoretical advantages in safety and modularity, microkernels are rare in mainstream computing. The primary reason is the IPC overhead: every service request between user-space components requires multiple mode switches and message copies, resulting in 5-30% performance degradation for I/O-intensive workloads. For desktop and server workloads, this penalty outweighs the safety benefits for most users. However, in safety-critical domains (automotive, aerospace, medical), the reliability guarantees of microkernels like QNX are non-negotiable.&lt;/p&gt;
&lt;h3 id=&quot;the-hybrid-reality&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;The Hybrid Reality&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#the-hybrid-reality&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;Most deployed OSes are hybrids. Windows NT architecture places the kernel, executive, and hardware abstraction layer in kernel space, while many subsystems (graphics, printing) run in user space. macOS uses the XNU kernel, which combines a Mach microkernel core with a monolithic BSD layer. This hybrid approach tries to capture the best of both worlds: fast kernel-internal communication where it matters, and user-space isolation for crash-prone components like drivers.&lt;/p&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — one of the two architectures compared&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../microkernel&quot; class=&quot;internal alias&quot; data-slug=&quot;microkernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Microkernel&lt;/a&gt; — the other architecture compared&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — both architectures are designs for the kernel&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — monolithic kernels use kernel mode for all services&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — microkernels run most services in user mode&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../inter-process-communication&quot; class=&quot;internal alias&quot; data-slug=&quot;inter-process-communication&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Inter-Process Communication&lt;/a&gt; — IPC is the backbone of microkernel communication&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — the OS architecture determines which kernel design is used&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../device-management&quot; class=&quot;internal alias&quot; data-slug=&quot;device-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Device Management&lt;/a&gt; — device drivers are handled differently in each architecture&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../real-time-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;real-time-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Real-Time Operating System&lt;/a&gt; — QNX (microkernel) is widely used in RTOS applications&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>multiprogramming-operating-system</title>
    <link href="https://animishraa05.github.io/wiki/os/multiprogramming-operating-system" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/multiprogramming-operating-system.md" />
    <summary>Formal Definition “Multiprogramming Operating System is an OS in which multiple programs are kept in memory simultaneously and CPU switches among them to maximize utilization.” Explanation Multiprogramming was a breakthrough OS concept designed to solve a critical inefficiency: when a program waits ...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Multiprogramming Operating System is an OS in which multiple programs are kept in memory simultaneously and CPU switches among them to maximize utilization.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;Multiprogramming was a breakthrough OS concept designed to solve a critical inefficiency: when a program waits for I/O (disk read, keyboard input), the CPU sits idle. Multiprogramming keeps multiple programs in memory at once. When the currently executing program makes an I/O request, the OS switches the CPU to another program instead of idling. This dramatically improves CPU utilization. The key insight is that most programs spend a significant portion of their time waiting for I/O — by overlapping one program’s computation with another program’s I/O wait, the CPU stays busy much longer. Multiprogramming is NOT the same as multitasking: the goal is CPU utilization, not user interactivity.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Multiple programs are loaded into memory simultaneously (e.g., Program A, B, C)&lt;/li&gt;
&lt;li&gt;Program A runs on the CPU until it issues an I/O request (e.g., read from disk)&lt;/li&gt;
&lt;li&gt;Instead of waiting idle, the OS performs a context switch: saves A’s state and loads B’s state&lt;/li&gt;
&lt;li&gt;Program B runs until it also needs I/O or its time quantum expires (in preemptive variants)&lt;/li&gt;
&lt;li&gt;The OS switches to Program C, and eventually back to A when A’s I/O completes&lt;/li&gt;
&lt;li&gt;The degree of multiprogramming (how many programs are in memory) determines how well the CPU can be kept busy&lt;/li&gt;
&lt;li&gt;Memory management (partitioning or paging) must protect each program’s memory from interference&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: multiprogramming Pages: 1 --&gt;
&lt;svg width=&quot;803pt&quot; height=&quot;90pt&quot; viewBox=&quot;0.00 0.00 803.00 90.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 85.6)&quot;&gt;
&lt;title&gt;multiprogramming&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-85.6 798.94,-85.6 798.94,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- A --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;A&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;93.03,-41.6 0,-41.6 0,0 93.03,0 93.03,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;46.51&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Program A&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;46.51&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Computing)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- AIO --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;AIO&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;281.52,-77.6 191.62,-77.6 191.62,-36 281.52,-36 281.52,-77.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;236.57&quot; y=&quot;-61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;A: I/O Wait&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;236.57&quot; y=&quot;-44.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Disk Read)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- A&amp;#45;&amp;gt;AIO --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;A-&gt;AIO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M93.52,-29.61C119.7,-34.62 152.68,-40.93 180.27,-46.21&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;179.37,-49.6 189.85,-48.05 180.69,-42.73 179.37,-49.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;142.32&quot; y=&quot;-48.33&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;I/O request&lt;/text&gt;
&lt;/g&gt;
&lt;!-- B --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;B&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;447.1,-81.6 354.07,-81.6 354.07,-40 447.1,-40 447.1,-81.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;400.59&quot; y=&quot;-65&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Program B&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;400.59&quot; y=&quot;-48.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Computing)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- AIO&amp;#45;&amp;gt;B --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;AIO-&gt;B&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M281.84,-57.89C300.48,-58.35 322.41,-58.89 342.27,-59.38&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;342.08,-62.88 352.16,-59.63 342.25,-55.88 342.08,-62.88&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;317.8&quot; y=&quot;-63.36&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;switch&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BIO --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;BIO&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;629.37,-73.8 545.69,-73.8 545.69,-37.8 629.37,-37.8 629.37,-73.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;587.53&quot; y=&quot;-51.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;B: I/O Wait&lt;/text&gt;
&lt;/g&gt;
&lt;!-- B&amp;#45;&amp;gt;BIO --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;B-&gt;BIO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M447.3,-59.56C473.6,-58.85 506.75,-57.96 534.1,-57.22&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;534.02,-60.72 543.92,-56.95 533.83,-53.72 534.02,-60.72&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;496.39&quot; y=&quot;-63.24&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;I/O request&lt;/text&gt;
&lt;/g&gt;
&lt;!-- C --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;C&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;794.94,-41.6 701.92,-41.6 701.92,0 794.94,0 794.94,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;748.43&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Program C&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;748.43&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Computing)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BIO&amp;#45;&amp;gt;C --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;BIO-&gt;C&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M629.86,-46.7C648.32,-42.63 670.38,-37.77 690.37,-33.37&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;691.05,-36.8 700.07,-31.23 689.55,-29.97 691.05,-36.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;665.64&quot; y=&quot;-46.66&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;switch&lt;/text&gt;
&lt;/g&gt;
&lt;!-- C&amp;#45;&amp;gt;A --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;C-&gt;A&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M701.66,-13.74C669.98,-9.45 626.79,-4.8 588.53,-4.8 235.57,-4.8 235.57,-4.8 235.57,-4.8 191.47,-4.8 141.77,-9.22 104.54,-13.42&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;104.44,-9.9 94.91,-14.53 105.25,-16.86 104.44,-9.9&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;400.59&quot; y=&quot;-9&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;A I/O done&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_multiprogramming Pages: 1 --&gt;
&lt;svg width=&quot;291pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 291.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_multiprogramming&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 287.17,-205.07 287.17,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;135.11&quot; cy=&quot;-100.51&quot; rx=&quot;94.3&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;135.11&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Multiprogramming OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BATCH --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;BATCH&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;206.5&quot; cy=&quot;-59.01&quot; rx=&quot;39.02&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;206.5&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Batch OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;BATCH --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--BATCH&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M164.97,-83.15C170.63,-79.86 176.48,-76.46 181.95,-73.28&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;154.96&quot; y=&quot;-70.12&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTIT --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTIT&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;134.94&quot; cy=&quot;-18&quot; rx=&quot;57.55&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;134.94&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multitasking OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTIT --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTIT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M135.07,-82.2C135.04,-68.53 135.01,-49.92 134.98,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;135.03&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;64.36&quot; cy=&quot;-142.96&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;64.36&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M105.93,-118.02C101.36,-120.76 96.65,-123.59 92.11,-126.31&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;80.51&quot; y=&quot;-124.87&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MEM --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MEM&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;207.09&quot; cy=&quot;-141.05&quot; rx=&quot;76.09&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;207.09&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Memory Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MEM --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MEM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M166.05,-117.94C169.71,-120 173.44,-122.1 177.08,-124.15&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;185.33&quot; y=&quot;-123.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PROC --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PROC&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;136.55&quot; cy=&quot;-183.07&quot; rx=&quot;76.09&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;136.55&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Process Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PROC --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PROC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M135.43,-118.83C135.67,-132.52 135.99,-151.13 136.23,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;156.09&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SCHED --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SCHED&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;63.33&quot; cy=&quot;-59.9&quot; rx=&quot;59.83&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;63.33&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;CPU Scheduling&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SCHED --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SCHED&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M104.25,-83.05C100.15,-80.73 95.95,-78.36 91.89,-76.06&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;84.31&quot; y=&quot;-82.26&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Multiple programs reside in memory simultaneously — only one executes at a time&lt;/li&gt;
&lt;li&gt;Goal: maximize CPU utilization by overlapping computation with I/O wait&lt;/li&gt;
&lt;li&gt;Requires memory protection to isolate programs from each other&lt;/li&gt;
&lt;li&gt;Requires a CPU scheduler to decide which program runs next&lt;/li&gt;
&lt;li&gt;Degree of multiprogramming = number of programs in memory&lt;/li&gt;
&lt;li&gt;Context switching between programs adds overhead but the utilization gain outweighs it&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — multiprogramming is an OS design concept&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../batch-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;batch-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Batch Operating System&lt;/a&gt; — evolved from batch processing by adding concurrent memory residency&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../multitasking-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multitasking-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multitasking Operating System&lt;/a&gt; — multitasking extends multiprogramming with time-sharing for interactivity&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../process-management&quot; class=&quot;internal alias&quot; data-slug=&quot;process-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Process Management&lt;/a&gt; — scheduling and context switching are core enablers of multiprogramming&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../memory-management&quot; class=&quot;internal alias&quot; data-slug=&quot;memory-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Memory Management&lt;/a&gt; — keeping multiple programs in memory requires memory partitioning/protection&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../real-time-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;real-time-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Real-Time Operating System&lt;/a&gt; — RTOS prioritizes timing guarantees over utilization&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Too many programs in memory (high degree of multiprogramming) can cause thrashing — the system spends more time swapping than computing&lt;/li&gt;
&lt;li&gt;Without memory protection, one program could corrupt another program’s memory — this was a real problem in early systems&lt;/li&gt;
&lt;li&gt;Multiprogramming assumes I/O wait dominates execution time — CPU-bound workloads (pure computation, no I/O) get less benefit&lt;/li&gt;
&lt;li&gt;Students often confuse multiprogramming with multitasking: multiprogramming maximizes CPU utilization; multitasking provides responsive user experience&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>multitasking-operating-system</title>
    <link href="https://animishraa05.github.io/wiki/os/multitasking-operating-system" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/multitasking-operating-system.md" />
    <summary>Formal Definition “Multitasking Operating System allows multiple tasks to execute seemingly simultaneously by rapidly switching CPU among them.” Explanation Multitasking (also called time-sharing) is what makes modern computing feel responsive.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Multitasking Operating System allows multiple tasks to execute seemingly simultaneously by rapidly switching CPU among them.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;Multitasking (also called time-sharing) is what makes modern computing feel responsive. When you listen to music, code in VS Code, and download a file simultaneously, the OS is rapidly switching the CPU between these tasks — typically every 10-100 milliseconds. Each task gets a brief “time slice” (quantum), and the switching happens so fast that humans perceive everything running at once. While multiprogramming focuses on maximizing CPU utilization, multitasking focuses on user experience: each active task gets regular CPU time, ensuring no task is starved and the system feels responsive. Modern OSes like Windows, macOS, and Linux are all multitasking systems.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The OS scheduler maintains a list of all ready tasks (processes or threads)&lt;/li&gt;
&lt;li&gt;Each task is assigned a time quantum (typically 10-100 ms on consumer OSes)&lt;/li&gt;
&lt;li&gt;The scheduler dispatches Task A for its quantum&lt;/li&gt;
&lt;li&gt;A timer interrupt fires when the quantum expires, triggering a context switch&lt;/li&gt;
&lt;li&gt;The scheduler saves Task A’s state and loads Task B’s state (registers, stack, PC)&lt;/li&gt;
&lt;li&gt;Task B runs for its quantum, then Task C, and so on — round-robin style&lt;/li&gt;
&lt;li&gt;Interactive tasks (keyboard input, UI updates) get priority boosts so they feel snappy&lt;/li&gt;
&lt;li&gt;If a task blocks on I/O, it yields the CPU early — the scheduler picks another ready task&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: multitasking Pages: 1 --&gt;
&lt;svg width=&quot;563pt&quot; height=&quot;98pt&quot; viewBox=&quot;0.00 0.00 563.00 98.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 94)&quot;&gt;
&lt;title&gt;multitasking&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-94 558.96,-94 558.96,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- TIME --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;TIME&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;62.67,-36 0,-36 0,0 62.67,0 62.67,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;31.33&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Time →&lt;/text&gt;
&lt;/g&gt;
&lt;!-- T1 --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;T1&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;58.33,-90 4.33,-90 4.33,-54 58.33,-54 58.33,-90&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;31.33&quot; y=&quot;-67.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Music&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TM1 --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;TM1&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;152.67,-90 98.67,-90 98.67,-54 152.67,-54 152.67,-90&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;125.67&quot; y=&quot;-67.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;10ms&lt;/text&gt;
&lt;/g&gt;
&lt;!-- T1&amp;#45;&amp;gt;TM1 --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;T1-&gt;TM1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M58.55,-72C67.42,-72 77.5,-72 87.08,-72&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;86.88,-75.5 96.88,-72 86.88,-68.5 86.88,-75.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- T2 --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;T2&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;260.7,-90 188.67,-90 188.67,-54 260.7,-54 260.7,-90&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;224.69&quot; y=&quot;-67.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;VS Code&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TM2 --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;TM2&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;350.7,-90 296.7,-90 296.7,-54 350.7,-54 350.7,-90&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;323.7&quot; y=&quot;-67.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;10ms&lt;/text&gt;
&lt;/g&gt;
&lt;!-- T2&amp;#45;&amp;gt;TM2 --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;T2-&gt;TM2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M260.99,-72C268.85,-72 277.21,-72 285.16,-72&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;284.89,-75.5 294.89,-72 284.89,-68.5 284.89,-75.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- T3 --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;T3&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;464.96,-90 386.7,-90 386.7,-54 464.96,-54 464.96,-90&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;425.83&quot; y=&quot;-67.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Download&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TM3 --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;TM3&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;554.96,-90 500.96,-90 500.96,-54 554.96,-54 554.96,-90&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;527.96&quot; y=&quot;-67.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;10ms&lt;/text&gt;
&lt;/g&gt;
&lt;!-- T3&amp;#45;&amp;gt;TM3 --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;T3-&gt;TM3&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M465.26,-72C473.1,-72 481.34,-72 489.15,-72&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;489.07,-75.5 499.07,-72 489.07,-68.5 489.07,-75.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- TM1&amp;#45;&amp;gt;T2 --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;TM1-&gt;T2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M152.92,-72C160.32,-72 168.6,-72 176.82,-72&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;176.79,-75.5 186.79,-72 176.79,-68.5 176.79,-75.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- TM2&amp;#45;&amp;gt;T3 --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;TM2-&gt;T3&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M351.01,-72C358.42,-72 366.73,-72 375.04,-72&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;374.75,-75.5 384.75,-72 374.75,-68.5 374.75,-75.5&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_multitasking Pages: 1 --&gt;
&lt;svg width=&quot;287pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 287.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_multitasking&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 283.09,-205.07 283.09,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;131.61&quot; cy=&quot;-100.51&quot; rx=&quot;70.87&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;131.61&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Multitasking OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTI --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTI&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;203.01&quot; cy=&quot;-59.01&quot; rx=&quot;76.08&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;203.01&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multiprogramming OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTI --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTI&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M160.65,-83.63C164.98,-81.12 169.43,-78.53 173.76,-76.01&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;185.71&quot; y=&quot;-82.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BATCH --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;BATCH&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;131.45&quot; cy=&quot;-18&quot; rx=&quot;39.02&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;131.45&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Batch OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;BATCH --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--BATCH&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M131.58,-82.2C131.55,-68.53 131.51,-49.92 131.48,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;104.02&quot; y=&quot;-61.93&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RTOS --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;RTOS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;60.87&quot; cy=&quot;-142.96&quot; rx=&quot;53.01&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;60.87&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Real-Time OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;RTOS --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--RTOS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M103.65,-117.29C98.25,-120.53 92.6,-123.92 87.24,-127.14&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;67.94&quot; y=&quot;-114.11&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;203.59&quot; cy=&quot;-141.05&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;203.59&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M161.3,-117.24C165.64,-119.68 170.11,-122.19 174.43,-124.63&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;149.36&quot; y=&quot;-123.63&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PROC --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PROC&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;133.05&quot; cy=&quot;-183.07&quot; rx=&quot;76.09&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;133.05&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Process Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PROC --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PROC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M131.93,-118.83C132.17,-132.52 132.49,-151.13 132.73,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;112.07&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SCHED --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SCHED&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;59.83&quot; cy=&quot;-59.9&quot; rx=&quot;59.83&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;59.83&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;CPU Scheduling&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SCHED --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SCHED&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M102,-83.76C97.52,-81.22 92.91,-78.61 88.45,-76.09&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;81.47&quot; y=&quot;-82.62&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;CPU time is divided into small quanta (10-100 ms) and shared among tasks&lt;/li&gt;
&lt;li&gt;Goal: responsive user experience, not just CPU utilization&lt;/li&gt;
&lt;li&gt;Preemptive scheduling: the OS (not the program) controls when to switch&lt;/li&gt;
&lt;li&gt;Timer interrupt enforces the time quantum — prevents any single task from monopolizing the CPU&lt;/li&gt;
&lt;li&gt;Interactive tasks (UI, input) can be given priority for snappy response&lt;/li&gt;
&lt;li&gt;Underlies all modern general-purpose OSes (Windows, macOS, Linux, Android, iOS)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — multitasking is a key feature of modern OSes&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../multiprogramming-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multiprogramming-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multiprogramming Operating System&lt;/a&gt; — multitasking extends multiprogramming with time-sharing and preemption&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../process-management&quot; class=&quot;internal alias&quot; data-slug=&quot;process-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Process Management&lt;/a&gt; — the scheduler implements multitasking via context switching and time quanta&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../batch-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;batch-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Batch Operating System&lt;/a&gt; — batch OS has no interactivity; multitasking is built for interactive use&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../real-time-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;real-time-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Real-Time Operating System&lt;/a&gt; — RTOS guarantees deadlines; multitasking guarantees fairness and responsiveness&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — timer interrupts trigger mode switches for scheduler decisions&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Too many active tasks degrade performance — the scheduler overhead of frequent context switching adds up&lt;/li&gt;
&lt;li&gt;CPU-bound tasks can starve I/O-bound tasks if not properly prioritized — modern schedulers use multi-level feedback queues to balance this&lt;/li&gt;
&lt;li&gt;Multitasking does NOT mean parallel execution on a single core — it is rapid interleaving; true parallelism requires multiple cores&lt;/li&gt;
&lt;li&gt;The illusion of simultaneity breaks under heavy load — the system becomes sluggish (high load average)&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>operating-system</title>
    <link href="https://animishraa05.github.io/wiki/os/operating-system" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/operating-system.md" />
    <summary>Formal Definition “An Operating System is system software that acts as an intermediary between the user and computer hardware and manages system resources while providing services to application programs.” “Operating System is a program that manages computer hardware and software resources and provi...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“An Operating System is system software that acts as an intermediary between the user and computer hardware and manages system resources while providing services to application programs.”&lt;/p&gt;
&lt;p dir=&quot;auto&quot;&gt;“Operating System is a program that manages computer hardware and software resources and provides common services for computer programs.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;An Operating System is the master manager of a computer. Without it, hardware is inert — a CPU cannot run programs, RAM has no allocator, disks have no filesystem. The OS abstracts raw hardware into usable abstractions: processes, files, sockets, virtual memory. It sits between the user/application layer and the physical hardware, translating high-level requests (open a file, send a packet) into low-level hardware operations. The OS enforces security, fairness, and stability so that multiple programs can coexist without interfering with each other.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The OS boots when the computer starts: BIOS/UEFI loads the bootloader, which loads the OS kernel into memory&lt;/li&gt;
&lt;li&gt;The kernel initializes hardware (CPU, memory, devices) and sets up core data structures (process table, memory map, file descriptors)&lt;/li&gt;
&lt;li&gt;The OS presents a user interface — CLI or GUI — through which users launch applications&lt;/li&gt;
&lt;li&gt;Each application runs as a process, and the OS scheduler decides which process gets CPU time&lt;/li&gt;
&lt;li&gt;When an application needs hardware resources, it issues a system call, which switches the CPU from user mode to kernel mode&lt;/li&gt;
&lt;li&gt;The OS maintains isolation between processes: each process gets its own virtual address space, and the OS prevents cross-process memory access&lt;/li&gt;
&lt;li&gt;The OS also provides a file system abstraction over raw disk blocks, a networking stack, and device drivers for peripherals&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: operating_system Pages: 1 --&gt;
&lt;svg width=&quot;779pt&quot; height=&quot;55pt&quot; viewBox=&quot;0.00 0.00 779.00 55.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 50.91)&quot;&gt;
&lt;title&gt;operating_system&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-50.91 774.65,-50.91 774.65,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- User --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;User&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;139.72,-44.11 0,-44.11 0,-8.11 139.72,-8.11 139.72,-44.11&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;69.86&quot; y=&quot;-21.91&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Users / Applications&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;404.85,-46.91 269.42,-46.91 269.42,-5.31 404.85,-5.31 404.85,-46.91&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;337.14&quot; y=&quot;-30.31&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Operating System&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;337.14&quot; y=&quot;-13.51&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Kernel + Services)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- User&amp;#45;&amp;gt;OS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;User-&gt;OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M140.21,-26.11C176.24,-26.11 220.42,-26.11 257.69,-26.11&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;257.51,-29.61 267.51,-26.11 257.51,-22.61 257.51,-29.61&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;204.57&quot; y=&quot;-30.31&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;system calls / UI&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS&amp;#45;&amp;gt;User --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;OS-&gt;User&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M269.36,-8.14C263.33,-7 257.29,-6.02 251.42,-5.31 210.08,-0.31 199.08,-0.43 157.72,-5.31 155.52,-5.57 153.3,-5.87 151.07,-6.19&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;150.6,-2.72 141.31,-7.81 151.74,-9.63 150.6,-2.72&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;204.57&quot; y=&quot;-9.51&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;results / output&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HW --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HW&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;770.65,-46.91 584.31,-46.91 584.31,-5.31 770.65,-5.31 770.65,-46.91&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;677.48&quot; y=&quot;-30.31&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Hardware&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;677.48&quot; y=&quot;-13.51&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(CPU, RAM, Disk, Devices)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;OS-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M404.98,-26.11C452.72,-26.11 517.87,-26.11 572.38,-26.11&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;572.33,-29.61 582.33,-26.11 572.33,-22.61 572.33,-29.61&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;494.58&quot; y=&quot;-30.31&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;device drivers / interrupts&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HW&amp;#45;&amp;gt;OS --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;HW-&gt;OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M584.08,-7.38C578.09,-6.56 572.12,-5.86 566.31,-5.31 502.83,0.63 486.15,2.34 422.85,-5.31 420.66,-5.58 418.43,-5.88 416.19,-6.22&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;415.68,-2.76 406.41,-7.89 416.85,-9.66 415.68,-2.76&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;494.58&quot; y=&quot;-9.51&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;hardware response&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_operating_system Pages: 1 --&gt;
&lt;svg width=&quot;257pt&quot; height=&quot;207pt&quot; viewBox=&quot;0.00 0.00 257.00 207.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 203.13)&quot;&gt;
&lt;title&gt;semantic_operating_system&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-203.13 252.9,-203.13 252.9,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;131.73&quot; cy=&quot;-99.52&quot; rx=&quot;79.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;131.73&quot; y=&quot;-95.62&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERNEL --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERNEL&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;215.35&quot; cy=&quot;-100.14&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;215.35&quot; y=&quot;-96.84&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERNEL --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERNEL&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M211.31,-100.11C211.47,-100.11 211.63,-100.11 211.78,-100.12&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;230.05&quot; y=&quot;-102.81&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SC --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SC&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;113.82&quot; cy=&quot;-18&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;113.82&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SC --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M127.76,-81.43C124.81,-68.01 120.8,-49.79 117.84,-36.32&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;141.31&quot; y=&quot;-61.58&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;56.8&quot; cy=&quot;-136.37&quot; rx=&quot;56.8&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;56.8&quot; y=&quot;-133.07&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Virtual Machine&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;VM --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--VM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M97.77,-116.22C94.52,-117.82 91.23,-119.44 88.01,-121.02&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;113.15&quot; y=&quot;-121.32&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RTOS --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;RTOS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;183.93&quot; cy=&quot;-164.83&quot; rx=&quot;53.01&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;183.93&quot; y=&quot;-161.53&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Real-Time OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;RTOS --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--RTOS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M146,-117.37C153.36,-126.58 162.32,-137.8 169.69,-147.01&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;185.35&quot; y=&quot;-134.89&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- DIST --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;DIST&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;113.77&quot; cy=&quot;-181.13&quot; rx=&quot;54.15&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;113.77&quot; y=&quot;-177.83&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Distributed OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;DIST --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--DIST&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M127.75,-117.63C124.79,-131.06 120.78,-149.3 117.81,-162.79&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;136.53&quot; y=&quot;-132.11&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BATCH --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;BATCH&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;56.52&quot; cy=&quot;-63.33&quot; rx=&quot;39.02&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;56.52&quot; y=&quot;-60.03&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Batch OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;BATCH --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--BATCH&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M97.21,-82.91C92.73,-80.75 88.19,-78.57 83.85,-76.48&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;104.29&quot; y=&quot;-71.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTI --&gt;
&lt;g id=&quot;node8&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTI&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;184.54&quot; cy=&quot;-34.8&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;184.54&quot; y=&quot;-31.5&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multiprogramming&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTI --&gt;
&lt;g id=&quot;edge7&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTI&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M146.44,-81.49C153.77,-72.51 162.6,-61.69 169.91,-52.73&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;171.94&quot; y=&quot;-69.81&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Acts as an intermediary between user programs and hardware&lt;/li&gt;
&lt;li&gt;Manages CPU, memory, storage, and device resources&lt;/li&gt;
&lt;li&gt;Provides process isolation and security boundaries&lt;/li&gt;
&lt;li&gt;Supports multiple users and concurrent program execution&lt;/li&gt;
&lt;li&gt;Abstracts hardware complexity through standardized APIs (system calls)&lt;/li&gt;
&lt;li&gt;Enforces fair resource allocation via scheduling algorithms&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the core component of every OS&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — the interface through which programs request OS services&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../virtual-machine&quot; class=&quot;internal alias&quot; data-slug=&quot;virtual-machine&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Virtual Machine&lt;/a&gt; — VMs run on top of a host OS&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../real-time-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;real-time-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Real-Time Operating System&lt;/a&gt; — RTOS prioritizes timing guarantees over general-purpose throughput&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../batch-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;batch-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Batch Operating System&lt;/a&gt; — an early OS type that processes jobs in groups&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../multiprogramming-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multiprogramming-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multiprogramming Operating System&lt;/a&gt; — keeps multiple programs in memory to maximize CPU utilization&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The kernel is NOT the same as the OS: the OS includes the kernel plus utilities, UI, libraries, and file system components&lt;/li&gt;
&lt;li&gt;An OS can be running but appear frozen if the GUI hangs — the kernel may still be functioning&lt;/li&gt;
&lt;li&gt;Embedded systems often run without a full OS (bare-metal) or with a lightweight RTOS, not a general-purpose OS&lt;/li&gt;
&lt;li&gt;Containerized environments share the host OS kernel — this is fundamentally different from VMs which each have their own OS&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>Operating Systems — Map of Content</title>
    <link href="https://animishraa05.github.io/wiki/os/os-moc" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/os-moc.md" />
    <summary> All pages from the OS (Operating System) source ingested on 2026-06-11.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;blockquote&gt;
&lt;p dir=&quot;auto&quot;&gt;All pages from the OS (Operating System) source ingested on 2026-06-11.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;foundation-concepts&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Foundation Concepts&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#foundation-concepts&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — definition, functions, and role&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the core component&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — interface to the kernel&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — restricted execution mode&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — privileged execution mode&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — transitioning between modes&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../cpu-privilege-rings&quot; class=&quot;internal alias&quot; data-slug=&quot;cpu-privilege-rings&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;CPU Privilege Rings&lt;/a&gt; — hardware protection levels&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;os-functions&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;OS Functions&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#os-functions&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../process-management&quot; class=&quot;internal alias&quot; data-slug=&quot;process-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Process Management&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../memory-management&quot; class=&quot;internal alias&quot; data-slug=&quot;memory-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Memory Management&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../device-management&quot; class=&quot;internal alias&quot; data-slug=&quot;device-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Device Management&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../file-management&quot; class=&quot;internal alias&quot; data-slug=&quot;file-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;File Management&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../security-and-protection&quot; class=&quot;internal alias&quot; data-slug=&quot;security-and-protection&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Security and Protection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;kernel-architectures&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Kernel Architectures&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#kernel-architectures&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../microkernel&quot; class=&quot;internal alias&quot; data-slug=&quot;microkernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Microkernel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;inter-process-communication&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Inter-Process Communication&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#inter-process-communication&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../inter-process-communication&quot; class=&quot;internal alias&quot; data-slug=&quot;inter-process-communication&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Inter-Process Communication&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;virtualization&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Virtualization&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#virtualization&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../hypervisor&quot; class=&quot;internal alias&quot; data-slug=&quot;hypervisor&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Hypervisor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../virtual-machine&quot; class=&quot;internal alias&quot; data-slug=&quot;virtual-machine&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Virtual Machine&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;types-of-operating-systems&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Types of Operating Systems&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#types-of-operating-systems&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../batch-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;batch-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Batch Operating System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../multiprogramming-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multiprogramming-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multiprogramming Operating System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../multitasking-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multitasking-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multitasking Operating System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../real-time-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;real-time-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Real-Time Operating System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../distributed-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;distributed-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Distributed Operating System&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;synthesis--comparisons&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Synthesis &amp;#x26; Comparisons&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#synthesis--comparisons&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../monolithic-vs-microkernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-vs-microkernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic vs Microkernel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../user-mode-vs-kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode-vs-kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode vs Kernel Mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../types-of-os-comparison&quot; class=&quot;internal alias&quot; data-slug=&quot;types-of-os-comparison&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Types of OS Comparison&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>process-management</title>
    <link href="https://animishraa05.github.io/wiki/os/process-management" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/process-management.md" />
    <summary>Formal Definition “Process Management is the function of an operating system that handles the creation, scheduling, execution, and termination of processes.” Explanation Process management is the OS function responsible for juggling multiple programs on a single CPU.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Process Management is the function of an operating system that handles the creation, scheduling, execution, and termination of processes.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;Process management is the OS function responsible for juggling multiple programs on a single CPU. Since a CPU can execute only one instruction stream at a time (on a single core), the OS must decide which process runs now, for how long, and what happens when it pauses (e.g., waiting for disk I/O). This is called CPU scheduling. The OS also manages the full lifecycle of a process: creation (when a program starts), ready state (waiting for CPU), running state (executing), waiting state (blocked on I/O), and termination. Without process management, one program could hog the CPU forever, and multitasking would be impossible.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;When a program is launched, the OS creates a process: allocates a Process Control Block (PCB), assigns a PID, and sets up address space&lt;/li&gt;
&lt;li&gt;The process enters the ready queue, waiting for the CPU scheduler to pick it&lt;/li&gt;
&lt;li&gt;The scheduler uses an algorithm (FCFS, Round Robin, Priority, SJF) to decide which ready process gets CPU time&lt;/li&gt;
&lt;li&gt;The scheduler performs a context switch: saves the current process’s state (registers, PC, stack) and loads the next process’s state&lt;/li&gt;
&lt;li&gt;If a process makes a blocking I/O call (e.g., read from disk), it enters the waiting state; the scheduler picks another ready process&lt;/li&gt;
&lt;li&gt;When I/O completes, the process returns to ready queue&lt;/li&gt;
&lt;li&gt;The process eventually terminates (normal exit, error, or killed by signal) — the OS frees its resources&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: process_management Pages: 1 --&gt;
&lt;svg width=&quot;595pt&quot; height=&quot;107pt&quot; viewBox=&quot;0.00 0.00 595.00 107.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 103)&quot;&gt;
&lt;title&gt;process_management&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-103 591.13,-103 591.13,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- NEW --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;NEW&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;54,-59 0,-59 0,-23 54,-23 54,-59&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;27&quot; y=&quot;-36.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;New&lt;/text&gt;
&lt;/g&gt;
&lt;!-- READY --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;READY&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;195.46,-59 138.99,-59 138.99,-23 195.46,-23 195.46,-59&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;167.22&quot; y=&quot;-36.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Ready&lt;/text&gt;
&lt;/g&gt;
&lt;!-- NEW&amp;#45;&amp;gt;READY --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;NEW-&gt;READY&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M54.32,-41C74.96,-41 103.99,-41 127.31,-41&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;127.06,-44.5 137.06,-41 127.06,-37.5 127.06,-44.5&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;96.49&quot; y=&quot;-45.2&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;admitted&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RUN --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;RUN&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;415.4,-89 347.25,-89 347.25,-53 415.4,-53 415.4,-89&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;381.33&quot; y=&quot;-66.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Running&lt;/text&gt;
&lt;/g&gt;
&lt;!-- READY&amp;#45;&amp;gt;RUN --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;READY-&gt;RUN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M195.54,-53.42C201.35,-55.62 207.52,-57.64 213.46,-59 254.1,-68.31 301.64,-70.96 335.56,-71.48&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;335.41,-74.98 345.44,-71.57 335.47,-67.98 335.41,-74.98&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;270.02&quot; y=&quot;-75.43&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;scheduler dispatch&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RUN&amp;#45;&amp;gt;READY --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;RUN-&gt;READY&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M356.5,-52.6C347.61,-46.81 337.11,-41.16 326.59,-38.2 286.98,-27.07 239.57,-29.9 207.01,-34.18&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;206.63,-30.7 197.23,-35.59 207.62,-37.63 206.63,-30.7&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;270.02&quot; y=&quot;-42.4&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;interrupt / time slice&lt;/text&gt;
&lt;/g&gt;
&lt;!-- WAIT --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;WAIT&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;575.07,-36 512.39,-36 512.39,0 575.07,0 575.07,-36&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;543.73&quot; y=&quot;-13.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Waiting&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RUN&amp;#45;&amp;gt;WAIT --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;RUN-&gt;WAIT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M415.56,-60.02C440.37,-51.82 474.44,-40.56 501.07,-31.76&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;502.15,-35.1 510.55,-28.63 499.95,-28.45 502.15,-35.1&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;459.2&quot; y=&quot;-56.54&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;I/O wait&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TERM --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;TERM&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;587.13,-99 500.33,-99 500.33,-63 587.13,-63 587.13,-99&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;543.73&quot; y=&quot;-76.8&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Terminated&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RUN&amp;#45;&amp;gt;TERM --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;RUN-&gt;TERM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M415.56,-73.07C436.71,-74.39 464.59,-76.13 488.86,-77.64&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;488.36,-81.12 498.56,-78.25 488.8,-74.13 488.36,-81.12&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;459.2&quot; y=&quot;-81.39&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;exit&lt;/text&gt;
&lt;/g&gt;
&lt;!-- WAIT&amp;#45;&amp;gt;READY --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;WAIT-&gt;READY&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M512.02,-15.75C453.44,-12.12 321.9,-7.13 213.46,-26 211.16,-26.4 208.83,-26.89 206.49,-27.45&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;205.79,-24.01 197.1,-30.07 207.67,-30.76 205.79,-24.01&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;381.33&quot; y=&quot;-17.41&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;I/O complete&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_process_management Pages: 1 --&gt;
&lt;svg width=&quot;305pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 305.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_process_management&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 301.45,-205.07 301.45,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;149.39&quot; cy=&quot;-100.51&quot; rx=&quot;94.32&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;149.39&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Process Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;220.78&quot; cy=&quot;-59.01&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;220.78&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M179.25,-83.15C183.69,-80.58 188.24,-77.93 192.64,-75.37&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;167.44&quot; y=&quot;-81.96&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;149.22&quot; cy=&quot;-18&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;149.22&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M149.35,-82.2C149.33,-68.53 149.29,-49.92 149.26,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;149.31&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MODE --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MODE&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;78.64&quot; cy=&quot;-142.96&quot; rx=&quot;57.94&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;78.64&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Mode Switching&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MODE --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M120.21,-118.02C115.33,-120.95 110.3,-123.97 105.49,-126.85&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;126.61&quot; y=&quot;-114.34&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTI --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTI&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;221.37&quot; cy=&quot;-141.05&quot; rx=&quot;76.08&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;221.37&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multiprogramming OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTI --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTI&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M180.33,-117.94C183.99,-120 187.72,-122.1 191.36,-124.15&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;206.11&quot; y=&quot;-123.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTIT --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTIT&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;150.83&quot; cy=&quot;-183.07&quot; rx=&quot;57.55&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;150.83&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multitasking OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTIT --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTIT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M149.71,-118.83C149.95,-132.52 150.27,-151.13 150.51,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;139.98&quot; y=&quot;-133.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SCHED --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SCHED&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;77.61&quot; cy=&quot;-59.9&quot; rx=&quot;77.61&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;77.61&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Scheduling Algorithms&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SCHED --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SCHED&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M118.53,-83.05C114.88,-80.99 111.16,-78.88 107.53,-76.83&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;99.27&quot; y=&quot;-82.64&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Manages the full process lifecycle: create, ready, run, wait, terminate&lt;/li&gt;
&lt;li&gt;Uses a Process Control Block (PCB) per process to store state (registers, PID, memory info, open files)&lt;/li&gt;
&lt;li&gt;CPU scheduling algorithms determine which process runs and for how long&lt;/li&gt;
&lt;li&gt;Context switching between processes is expensive (TLB flush, register save/restore)&lt;/li&gt;
&lt;li&gt;Multiprogramming relies on process management to keep the CPU busy during I/O waits&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel’s scheduler implements process management&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — process management is a core OS function&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../multiprogramming-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multiprogramming-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multiprogramming Operating System&lt;/a&gt; — process management enables multiple programs in memory&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../multitasking-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multitasking-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multitasking Operating System&lt;/a&gt; — process management enables rapid switching for user-facing tasks&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — context switches are different from mode switches but both involve the scheduler&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../inter-process-communication&quot; class=&quot;internal alias&quot; data-slug=&quot;inter-process-communication&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Inter-Process Communication&lt;/a&gt; — IPC allows processes to communicate and synchronize&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Context switch is NOT the same as mode switch — context switch changes the running process (saves/loads PCB); mode switch changes privilege level within the same process&lt;/li&gt;
&lt;li&gt;Infinite loops in user mode can be preempted by timer interrupts — the scheduler reclaims control&lt;/li&gt;
&lt;li&gt;Priority inversion can occur when a high-priority process waits for a resource held by a low-priority process (solved by priority inheritance)&lt;/li&gt;
&lt;li&gt;Zombie processes (terminated but not waited on by parent) and orphan processes (parent terminated before child) are edge cases the OS must handle&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>real-time-operating-system</title>
    <link href="https://animishraa05.github.io/wiki/os/real-time-operating-system" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/real-time-operating-system.md" />
    <summary>Formal Definition “A Real-Time Operating System is an operating system that guarantees response within a specified time constraint.” Explanation An RTOS is designed for systems where timing is not just important — it is critical.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“A Real-Time Operating System is an operating system that guarantees response within a specified time constraint.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;An RTOS is designed for systems where timing is not just important — it is critical. Unlike a general-purpose OS that tries to be “fair” to all tasks, an RTOS guarantees that a specific operation will complete within a deadline. In a car’s airbag system, the sensor reading must trigger deployment within milliseconds — a late response means injury or death. RTOS achieves this through deterministic scheduling: tasks have fixed priorities, and the highest-priority ready task always runs. There are two variants: hard real-time (deadline must never be missed — aerospace, medical) and soft real-time (occasional missed deadline is acceptable — video streaming, gaming). RTOSes are typically smaller and more predictable than general-purpose OSes.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The RTOS uses priority-based preemptive scheduling — the highest-priority ready task always gets the CPU&lt;/li&gt;
&lt;li&gt;Tasks are assigned fixed priorities during system design; critical tasks get the highest priority&lt;/li&gt;
&lt;li&gt;The OS does not use time-sharing (fairness) — a high-priority task runs until it completes or blocks&lt;/li&gt;
&lt;li&gt;Interrupts are handled with minimal latency — the interrupt handler runs immediately, then awakens the relevant high-priority task&lt;/li&gt;
&lt;li&gt;The scheduler is deterministic — the maximum time to execute any scheduling operation is bounded and known&lt;/li&gt;
&lt;li&gt;Resource sharing uses priority inheritance to avoid priority inversion (low-priority task holding a lock needed by a high-priority task)&lt;/li&gt;
&lt;li&gt;The OS kernel is often minimal — many RTOSes are microkernels or even just a scheduler + IPC&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: rtos Pages: 1 --&gt;
&lt;svg width=&quot;746pt&quot; height=&quot;110pt&quot; viewBox=&quot;0.00 0.00 746.00 110.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 105.6)&quot;&gt;
&lt;title&gt;rtos&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-105.6 742.35,-105.6 742.35,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- SENSOR --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SENSOR&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;100.05,-101.6 0,-101.6 0,-60 100.05,-60 100.05,-101.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;50.02&quot; y=&quot;-85&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Sensor Event&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;50.02&quot; y=&quot;-68.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Interrupt)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- ISR --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;ISR&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;294.42,-101.6 173.37,-101.6 173.37,-60 294.42,-60 294.42,-101.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;233.89&quot; y=&quot;-85&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Interrupt Handler&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;233.89&quot; y=&quot;-68.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Highest Priority)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SENSOR&amp;#45;&amp;gt;ISR --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;SENSOR-&gt;ISR&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M100.24,-80.8C119.15,-80.8 141.12,-80.8 161.69,-80.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;161.42,-84.3 171.42,-80.8 161.42,-77.3 161.42,-84.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;136.71&quot; y=&quot;-85&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;trigger&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TASK1 --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;TASK1&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;478.64,-101.6 377.08,-101.6 377.08,-60 478.64,-60 478.64,-101.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;427.86&quot; y=&quot;-85&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Safety Task&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;427.86&quot; y=&quot;-68.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(High Priority)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- ISR&amp;#45;&amp;gt;TASK1 --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;ISR-&gt;TASK1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M294.84,-80.8C317.23,-80.8 342.68,-80.8 365.22,-80.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;365.2,-84.3 375.2,-80.8 365.2,-77.3 365.2,-84.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;335.75&quot; y=&quot;-85&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;dispatch&lt;/text&gt;
&lt;/g&gt;
&lt;!-- ACT --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;ACT&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;738.35,-61.6 597.07,-61.6 597.07,-20 738.35,-20 738.35,-61.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;667.71&quot; y=&quot;-45&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Actuator Response&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;667.71&quot; y=&quot;-28.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Before Deadline ✓)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TASK1&amp;#45;&amp;gt;ACT --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;TASK1-&gt;ACT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M479.01,-72.37C509.88,-67.17 550.17,-60.4 585.5,-54.46&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;586.01,-57.92 595.29,-52.81 584.85,-51.02 586.01,-57.92&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;537.85&quot; y=&quot;-73.18&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;critical action&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TASK2 --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;TASK2&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;477.89,-41.6 377.83,-41.6 377.83,0 477.89,0 477.89,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;427.86&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Logging Task&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;427.86&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Low Priority)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- TASK2&amp;#45;&amp;gt;ACT --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;TASK2-&gt;ACT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M478.27,-24.16C507.58,-26.24 545.46,-29.06 579.07,-32 581.24,-32.19 583.44,-32.39 585.66,-32.59&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;585.09,-36.05 595.37,-33.49 585.74,-29.08 585.09,-36.05&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;537.85&quot; y=&quot;-36.2&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;runs when idle&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_rtos Pages: 1 --&gt;
&lt;svg width=&quot;291pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 291.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_rtos&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 286.58,-205.07 286.58,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;146.83&quot; cy=&quot;-100.51&quot; rx=&quot;65.12&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.83&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Real-Time OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;218.22&quot; cy=&quot;-59.01&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;218.22&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M175.45,-83.87C180.26,-81.07 185.25,-78.17 190.05,-75.38&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;201.26&quot; y=&quot;-82.33&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- BATCH --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;BATCH&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;146.66&quot; cy=&quot;-18&quot; rx=&quot;39.02&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.66&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Batch OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;BATCH --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--BATCH&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M146.79,-82.2C146.76,-68.53 146.72,-49.92 146.7,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;132.99&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTI --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTI&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;76.08&quot; cy=&quot;-142.96&quot; rx=&quot;76.08&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;76.08&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multiprogramming OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTI --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTI&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M119.27,-117.05C114.46,-119.93 109.45,-122.94 104.61,-125.84&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;84.43&quot; y=&quot;-113.35&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MULTIT --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MULTIT&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;218.8&quot; cy=&quot;-141.05&quot; rx=&quot;57.55&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;218.8&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Multitasking OS&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MULTIT --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MULTIT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M176.1,-117C180.77,-119.63 185.6,-122.35 190.25,-124.97&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;210.69&quot; y=&quot;-112.89&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MICRO --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MICRO&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;148.26&quot; cy=&quot;-183.07&quot; rx=&quot;45.07&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;148.26&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Microkernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MICRO --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MICRO&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M147.14,-118.83C147.38,-132.52 147.71,-151.13 147.94,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;161.3&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;75.04&quot; cy=&quot;-59.9&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;75.04&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M117.63,-83.99C110.8,-80.13 103.63,-76.07 97.17,-72.41&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;125.9&quot; y=&quot;-70.1&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Guaranteed response within a specified deadline — determinism is the key requirement&lt;/li&gt;
&lt;li&gt;Hard real-time: missing a deadline is a system failure (aircraft, medical, automotive)&lt;/li&gt;
&lt;li&gt;Soft real-time: occasional missed deadlines degrade quality but don’t fail the system (video, audio)&lt;/li&gt;
&lt;li&gt;Priority-based preemptive scheduling with fixed priorities&lt;/li&gt;
&lt;li&gt;Minimal interrupt latency and dispatch latency&lt;/li&gt;
&lt;li&gt;Small kernel footprint — often a few KB of code&lt;/li&gt;
&lt;li&gt;Used in embedded systems, industrial control, automotive, aerospace, medical devices&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — RTOS is a specialized type of OS&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the RTOS kernel is designed for minimal latency and deterministic scheduling&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../batch-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;batch-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Batch Operating System&lt;/a&gt; — batch OS has no timing consideration; RTOS is built around timing guarantees&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../multitasking-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multitasking-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multitasking Operating System&lt;/a&gt; — multitasking aims for fairness; RTOS aims for deadline predictability&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../multiprogramming-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multiprogramming-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multiprogramming Operating System&lt;/a&gt; — focuses on utilization, not timing&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../microkernel&quot; class=&quot;internal alias&quot; data-slug=&quot;microkernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Microkernel&lt;/a&gt; — many RTOSes use microkernel design for reliability (e.g., QNX)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Priority inversion (a high-priority task blocked by a low-priority task holding a lock) can cause deadline misses — solved by priority inheritance&lt;/li&gt;
&lt;li&gt;Interrupt storms (too many interrupts in a short period) can cause all high-priority tasks to be I/O bound, starving computation&lt;/li&gt;
&lt;li&gt;An RTOS does NOT mean “very fast” — it means “predictably timed” — a general-purpose OS can have higher average throughput&lt;/li&gt;
&lt;li&gt;Hard real-time requires end-to-end analysis: sensor → processing → actuator, not just the scheduler&lt;/li&gt;
&lt;li&gt;Linux with PREEMPT_RT is a soft real-time variant — it is not a hard RTOS&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>security-and-protection</title>
    <link href="https://animishraa05.github.io/wiki/os/security-and-protection" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/security-and-protection.md" />
    <summary>Formal Definition “Security and Protection in an operating system refers to the mechanisms that control access to system resources, prevent unauthorized use, and protect processes from interfering with each other.” Explanation Security and protection are fundamental responsibilities of any OS.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“Security and Protection in an operating system refers to the mechanisms that control access to system resources, prevent unauthorized use, and protect processes from interfering with each other.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;Security and protection are fundamental responsibilities of any OS. Protection ensures that one process cannot accidentally or maliciously interfere with another process’s memory, files, or execution. Security extends this to defend against external threats (malware, unauthorized access). The OS enforces these through multiple layers: hardware (CPU privilege rings, MMU page protection), kernel-enforced checks (system call validation, file permissions), and authentication mechanisms (user accounts, passwords, access control lists). Without this, every program would have unrestricted access to all memory, files, and hardware — a recipe for chaos and catastrophic data loss.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Hardware-level protection: CPU privilege rings prevent user-mode programs from executing privileged instructions; the MMU prevents a process from accessing memory outside its allocated pages&lt;/li&gt;
&lt;li&gt;System call validation: the kernel checks every system call’s arguments — are the pointers valid? does the process have permission?&lt;/li&gt;
&lt;li&gt;File permissions: each file has an owner and permission bits (read/write/execute for user/group/others) checked on every open&lt;/li&gt;
&lt;li&gt;Memory protection: each process has an isolated virtual address space; page table entries include permission bits (read, write, execute)&lt;/li&gt;
&lt;li&gt;User authentication: login credentials (password, SSH key, biometric) establish user identity&lt;/li&gt;
&lt;li&gt;Access control: Discretionary Access Control (DAC) in Unix/Linux; Mandatory Access Control (MAC) in SELinux/AppArmor&lt;/li&gt;
&lt;li&gt;Audit logging: security-relevant events are recorded for later analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: security_protection Pages: 1 --&gt;
&lt;svg width=&quot;1156pt&quot; height=&quot;50pt&quot; viewBox=&quot;0.00 0.00 1156.00 50.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 45.6)&quot;&gt;
&lt;title&gt;security_protection&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-45.6 1152.07,-45.6 1152.07,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- USER --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;USER&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;107.8,-38.8 0,-38.8 0,-2.8 107.8,-2.8 107.8,-38.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;53.9&quot; y=&quot;-16.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;User / Process&lt;/text&gt;
&lt;/g&gt;
&lt;!-- AUTH --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;AUTH&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;336.4,-41.6 143.8,-41.6 143.8,0 336.4,0 336.4,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;240.1&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Authentication&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;240.1&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Password / Key / Biometric)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- USER&amp;#45;&amp;gt;AUTH --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;USER-&gt;AUTH&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M108.18,-20.8C115.85,-20.8 123.96,-20.8 132.23,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;132.07,-24.3 142.07,-20.8 132.07,-17.3 132.07,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- ACCESS --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;ACCESS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;546.32,-41.6 372.4,-41.6 372.4,0 546.32,0 546.32,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;459.36&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Access Control&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;459.36&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(File Permissions / ACLs)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- AUTH&amp;#45;&amp;gt;ACCESS --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;AUTH-&gt;ACCESS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M336.71,-20.8C344.59,-20.8 352.56,-20.8 360.45,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;360.43,-24.3 370.43,-20.8 360.43,-17.3 360.43,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;747.7,-41.6 582.32,-41.6 582.32,0 747.7,0 747.7,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;665.01&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kernel Checks&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;665.01&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(System Call Validation)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- ACCESS&amp;#45;&amp;gt;KERN --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;ACCESS-&gt;KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M546.72,-20.8C554.68,-20.8 562.77,-20.8 570.78,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;570.53,-24.3 580.53,-20.8 570.53,-17.3 570.53,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- HW --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HW&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;947.5,-41.6 783.7,-41.6 783.7,0 947.5,0 947.5,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;865.6&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Hardware Enforced&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;865.6&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Privilege Rings / MMU)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN&amp;#45;&amp;gt;HW --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KERN-&gt;HW&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M747.93,-20.8C755.92,-20.8 764.06,-20.8 772.15,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;772,-24.3 782,-20.8 772,-17.3 772,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- RES --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;RES&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;1148.07,-41.6 983.5,-41.6 983.5,0 1148.07,0 1148.07,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;1065.79&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Resource&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;1065.79&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Memory / File / Device)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HW&amp;#45;&amp;gt;RES --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;HW-&gt;RES&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M947.78,-20.8C955.7,-20.8 963.78,-20.8 971.8,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;971.58,-24.3 981.58,-20.8 971.58,-17.3 971.58,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_security_protection Pages: 1 --&gt;
&lt;svg width=&quot;299pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 299.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_security_protection&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 295.39,-205.07 295.39,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;147.87&quot; cy=&quot;-100.51&quot; rx=&quot;90.97&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.87&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Security &amp;#x26; Protection&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;219.26&quot; cy=&quot;-59.01&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;219.26&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M177.73,-83.15C184.46,-79.24 191.47,-75.17 197.77,-71.5&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;169.25&quot; y=&quot;-69.23&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UMODE --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;147.7&quot; cy=&quot;-18&quot; rx=&quot;43.18&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.7&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;User Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;UMODE --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--UMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M147.83,-82.2C147.8,-68.53 147.77,-49.92 147.74,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;166.29&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- CMODE --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;CMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;77.12&quot; cy=&quot;-142.96&quot; rx=&quot;48.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;77.12&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;CMODE --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--CMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M118.68,-118.02C113.51,-121.13 108.15,-124.35 103.07,-127.39&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;129.38&quot; y=&quot;-125.41&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PRIV --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PRIV&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;219.85&quot; cy=&quot;-141.05&quot; rx=&quot;71.54&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;219.85&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;CPU Privilege Rings&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PRIV --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PRIV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M178.39,-117.7C182.22,-119.86 186.14,-122.07 189.96,-124.22&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;163.91&quot; y=&quot;-112.86&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- FILE --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;FILE&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;149.31&quot; cy=&quot;-183.07&quot; rx=&quot;62.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;149.31&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;File Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;FILE --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--FILE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M148.19,-118.83C148.43,-132.52 148.75,-151.13 148.99,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;134.83&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MEM --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MEM&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;76.09&quot; cy=&quot;-59.9&quot; rx=&quot;76.09&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;76.09&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Memory Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MEM --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MEM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M117.43,-83.29C113.6,-81.13 109.7,-78.92 105.89,-76.76&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;125.42&quot; y=&quot;-82.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Multi-layered: hardware + kernel + OS policies working together&lt;/li&gt;
&lt;li&gt;Memory protection prevents process-to-process interference via page-level permissions&lt;/li&gt;
&lt;li&gt;File permissions (owner/group/other, read/write/execute) control data access&lt;/li&gt;
&lt;li&gt;System call validation ensures user programs cannot trick the kernel into unsafe operations&lt;/li&gt;
&lt;li&gt;User authentication establishes identity; access control lists (ACLs) provide fine-grained permissions&lt;/li&gt;
&lt;li&gt;Protection is mandatory — enforced by hardware/software; security is policy-driven and configurable&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel enforces all security checks and mediates access&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — user-mode restrictions are the foundation of protection&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../cpu-privilege-rings&quot; class=&quot;internal alias&quot; data-slug=&quot;cpu-privilege-rings&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;CPU Privilege Rings&lt;/a&gt; — ring-based protection is the lowest-level security mechanism&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../file-management&quot; class=&quot;internal alias&quot; data-slug=&quot;file-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;File Management&lt;/a&gt; — file permissions are a key security mechanism&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../memory-management&quot; class=&quot;internal alias&quot; data-slug=&quot;memory-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Memory Management&lt;/a&gt; — memory protection and address space isolation&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — only kernel-mode code can override security policies&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;A buffer overflow in a privileged process can bypass OS security — even if the kernel is secure, vulnerable user-space daemons (running as root) are weak points&lt;/li&gt;
&lt;li&gt;TOCTOU (Time of Check to Time of Use) races can subvert permission checks — a file permission is checked, then the file is replaced before use&lt;/li&gt;
&lt;li&gt;Side-channel attacks (Spectre, Meltdown) exploit CPU speculation to read protected kernel memory — hardware-level protection was insufficient against these&lt;/li&gt;
&lt;li&gt;Zero-day vulnerabilities in the kernel itself bypass all OS security layers — defense-in-depth (SELinux, sandboxing, containerization) mitigates the blast radius&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>system-calls</title>
    <link href="https://animishraa05.github.io/wiki/os/system-calls" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/system-calls.md" />
    <summary>Formal Definition “A system call is a mechanism through which a user program requests a service from the operating system kernel.” “System calls provide an interface between a process and the operating system.” Explanation System calls are the only legal way for user-space programs to get privileged...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“A system call is a mechanism through which a user program requests a service from the operating system kernel.”&lt;/p&gt;
&lt;p dir=&quot;auto&quot;&gt;“System calls provide an interface between a process and the operating system.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;System calls are the only legal way for user-space programs to get privileged work done. When a Python script calls &lt;code class=&quot;notranslate&quot;&gt;open(&quot;file.txt&quot;)&lt;/code&gt;, that innocent-looking line triggers a chain: the standard library invokes a system call, the CPU switches from user mode to kernel mode, and the kernel performs the actual file read. System calls exist because applications cannot be trusted with direct hardware access — a malicious or buggy program could corrupt memory, steal data, or crash the system. The syscall interface enforces a controlled gateway: the kernel validates every request before executing it.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;A user program calls a library function (e.g., &lt;code class=&quot;notranslate&quot;&gt;read()&lt;/code&gt; in C, &lt;code class=&quot;notranslate&quot;&gt;open()&lt;/code&gt; in Python)&lt;/li&gt;
&lt;li&gt;The library function places arguments in CPU registers and triggers a software interrupt or a special &lt;code class=&quot;notranslate&quot;&gt;syscall&lt;/code&gt; instruction&lt;/li&gt;
&lt;li&gt;The CPU switches from user mode to kernel mode (mode switch)&lt;/li&gt;
&lt;li&gt;The kernel’s system call handler looks up the requested operation in a syscall table&lt;/li&gt;
&lt;li&gt;The kernel validates arguments (checking pointers, permissions) and performs the operation&lt;/li&gt;
&lt;li&gt;Results are placed in registers, the CPU switches back to user mode, and control returns to the application&lt;/li&gt;
&lt;li&gt;Categories of system calls include: process control (&lt;code class=&quot;notranslate&quot;&gt;fork&lt;/code&gt;, &lt;code class=&quot;notranslate&quot;&gt;exec&lt;/code&gt;, &lt;code class=&quot;notranslate&quot;&gt;exit&lt;/code&gt;), file management (&lt;code class=&quot;notranslate&quot;&gt;open&lt;/code&gt;, &lt;code class=&quot;notranslate&quot;&gt;read&lt;/code&gt;, &lt;code class=&quot;notranslate&quot;&gt;write&lt;/code&gt;, &lt;code class=&quot;notranslate&quot;&gt;close&lt;/code&gt;), device management (&lt;code class=&quot;notranslate&quot;&gt;ioctl&lt;/code&gt;), information maintenance (&lt;code class=&quot;notranslate&quot;&gt;gettimeofday&lt;/code&gt;), and communication (&lt;code class=&quot;notranslate&quot;&gt;socket&lt;/code&gt;, &lt;code class=&quot;notranslate&quot;&gt;send&lt;/code&gt;, &lt;code class=&quot;notranslate&quot;&gt;recv&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: system_call Pages: 1 --&gt;
&lt;svg width=&quot;1043pt&quot; height=&quot;50pt&quot; viewBox=&quot;0.00 0.00 1043.00 50.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 45.6)&quot;&gt;
&lt;title&gt;system_call&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-45.6 1038.92,-45.6 1038.92,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- APP --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;APP&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;93.79,-41.6 0,-41.6 0,0 93.79,0 93.79,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;46.9&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Application&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;46.9&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(User Mode)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- LIBC --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;LIBC&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;295.28,-38.8 200.7,-38.8 200.7,-2.8 295.28,-2.8 295.28,-38.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;247.99&quot; y=&quot;-16.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;libc Wrapper&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APP&amp;#45;&amp;gt;LIBC --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;APP-&gt;LIBC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M94.07,-20.8C122.39,-20.8 158.89,-20.8 189.12,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;188.86,-24.3 198.86,-20.8 188.86,-17.3 188.86,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.25&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;open(&quot;f.txt&quot;)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYS&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;536.8,-38.8 410.32,-38.8 410.32,-2.8 536.8,-2.8 536.8,-38.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;473.56&quot; y=&quot;-16.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;syscall Instruction&lt;/text&gt;
&lt;/g&gt;
&lt;!-- LIBC&amp;#45;&amp;gt;SYS --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;LIBC-&gt;SYS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M295.59,-20.8C325.37,-20.8 364.63,-20.8 398.61,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;398.39,-24.3 408.39,-20.8 398.39,-17.3 398.39,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;352.8&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;set args + trap&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;753.34,-41.6 643.96,-41.6 643.96,0 753.34,0 753.34,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;698.65&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kernel Handler&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;698.65&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Kernel Mode)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS&amp;#45;&amp;gt;KERN --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;SYS-&gt;KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M537.3,-20.8C567.01,-20.8 602.47,-20.8 632.49,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;632.19,-24.3 642.19,-20.8 632.19,-17.3 632.19,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;590.38&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;mode switch&lt;/text&gt;
&lt;/g&gt;
&lt;!-- RESULT --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;RESULT&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;1034.92,-38.8 888.98,-38.8 888.98,-2.8 1034.92,-2.8 1034.92,-38.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;961.95&quot; y=&quot;-16.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Return to User Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN&amp;#45;&amp;gt;RESULT --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;KERN-&gt;RESULT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M753.79,-20.8C789.38,-20.8 836.66,-20.8 877.06,-20.8&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;877.02,-24.3 887.02,-20.8 877.02,-17.3 877.02,-24.3&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;821.16&quot; y=&quot;-25&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;complete + return&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_system_calls Pages: 1 --&gt;
&lt;svg width=&quot;269pt&quot; height=&quot;207pt&quot; viewBox=&quot;0.00 0.00 269.00 207.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 203.13)&quot;&gt;
&lt;title&gt;semantic_system_calls&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-203.13 264.91,-203.13 264.91,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;137.69&quot; cy=&quot;-99.52&quot; rx=&quot;60.81&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;137.69&quot; y=&quot;-95.62&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;221.3&quot; cy=&quot;-100.14&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;221.3&quot; y=&quot;-96.84&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M198.89,-99.98C198.99,-99.98 199.09,-99.98 199.19,-99.98&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;217.55&quot; y=&quot;-102.68&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UMODE --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;119.77&quot; cy=&quot;-18&quot; rx=&quot;43.18&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;119.77&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;User Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;UMODE --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--UMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M133.71,-81.43C130.76,-68.01 126.76,-49.79 123.8,-36.32&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.26&quot; y=&quot;-61.58&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KMODE --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;62.76&quot; cy=&quot;-136.37&quot; rx=&quot;48.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;62.76&quot; y=&quot;-133.07&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KMODE --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M105.91,-115.15C101.44,-117.35 96.87,-119.6 92.44,-121.78&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;117.68&quot; y=&quot;-121.16&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MODE --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MODE&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;189.89&quot; cy=&quot;-164.83&quot; rx=&quot;57.94&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;189.89&quot; y=&quot;-161.53&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Mode Switching&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MODE --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M151.95,-117.37C159.32,-126.58 168.28,-137.8 175.64,-147.01&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;184.06&quot; y=&quot;-134.89&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PROC --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PROC&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;119.73&quot; cy=&quot;-181.13&quot; rx=&quot;58.31&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;119.73&quot; y=&quot;-177.83&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Process Control&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PROC --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PROC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M133.7,-117.63C130.75,-131.06 126.73,-149.3 123.77,-162.79&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;142.49&quot; y=&quot;-132.11&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- FILE --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;FILE&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;62.48&quot; cy=&quot;-63.33&quot; rx=&quot;62.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;62.48&quot; y=&quot;-60.03&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;File Management&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;FILE --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--FILE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M105.36,-83.96C102.01,-82.35 98.61,-80.72 95.26,-79.11&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;86.55&quot; y=&quot;-84.24&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- COMM --&gt;
&lt;g id=&quot;node8&quot; class=&quot;node&quot;&gt;
&lt;title&gt;COMM&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;190.5&quot; cy=&quot;-34.8&quot; rx=&quot;70.41&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;190.5&quot; y=&quot;-31.5&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Communication IPC&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;COMM --&gt;
&lt;g id=&quot;edge7&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--COMM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M152.12,-81.83C159.57,-72.7 168.64,-61.59 176.09,-52.46&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;184.37&quot; y=&quot;-69.85&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Enables user-space programs to request kernel services&lt;/li&gt;
&lt;li&gt;Triggers a mode switch from user mode to kernel mode&lt;/li&gt;
&lt;li&gt;Categorized into process control, file management, device management, information maintenance, and communication&lt;/li&gt;
&lt;li&gt;System calls are more expensive than normal function calls due to mode switching overhead&lt;/li&gt;
&lt;li&gt;Experienced programmers batch operations (read large chunks) rather than making many small syscalls&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel implements and handles system calls&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — programs must exit user mode via syscalls to perform privileged work&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — the syscall handler executes in kernel mode&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — each system call causes a user-to-kernel mode switch&lt;/li&gt;
&lt;li&gt;Contrasts with: function calls — function calls stay in user mode and have no hardware access; system calls switch to kernel mode&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../inter-process-communication&quot; class=&quot;internal alias&quot; data-slug=&quot;inter-process-communication&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Inter-Process Communication&lt;/a&gt; — IPC often relies on communication-related system calls&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;System calls are NOT the same as library functions — &lt;code class=&quot;notranslate&quot;&gt;printf()&lt;/code&gt; is a library function that internally calls &lt;code class=&quot;notranslate&quot;&gt;write()&lt;/code&gt; syscall&lt;/li&gt;
&lt;li&gt;Too many small system calls kills performance: reading a file one byte at a time causes a syscall per byte, while buffered reading uses one syscall per buffer&lt;/li&gt;
&lt;li&gt;Some system calls block (e.g., &lt;code class=&quot;notranslate&quot;&gt;read&lt;/code&gt; from a socket with no data) — the process is suspended until data arrives&lt;/li&gt;
&lt;li&gt;Students often confuse function call (user mode only) with system call (requires kernel mode switch) — the key distinction is privilege escalation&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>Types of Operating Systems — Batch vs Multiprogramming vs Multitasking vs RTOS vs Distributed</title>
    <link href="https://animishraa05.github.io/wiki/os/types-of-os-comparison" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/types-of-os-comparison.md" />
    <summary>Framing This synthesis compares the five major types of operating systems discussed in the source: Batch OS, Multiprogramming OS, Multitasking OS, Real-Time OS (RTOS), and Distributed OS.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;framing&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Framing&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#framing&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;This synthesis compares the five major types of operating systems discussed in the source: Batch OS, Multiprogramming OS, Multitasking OS, Real-Time OS (RTOS), and Distributed OS. Each type emerged from a specific problem: batch processing addressed expensive hardware underutilization; multiprogramming solved CPU idle time during I/O; multitasking made computers responsive for interactive users; RTOS added timing guarantees for safety-critical systems; and distributed OS scaled computation across multiple machines.&lt;/p&gt;
&lt;h2 id=&quot;structured-comparison&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Structured Comparison&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#structured-comparison&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Batch OS&lt;/th&gt;
&lt;th&gt;Multiprogramming&lt;/th&gt;
&lt;th&gt;Multitasking&lt;/th&gt;
&lt;th&gt;RTOS&lt;/th&gt;
&lt;th&gt;Distributed OS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Throughput&lt;/td&gt;
&lt;td&gt;CPU utilization&lt;/td&gt;
&lt;td&gt;User responsiveness&lt;/td&gt;
&lt;td&gt;Deadline predictability&lt;/td&gt;
&lt;td&gt;Resource aggregation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Interactivity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Depends on task&lt;/td&gt;
&lt;td&gt;Transparent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CPU sharing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sequential&lt;/td&gt;
&lt;td&gt;Overlap I/O wait&lt;/td&gt;
&lt;td&gt;Time slicing&lt;/td&gt;
&lt;td&gt;Priority-based&lt;/td&gt;
&lt;td&gt;Across nodes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Timing guarantee&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Hard/Soft&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Number of machines&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Many&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Early punch-card systems&lt;/td&gt;
&lt;td&gt;IBM OS/360&lt;/td&gt;
&lt;td&gt;Windows, Linux, macOS&lt;/td&gt;
&lt;td&gt;QNX, VxWorks&lt;/td&gt;
&lt;td&gt;Plan 9, Amoeba&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Key challenge&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Job scheduling&lt;/td&gt;
&lt;td&gt;Memory protection&lt;/td&gt;
&lt;td&gt;Fair scheduling&lt;/td&gt;
&lt;td&gt;Determinism&lt;/td&gt;
&lt;td&gt;Consistency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Era introduced&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1950s&lt;/td&gt;
&lt;td&gt;1960s&lt;/td&gt;
&lt;td&gt;1970s&lt;/td&gt;
&lt;td&gt;1970s&lt;/td&gt;
&lt;td&gt;1980s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;insights-beyond-individual-concepts&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Insights Beyond Individual Concepts&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#insights-beyond-individual-concepts&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;evolution-not-replacement&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Evolution, Not Replacement&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#evolution-not-replacement&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;These OS types did not replace each other — they layered on top. Modern Linux combines multiprogramming (keeping many processes in memory), multitasking (time-sharing the CPU), and soft real-time capabilities (via PREEMPT_RT). Batch processing survives in HPC schedulers (SLURM, PBS). Distributed OS concepts live on in cluster orchestration (Kubernetes, Mesos). Each type specialized in a problem that prior types did not solve well.&lt;/p&gt;
&lt;h3 id=&quot;the-tradeoff-triangle&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;The Tradeoff Triangle&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#the-tradeoff-triangle&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;OS types represent different points on a triangle of competing goals: &lt;strong&gt;Throughput&lt;/strong&gt; (batch), &lt;strong&gt;Responsiveness&lt;/strong&gt; (multitasking), and &lt;strong&gt;Predictability&lt;/strong&gt; (RTOS). No single OS type maximizes all three. Multiprogramming sits between batch and multitasking — improving utilization over batch but not as responsive as true multitasking.&lt;/p&gt;
&lt;h3 id=&quot;distributed-as-a-meta-type&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Distributed as a Meta-Type&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#distributed-as-a-meta-type&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;Distributed OS is orthogonal to the other types in a sense — you could have a distributed batch system, a distributed multitasking system, etc. The distribution dimension adds complexity (network coordination, partial failure, consistency) on top of the chosen OS type’s challenges.&lt;/p&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../batch-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;batch-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Batch Operating System&lt;/a&gt; — processes jobs in groups, no interactivity&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../multiprogramming-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multiprogramming-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multiprogramming Operating System&lt;/a&gt; — keeps multiple programs in memory to keep CPU busy&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../multitasking-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;multitasking-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Multitasking Operating System&lt;/a&gt; — time-sharing CPU for responsive user experience&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../real-time-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;real-time-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Real-Time Operating System&lt;/a&gt; — guarantees timing constraints&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../distributed-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;distributed-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Distributed Operating System&lt;/a&gt; — multiple computers as one system&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — all types are variants of an OS&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../process-management&quot; class=&quot;internal alias&quot; data-slug=&quot;process-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Process Management&lt;/a&gt; — scheduling varies significantly across OS types&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../memory-management&quot; class=&quot;internal alias&quot; data-slug=&quot;memory-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Memory Management&lt;/a&gt; — multiprogramming requires memory protection between in-memory programs&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>User Mode vs Kernel Mode — Privilege Separation</title>
    <link href="https://animishraa05.github.io/wiki/os/user-mode-vs-kernel-mode" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/user-mode-vs-kernel-mode.md" />
    <summary>Framing This synthesis compares user mode and kernel mode — the two privilege levels at which code executes in a modern operating system.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;framing&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Framing&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#framing&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;This synthesis compares user mode and kernel mode — the two privilege levels at which code executes in a modern operating system. This separation is the foundation of OS security, stability, and resource management. Without it, every program would have unrestricted access to hardware, memory, and system data, making computer systems catastrophically unsafe.&lt;/p&gt;
&lt;h2 id=&quot;structured-comparison&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Structured Comparison&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#structured-comparison&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;User Mode&lt;/th&gt;
&lt;th&gt;Kernel Mode&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Privilege level&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Restricted (Ring 3)&lt;/td&gt;
&lt;td&gt;Full (Ring 0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hardware access&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None — must use system calls&lt;/td&gt;
&lt;td&gt;Full — direct access to CPU, memory, devices&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Memory access&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Process’s own address space only&lt;/td&gt;
&lt;td&gt;Entire physical memory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Privileged instructions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cannot execute&lt;/td&gt;
&lt;td&gt;Can execute (HLT, IN/OUT, LGDT, etc.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Who runs here&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Applications (Chrome, VS Code, Spotify)&lt;/td&gt;
&lt;td&gt;Kernel, device drivers, interrupt handlers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Crash impact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Affects only the process&lt;/td&gt;
&lt;td&gt;Can crash the entire OS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CPU mode bit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1 (user)&lt;/td&gt;
&lt;td&gt;0 (kernel)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Transition mechanism&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;System calls / interrupts&lt;/td&gt;
&lt;td&gt;Automatic from user mode via traps&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;insights-beyond-individual-concepts&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Insights Beyond Individual Concepts&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#insights-beyond-individual-concepts&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;the-mode-switch-tax&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;The Mode Switch Tax&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#the-mode-switch-tax&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;Every transition between user mode and kernel mode (mode switch) costs 50-200 CPU cycles — roughly 10-40x more than a regular function call. This cost comes from saving/restoring registers, swapping stacks, and validating the transition. This is why performance-sensitive applications batch system calls rather than making them one at a time, and why kernel-bypass technologies (DPDK, SPDK, io_uring) seek to minimize mode switches.&lt;/p&gt;
&lt;h3 id=&quot;not-all-os-code-runs-in-kernel-mode&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Not All OS Code Runs in Kernel Mode&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#not-all-os-code-runs-in-kernel-mode&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;A common misconception is that “the operating system” runs entirely in kernel mode. In reality, most of what users think of as the OS — the GUI, the terminal, system utilities (ls, ps, grep), the shell, the compiler — runs in user mode. Only the core kernel (scheduler, memory manager, interrupt handlers, device driver core) runs in kernel mode. This means even “OS components” benefit from the safety of user-mode isolation.&lt;/p&gt;
&lt;h3 id=&quot;the-principle-of-least-privilege&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;The Principle of Least Privilege&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#the-principle-of-least-privilege&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p dir=&quot;auto&quot;&gt;The user/kernel mode split is a textbook application of the Principle of Least Privilege: every component gets only the permissions it needs to function. Applications need to compute but not access hardware directly — so they get user mode. The kernel needs full control — so it gets kernel mode. This principle, implemented in hardware, is why your browser can crash without taking down the entire computer.&lt;/p&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;&lt;a href=&quot;../../user-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;user-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;User Mode&lt;/a&gt; — one of the two modes compared&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — the other mode compared&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../cpu-privilege-rings&quot; class=&quot;internal alias&quot; data-slug=&quot;cpu-privilege-rings&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;CPU Privilege Rings&lt;/a&gt; — the hardware mechanism that enforces mode separation (Ring 0 and Ring 3)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — the process of transitioning between user and kernel mode&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — the only way for user mode to request kernel-mode services&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the component that runs in kernel mode&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — the OS design is fundamentally shaped by this mode separation&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../security-and-protection&quot; class=&quot;internal alias&quot; data-slug=&quot;security-and-protection&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Security and Protection&lt;/a&gt; — mode separation is the foundation of OS security&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — in monolithic kernels, more code runs in kernel mode, expanding the trusted computing base&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>user-mode</title>
    <link href="https://animishraa05.github.io/wiki/os/user-mode" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/user-mode.md" />
    <summary>Formal Definition “User mode is the execution mode in which user applications run with limited privileges and cannot directly access hardware or critical system resources.” Explanation User mode is the restricted operating mode where all normal applications execute.</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“User mode is the execution mode in which user applications run with limited privileges and cannot directly access hardware or critical system resources.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;User mode is the restricted operating mode where all normal applications execute. Think of it as the “citizen” level of privilege: applications in user mode cannot execute privileged CPU instructions, cannot directly access hardware, cannot read or write kernel memory, and cannot access another process’s memory space. This is a deliberate design — it prevents a buggy calculator app from crashing the OS or a malicious program from stealing passwords. When an application needs something it cannot do in user mode, it must request the kernel via a system call, which triggers a mode switch.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The CPU maintains a mode bit (0 for kernel mode, 1 for user mode) in a control register&lt;/li&gt;
&lt;li&gt;When the OS creates a process, it sets the mode bit to user mode before transferring control to the application&lt;/li&gt;
&lt;li&gt;The application runs normally until it attempts a privileged operation (e.g., accessing hardware, executing a privileged instruction like HLT or setting interrupt vectors)&lt;/li&gt;
&lt;li&gt;If a user-mode program attempts a privileged instruction, the CPU raises a trap/general protection fault, and the kernel takes over&lt;/li&gt;
&lt;li&gt;The only way to escape user mode is through a system call — a deliberate, controlled entry point&lt;/li&gt;
&lt;li&gt;Most of the operating system’s code (shell, compiler, GUI, system utilities) actually runs in user mode, not kernel mode&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: user_mode Pages: 1 --&gt;
&lt;svg width=&quot;274pt&quot; height=&quot;306pt&quot; viewBox=&quot;0.00 0.00 274.00 306.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 301.8)&quot;&gt;
&lt;title&gt;user_mode&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-301.8 269.88,-301.8 269.88,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- UM --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;UM&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;162.13,-297.8 77.66,-297.8 77.66,-256.2 162.13,-256.2 162.13,-297.8&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;119.9&quot; y=&quot;-281.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;User Mode&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;119.9&quot; y=&quot;-264.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Ring 3)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APP1 --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;APP1&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;65.79,-219.2 0,-219.2 0,-183.2 65.79,-183.2 65.79,-219.2&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;32.9&quot; y=&quot;-197&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Chrome&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UM&amp;#45;&amp;gt;APP1 --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;UM-&gt;APP1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M96.12,-255.83C85.56,-246.88 73.04,-236.25 61.93,-226.83&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;64.43,-224.36 54.54,-220.56 59.91,-229.7 64.43,-224.36&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- APP2 --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;APP2&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;155.91,-219.2 83.88,-219.2 83.88,-183.2 155.91,-183.2 155.91,-219.2&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;119.9&quot; y=&quot;-197&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;VS Code&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UM&amp;#45;&amp;gt;APP2 --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;UM-&gt;APP2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M119.9,-255.83C119.9,-248.06 119.9,-239.03 119.9,-230.62&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;123.4,-230.85 119.9,-220.85 116.4,-230.85 123.4,-230.85&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- APP3 --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;APP3&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;234.3,-219.2 175.5,-219.2 175.5,-183.2 234.3,-183.2 234.3,-219.2&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;204.9&quot; y=&quot;-197&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Spotify&lt;/text&gt;
&lt;/g&gt;
&lt;!-- UM&amp;#45;&amp;gt;APP3 --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;UM-&gt;APP3&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M143.12,-255.83C153.34,-246.96 165.44,-236.46 176.21,-227.11&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;178.47,-229.78 183.73,-220.58 173.89,-224.49 178.47,-229.78&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- GATE --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;GATE&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;169.36,-130.4 44.43,-130.4 44.43,-94.4 169.36,-94.4 169.36,-130.4&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.9&quot; y=&quot;-108.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;System Call Gate&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APP1&amp;#45;&amp;gt;GATE --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;APP1-&gt;GATE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M35.88,-182.92C38.43,-172.1 43.01,-158.38 50.98,-148.4 54.12,-144.47 57.82,-140.85 61.81,-137.56&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;63.69,-140.53 69.67,-131.78 59.54,-134.89 63.69,-140.53&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;76.44&quot; y=&quot;-152.6&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;file write&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APP2&amp;#45;&amp;gt;GATE --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;APP2-&gt;GATE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M112.58,-183.06C110.54,-177.47 108.59,-171.16 107.53,-165.2 106.21,-157.76 105.69,-149.63 105.58,-142.06&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;109.08,-142.35 105.69,-132.31 102.08,-142.27 109.08,-142.35&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;146.22&quot; y=&quot;-152.6&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;memory alloc&lt;/text&gt;
&lt;/g&gt;
&lt;!-- APP3&amp;#45;&amp;gt;GATE --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;APP3-&gt;GATE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M201.78,-183C199,-171.94 193.92,-157.91 184.9,-148.4 180.68,-143.96 175.8,-140.04 170.58,-136.59&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;172.58,-133.7 162.18,-131.64 169.02,-139.73 172.58,-133.7&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;230.69&quot; y=&quot;-152.6&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;audio output&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KM --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KM&lt;/title&gt;
&lt;polygon fill=&quot;#ffd700&quot; stroke=&quot;black&quot; points=&quot;154.59,-41.6 59.21,-41.6 59.21,0 154.59,0 154.59,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.9&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;106.9&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Ring 0)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- GATE&amp;#45;&amp;gt;KM --&gt;
&lt;g id=&quot;edge7&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;GATE-&gt;KM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M106.9,-94.12C106.9,-82.56 106.9,-67 106.9,-53.28&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;110.4,-53.35 106.9,-43.35 103.4,-53.35 110.4,-53.35&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;142.47&quot; y=&quot;-63.8&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;mode switch&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_user_mode Pages: 1 --&gt;
&lt;svg width=&quot;280pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 280.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_user_mode&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 276.2,-205.07 276.2,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;142.29&quot; cy=&quot;-100.51&quot; rx=&quot;52.69&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;142.29&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;User Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KMODE --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KMODE&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;213.68&quot; cy=&quot;-59.01&quot; rx=&quot;48.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;213.68&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel Mode&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KMODE --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KMODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M169.28,-84.82C175.12,-81.42 181.3,-77.83 187.13,-74.45&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;150.69&quot; y=&quot;-71.53&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SYS --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SYS&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;142.12&quot; cy=&quot;-18&quot; rx=&quot;49.6&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;142.12&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;System Calls&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SYS --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SYS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M142.25,-82.2C142.23,-68.53 142.19,-49.92 142.16,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;121.94&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PRIV --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PRIV&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;71.54&quot; cy=&quot;-142.96&quot; rx=&quot;71.54&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;71.54&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;CPU Privilege Rings&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PRIV --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PRIV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M115.95,-116.32C110.6,-119.53 104.97,-122.91 99.57,-126.15&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;89.25&quot; y=&quot;-113.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- MODE --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;MODE&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;214.27&quot; cy=&quot;-141.05&quot; rx=&quot;57.94&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;214.27&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Mode Switching&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;MODE --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--MODE&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M169.91,-116.07C175.15,-119.02 180.63,-122.11 185.88,-125.07&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;198.16&quot; y=&quot;-112.47&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PROC --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PROC&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;143.73&quot; cy=&quot;-183.07&quot; rx=&quot;34.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;143.73&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Process&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;PROC --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--PROC&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M142.61,-118.83C142.85,-132.52 143.17,-151.13 143.41,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;156.77&quot; y=&quot;-144.52&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;!-- KERN --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;KERN&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;70.51&quot; cy=&quot;-59.9&quot; rx=&quot;29.57&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;70.51&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Kernel&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;KERN --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--KERN&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M114.74,-84.93C107.31,-80.72 99.37,-76.23 92.3,-72.23&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;85.02&quot; y=&quot;-81.28&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Applications run with restricted privileges — no direct hardware access, no privileged CPU instructions&lt;/li&gt;
&lt;li&gt;Memory access is limited to the process’s own virtual address space&lt;/li&gt;
&lt;li&gt;A trap occurs if any privileged instruction is attempted from user mode&lt;/li&gt;
&lt;li&gt;The only escape to kernel mode is through well-defined system call entry points&lt;/li&gt;
&lt;li&gt;Most OS components (shell, compiler, GUI) run in user mode—only the kernel runs in kernel mode&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel&lt;/a&gt; — the kernel enforces user-mode restrictions via the CPU privilege level&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../cpu-privilege-rings&quot; class=&quot;internal alias&quot; data-slug=&quot;cpu-privilege-rings&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;CPU Privilege Rings&lt;/a&gt; — user mode corresponds to Ring 3 in the x86 protection ring model&lt;/li&gt;
&lt;li&gt;Contrasts with: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — kernel mode has full privileges, user mode has restricted privileges&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../mode-switching&quot; class=&quot;internal alias&quot; data-slug=&quot;mode-switching&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Mode Switching&lt;/a&gt; — transitioning from user mode to kernel mode is fundamental mode switching&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../system-calls&quot; class=&quot;internal alias&quot; data-slug=&quot;system-calls&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;System Calls&lt;/a&gt; — system calls are the mechanism to escape user mode&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../process-management&quot; class=&quot;internal alias&quot; data-slug=&quot;process-management&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Process Management&lt;/a&gt; — each process executes in user mode except during syscalls&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The GUI and terminal run in user mode, not kernel mode — a common misconception&lt;/li&gt;
&lt;li&gt;User mode programs CAN crash without taking down the OS — this is the whole point of the separation&lt;/li&gt;
&lt;li&gt;Some CPU architectures have more than two privilege levels (e.g., x86 has 4 rings) but most OSes use only Ring 0 and Ring 3&lt;/li&gt;
&lt;li&gt;Modern browsers use sandboxing to further restrict user-mode processes, creating additional security layers&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry><entry>
    <title>virtual-machine</title>
    <link href="https://animishraa05.github.io/wiki/os/virtual-machine" />
    <link rel="alternate" type="text/markdown" href="https://animishraa05.github.io/wiki/os/virtual-machine.md" />
    <summary>Formal Definition “A Virtual Machine (VM) is a software emulation of a physical computer system that provides the functionality of a real computer.” “A virtual machine is an isolated execution environment created by virtualization software, allowing multiple operating systems to run on the same phys...</summary>
    <published>2026-06-11T00:00:00.000Z</published>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <publishedTime>Jun 11, 2026</publishedTime>
    <updatedTime>Jun 11, 2026</updatedTime>
    <category term="systems" label="systems" />
<category term="os" label="os" />
    <author>
      <name>Animesh Mishra</name>
      <email>animesh.mishra818@gmail.com</email>
    </author>
    <content type="html">&lt;h2 id=&quot;formal-definition&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Formal Definition&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#formal-definition&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;“A Virtual Machine (VM) is a software emulation of a physical computer system that provides the functionality of a real computer.”&lt;/p&gt;
&lt;p dir=&quot;auto&quot;&gt;“A virtual machine is an isolated execution environment created by virtualization software, allowing multiple operating systems to run on the same physical hardware.”&lt;/p&gt;
&lt;h2 id=&quot;explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p dir=&quot;auto&quot;&gt;A virtual machine is a “computer inside a computer.” It is a software-based simulation of a complete computer system — with virtual CPU, virtual RAM, virtual disk, and virtual network interfaces — that runs as an isolated environment on a physical host. Each VM runs its own operating system (guest OS) that believes it is running on real hardware. This allows one physical machine to host multiple OS environments simultaneously, for purposes like testing, server consolidation, security isolation, and running software that requires a different OS. The key enabler is the hypervisor, which creates, manages, and isolates VMs.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;How It Works&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#how-it-works&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;The hypervisor creates virtual hardware for each VM: virtual CPU cores, virtual RAM, virtual disk (stored as a file), virtual network card, and virtual BIOS&lt;/li&gt;
&lt;li&gt;The guest OS is installed into this virtual hardware — it boots normally, unaware of the virtualization layer&lt;/li&gt;
&lt;li&gt;When the guest OS executes a privileged instruction (e.g., halt CPU, set page tables), the CPU hardware traps the instruction and the hypervisor emulates it&lt;/li&gt;
&lt;li&gt;Hardware-assisted virtualization (Intel VT-x / AMD-V) allows most guest instructions to run directly on the CPU, only trapping privileged ones&lt;/li&gt;
&lt;li&gt;Each VM is isolated: its memory is mapped to separate physical pages; its disk writes go to a separate virtual disk file&lt;/li&gt;
&lt;li&gt;Snapshots capture the entire VM state (memory + disk), allowing rollback to a previous state&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;visual-explanation&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Visual Explanation&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#visual-explanation&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: virtual_machine Pages: 1 --&gt;
&lt;svg width=&quot;371pt&quot; height=&quot;217pt&quot; viewBox=&quot;0.00 0.00 371.00 217.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 213)&quot;&gt;
&lt;title&gt;virtual_machine&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-213 367.19,-213 367.19,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- PHY --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;PHY&lt;/title&gt;
&lt;polygon fill=&quot;#e0e0e0&quot; stroke=&quot;black&quot; points=&quot;257.81,-209 132.88,-209 132.88,-167.4 257.81,-167.4 257.81,-209&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;195.34&quot; y=&quot;-192.4&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Physical Machine&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;195.34&quot; y=&quot;-175.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(1 Server)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HV --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HV&lt;/title&gt;
&lt;polygon fill=&quot;#f0f4ff&quot; stroke=&quot;black&quot; points=&quot;236.8,-130.4 153.89,-130.4 153.89,-94.4 236.8,-94.4 236.8,-130.4&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;195.34&quot; y=&quot;-108.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;Hypervisor&lt;/text&gt;
&lt;/g&gt;
&lt;!-- PHY&amp;#45;&amp;gt;HV --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;PHY-&gt;HV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M195.34,-167.03C195.34,-159.26 195.34,-150.23 195.34,-141.82&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;198.84,-142.05 195.34,-132.05 191.84,-142.05 198.84,-142.05&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- VM1 --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM1&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;118.69,-41.6 0,-41.6 0,0 118.69,0 118.69,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;59.34&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;VM: Web Server&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;59.34&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Ubuntu)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HV&amp;#45;&amp;gt;VM1 --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;HV-&gt;VM1&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M153.53,-110.35C126.23,-107.39 91.86,-98.97 70.77,-76.4 64.9,-70.12 61.73,-61.64 60.09,-53.24&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;63.59,-53.03 58.88,-43.54 56.64,-53.9 63.59,-53.03&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;131.06&quot; y=&quot;-63.8&quot; font-family=&quot;Times,serif&quot; font-size=&quot;14.00&quot;&gt;vCPU, vRAM, vDisk&lt;/text&gt;
&lt;/g&gt;
&lt;!-- VM2 --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM2&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;247.7,-41.6 142.99,-41.6 142.99,0 247.7,0 247.7,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;195.34&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;VM: Database&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;195.34&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Windows)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HV&amp;#45;&amp;gt;VM2 --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;HV-&gt;VM2&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M195.34,-94.12C195.34,-82.56 195.34,-67 195.34,-53.28&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;198.84,-53.35 195.34,-43.35 191.84,-53.35 198.84,-53.35&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;!-- VM3 --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;VM3&lt;/title&gt;
&lt;polygon fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; points=&quot;363.19,-41.6 265.5,-41.6 265.5,0 363.19,0 363.19,-41.6&quot;&gt;&lt;/polygon&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;314.34&quot; y=&quot;-25&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;VM: Dev Env&lt;/text&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;314.34&quot; y=&quot;-8.2&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;14.00&quot;&gt;(Kali)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HV&amp;#45;&amp;gt;VM3 --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;HV-&gt;VM3&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M218.57,-93.91C235.54,-81.13 258.89,-63.56 278.28,-48.96&quot;&gt;&lt;/path&gt;
&lt;polygon fill=&quot;black&quot; stroke=&quot;black&quot; points=&quot;280.34,-51.78 286.22,-42.97 276.13,-46.19 280.34,-51.78&quot;&gt;&lt;/polygon&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;semantic-network&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Semantic Network&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#semantic-network&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;graphviz-container&quot; style=&quot;display: flex; justify-content: center; margin: 1.5rem 0; overflow-x: auto;&quot; dir=&quot;auto&quot;&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?--&gt;

&lt;!-- Generated by graphviz version 15.1.0 (0)
 --&gt;
&lt;!-- Title: semantic_virtual_machine Pages: 1 --&gt;
&lt;svg width=&quot;285pt&quot; height=&quot;209pt&quot; viewBox=&quot;0.00 0.00 285.00 209.00&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g id=&quot;graph0&quot; class=&quot;graph&quot; transform=&quot;scale(1 1) rotate(0) translate(4 205.07)&quot;&gt;
&lt;title&gt;semantic_virtual_machine&lt;/title&gt;
&lt;polygon fill=&quot;white&quot; stroke=&quot;none&quot; points=&quot;-4,4 -4,-205.07 280.72,-205.07 280.72,4 -4,4&quot;&gt;&lt;/polygon&gt;
&lt;!-- THIS --&gt;
&lt;g id=&quot;node1&quot; class=&quot;node&quot;&gt;
&lt;title&gt;THIS&lt;/title&gt;
&lt;ellipse fill=&quot;#ffd700&quot; stroke=&quot;black&quot; stroke-width=&quot;2&quot; cx=&quot;138.13&quot; cy=&quot;-100.51&quot; rx=&quot;69.92&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;138.13&quot; y=&quot;-96.61&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;13.00&quot;&gt;Virtual Machine&lt;/text&gt;
&lt;/g&gt;
&lt;!-- HV --&gt;
&lt;g id=&quot;node2&quot; class=&quot;node&quot;&gt;
&lt;title&gt;HV&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;209.52&quot; cy=&quot;-59.01&quot; rx=&quot;42.42&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;209.52&quot; y=&quot;-55.71&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Hypervisor&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;HV --&gt;
&lt;g id=&quot;edge1&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--HV&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M166.76,-83.87C172.5,-80.53 178.49,-77.05 184.12,-73.78&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;156.93&quot; y=&quot;-70.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- OS --&gt;
&lt;g id=&quot;node3&quot; class=&quot;node&quot;&gt;
&lt;title&gt;OS&lt;/title&gt;
&lt;ellipse fill=&quot;#cce5ff&quot; stroke=&quot;black&quot; cx=&quot;137.96&quot; cy=&quot;-18&quot; rx=&quot;64.36&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;137.96&quot; y=&quot;-14.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Operating System&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;OS --&gt;
&lt;g id=&quot;edge2&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--OS&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;5 2&quot; d=&quot;M138.09,-82.2C138.07,-68.53 138.03,-49.92 138,-36.26&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;147.3&quot; y=&quot;-51.13&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;built from&lt;/text&gt;
&lt;/g&gt;
&lt;!-- CONT --&gt;
&lt;g id=&quot;node4&quot; class=&quot;node&quot;&gt;
&lt;title&gt;CONT&lt;/title&gt;
&lt;ellipse fill=&quot;#ffe5cc&quot; stroke=&quot;black&quot; cx=&quot;67.38&quot; cy=&quot;-142.96&quot; rx=&quot;67.38&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;67.38&quot; y=&quot;-139.66&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Container (Docker)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;CONT --&gt;
&lt;g id=&quot;edge3&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--CONT&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M110.17,-117.29C105.22,-120.26 100.08,-123.34 95.14,-126.31&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;75.14&quot; y=&quot;-113.7&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- JVM --&gt;
&lt;g id=&quot;node5&quot; class=&quot;node&quot;&gt;
&lt;title&gt;JVM&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;210.11&quot; cy=&quot;-141.05&quot; rx=&quot;66.61&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;210.11&quot; y=&quot;-137.75&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;JVM (Process VM)&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;JVM --&gt;
&lt;g id=&quot;edge4&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--JVM&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; stroke-dasharray=&quot;1 5&quot; d=&quot;M167.82,-117.24C172.16,-119.68 176.62,-122.19 180.95,-124.63&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;201.89&quot; y=&quot;-112.83&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;contrasts with&lt;/text&gt;
&lt;/g&gt;
&lt;!-- CLOUD --&gt;
&lt;g id=&quot;node6&quot; class=&quot;node&quot;&gt;
&lt;title&gt;CLOUD&lt;/title&gt;
&lt;ellipse fill=&quot;#d4edda&quot; stroke=&quot;black&quot; cx=&quot;139.57&quot; cy=&quot;-183.07&quot; rx=&quot;62.48&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;139.57&quot; y=&quot;-179.77&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Cloud Computing&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;CLOUD --&gt;
&lt;g id=&quot;edge5&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--CLOUD&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M138.45,-118.83C138.69,-132.52 139.01,-151.13 139.25,-164.8&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;138.85&quot; y=&quot;-133.72&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;builds into&lt;/text&gt;
&lt;/g&gt;
&lt;!-- SNAP --&gt;
&lt;g id=&quot;node7&quot; class=&quot;node&quot;&gt;
&lt;title&gt;SNAP&lt;/title&gt;
&lt;ellipse fill=&quot;#f0f0f0&quot; stroke=&quot;black&quot; cx=&quot;66.35&quot; cy=&quot;-59.9&quot; rx=&quot;42.06&quot; ry=&quot;18&quot;&gt;&lt;/ellipse&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;66.35&quot; y=&quot;-56.6&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;11.00&quot;&gt;Snapshots&lt;/text&gt;
&lt;/g&gt;
&lt;!-- THIS&amp;#45;&amp;#45;SNAP --&gt;
&lt;g id=&quot;edge6&quot; class=&quot;edge&quot;&gt;
&lt;title&gt;THIS--SNAP&lt;/title&gt;
&lt;path fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M108.52,-83.76C103.11,-80.7 97.51,-77.53 92.22,-74.54&quot;&gt;&lt;/path&gt;
&lt;text xml:space=&quot;preserve&quot; text-anchor=&quot;middle&quot; x=&quot;114.13&quot; y=&quot;-71.05&quot; font-family=&quot;Helvetica,sans-Serif&quot; font-size=&quot;9.00&quot;&gt;related&lt;/text&gt;
&lt;/g&gt;
&lt;/g&gt;
&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id=&quot;key-properties&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Key Properties&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#key-properties&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Each VM includes a full guest OS — separate kernel, drivers, and system libraries&lt;/li&gt;
&lt;li&gt;Strong isolation: a crash in one VM does not affect other VMs or the host&lt;/li&gt;
&lt;li&gt;Server consolidation: one physical server can host many VMs, improving hardware utilization&lt;/li&gt;
&lt;li&gt;Snapshot and restore: full machine state can be saved and reverted&lt;/li&gt;
&lt;li&gt;Types: system VMs (full OS) and process VMs (single application, e.g., JVM)&lt;/li&gt;
&lt;li&gt;Performance overhead from virtualization layer — typically 5-20% compared to native&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;connections&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Connections&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#connections&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../hypervisor&quot; class=&quot;internal alias&quot; data-slug=&quot;hypervisor&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Hypervisor&lt;/a&gt; — the hypervisor creates and manages VMs&lt;/li&gt;
&lt;li&gt;Built from: &lt;a href=&quot;../../operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Operating System&lt;/a&gt; — each VM runs its own guest OS&lt;/li&gt;
&lt;li&gt;Contrasts with: containers — containers share the host OS kernel; VMs each have their own kernel&lt;/li&gt;
&lt;li&gt;Builds into: &lt;a href=&quot;../../distributed-operating-system&quot; class=&quot;internal alias&quot; data-slug=&quot;distributed-operating-system&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Distributed Operating System&lt;/a&gt; — VMs are building blocks for cloud and distributed systems&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../kernel-mode&quot; class=&quot;internal alias&quot; data-slug=&quot;kernel-mode&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Kernel Mode&lt;/a&gt; — VMs introduce an additional privilege level below kernel mode (Ring -1)&lt;/li&gt;
&lt;li&gt;Related: &lt;a href=&quot;../../monolithic-kernel&quot; class=&quot;internal alias&quot; data-slug=&quot;monolithic-kernel&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;Monolithic Kernel&lt;/a&gt; — the host OS kernel interacts with the hypervisor to support VMs&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;edge-cases--gotchas&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;highlight-span&quot;&gt;Edge Cases &amp;#x26; Gotchas&lt;/span&gt;&lt;a data-role=&quot;anchor&quot; data-no-popover href=&quot;#edge-cases--gotchas&quot; class=&quot;internal&quot;&gt;&lt;span class=&quot;indicator-hook&quot;&gt;&lt;/span&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;use href=&quot;#github-anchor&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul dir=&quot;auto&quot;&gt;
&lt;li&gt;VM performance overhead varies by workload: CPU-bound work is near-native with hardware virtualization; I/O-bound work loses more to emulation&lt;/li&gt;
&lt;li&gt;Memory overcommitment (allocating more virtual RAM than physical RAM) works but can cause swapping thrashing&lt;/li&gt;
&lt;li&gt;Timekeeping inside VMs can drift — the guest OS reads an emulated timer, not the real hardware clock&lt;/li&gt;
&lt;li&gt;Nested virtualization (running a hypervisor inside a VM) is possible but slow without specific CPU feature support&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry>
</feed>