{"componentChunkName":"component---src-templates-post-template-js","path":"/posts/operatingsystems/multiprocessor-scheduling","result":{"data":{"markdownRemark":{"id":"262dae22-2d46-58ec-a7da-c39d3db15fda","html":"<h2 id=\"bankers-algorithm\" style=\"position:relative;\"><a href=\"#bankers-algorithm\" aria-label=\"bankers algorithm permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Bankers Algorithm</h2>\n<ul>\n<li>Motivation: Avoid deadlocks when working with threads</li>\n<li>\n<p>Idea: When a thread requests a resource, the OS checks if it would deadlock</p>\n<ul>\n<li>If so, wait for other threads to release resources</li>\n<li>If not, grant the resource right away</li>\n</ul>\n</li>\n<li>Implementation: State max resources that thread needs. Allow thread to proceed if <code class=\"language-text\">available resources - requested resources >= max remaining needed by any thread</code></li>\n<li>Keeps system in a safe state</li>\n</ul>\n<h2 id=\"precise-exceptions\" style=\"position:relative;\"><a href=\"#precise-exceptions\" aria-label=\"precise exceptions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Precise Exceptions</h2>\n<p>At the time that an exception handler begins execution, there is a well-defined instruction\naddress in the instruction stream for which all prior instructions have committed their results and no following instructions (including the excepting one) have modified processor state.</p>\n<h2 id=\"meltdown-security-flaw\" style=\"position:relative;\"><a href=\"#meltdown-security-flaw\" aria-label=\"meltdown security flaw permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Meltdown Security Flaw</h2>\n<p>Many processors allowed timing windows in which illegal accesses could be performed\nspeculatively and made to impact cache state – even though the speculatively loaded data\nwas later squashed in the pipeline and could not be directly used.</p>\n<h2 id=\"earliest-deadline-firstedf-scheduler\" style=\"position:relative;\"><a href=\"#earliest-deadline-firstedf-scheduler\" aria-label=\"earliest deadline firstedf scheduler permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Earliest Deadline First(EDF) scheduler</h2>\n<ul>\n<li>The scheduler to use for realtime systems. Runs the task with the earliest deadline first.</li>\n</ul>\n<h2 id=\"beladys-anomaly\" style=\"position:relative;\"><a href=\"#beladys-anomaly\" aria-label=\"beladys anomaly permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Beladys anomaly</h2>\n<ul>\n<li>Increasing number of page frames increases number of page faults for FIFO, Random Page Replacement</li>\n</ul>","fields":{"slug":"/posts/operatingsystems/multiprocessor-scheduling","tagSlugs":["/tag/notes/","/tag/operating-system/"]},"frontmatter":{"date":"2021-10-11T23:46:37.121Z","description":"Notes on the different types of scheduling systems for multiprocessors","tags":["Notes - ","Operating System"],"title":"Multiprocessor Scheduling"}}},"pageContext":{"slug":"/posts/operatingsystems/multiprocessor-scheduling"}},"staticQueryHashes":["251939775","401334301","825871152"]}