<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.amc-os.com/index.php?action=history&amp;feed=atom&amp;title=Interrupts</id>
	<title>Interrupts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.amc-os.com/index.php?action=history&amp;feed=atom&amp;title=Interrupts"/>
	<link rel="alternate" type="text/html" href="http://wiki.amc-os.com/index.php?title=Interrupts&amp;action=history"/>
	<updated>2026-04-20T08:49:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>http://wiki.amc-os.com/index.php?title=Interrupts&amp;diff=65&amp;oldid=prev</id>
		<title>Kindman: minor checks</title>
		<link rel="alternate" type="text/html" href="http://wiki.amc-os.com/index.php?title=Interrupts&amp;diff=65&amp;oldid=prev"/>
		<updated>2013-07-18T14:43:04Z</updated>

		<summary type="html">&lt;p&gt;minor checks&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:43, 18 July 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====General considerations====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====General considerations====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The processor can interrupt the execution of the current process &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;due to &lt;/del&gt;3 different types &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;of interruptions &lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The processor can interrupt the execution of the current process &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;on &lt;/ins&gt;3 different &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;event &lt;/ins&gt;types :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Exceptions/Faults : the running process made a fault, like &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;for example &lt;/del&gt;the typical &amp;quot;General Protection Fault&amp;quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if &lt;/del&gt;the process read or wrote memory in a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;wrong &lt;/del&gt;place.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Exceptions/Faults : the running process made a fault, like the typical &amp;quot;General Protection Fault&amp;quot; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;when &lt;/ins&gt;the process read or wrote memory in a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;forbidden &lt;/ins&gt;place.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Software interrupts : The process called an interrupt with the INT XX instruction.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Software interrupts : The process called an interrupt with the INT XX instruction.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Hardware interrupts : Associated hardware raised the INT# line of the processor to inform it of any kind of event that just happened, like for a example &amp;quot;a key has been pressed&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Hardware interrupts : Associated hardware raised the INT# line of the processor to inform it of any kind of event that just happened, like for a example &amp;quot;a key has been pressed&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l18&quot;&gt;Line 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 18:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Hardware interrupts (IRQ)===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Hardware interrupts (IRQ)===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Whenever the hardware wants to inform the system that something happened, like a new disc has been inserted or the user moved the mouse for example, it can deal with it in two &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;different &lt;/del&gt;ways :&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Whenever the hardware wants to inform the system that something happened, like a new disc has been inserted or the user moved the mouse for example, it can deal with it in two ways :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Update its internal status and wait for the operating system to check for it (this method is called &amp;#039;&amp;#039;polling&amp;#039;&amp;#039;).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Update its internal status and wait for the operating system to check for it (this method is called &amp;#039;&amp;#039;polling&amp;#039;&amp;#039;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Request the interruption (IRQ) of the current process execution to immediately inform the operating system of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;an &lt;/del&gt;event &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to deal with&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Request the interruption (IRQ) of the current process execution to immediately inform the operating system of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a pending &lt;/ins&gt;event.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Both methods have their own interest, but the thing to keep in mind is that interrupts are used to treat the event as quickly as possible. Interrupts are more resource consuming due to task switching&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/del&gt;and reduce control on how CPU time &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is divided &lt;/del&gt;between &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;each process&lt;/del&gt;, but if the OS doesn&amp;#039;t check as quickly as necessary the hardware status, it can possibly lose &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date &lt;/del&gt;(like for a high rate network card, the buffer can be full and overrun if the OS doesn&amp;#039;t read it before next packets arrive).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Both methods have their own interest, but the thing to keep in mind is that interrupts are used to treat the event as quickly as possible. Interrupts are more resource consuming due to task switching and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;they &lt;/ins&gt;reduce &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/ins&gt;control on how CPU time &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;division &lt;/ins&gt;between &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;processes&lt;/ins&gt;, but if the OS doesn&amp;#039;t check as quickly as necessary the hardware status, it can possibly lose &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;data &lt;/ins&gt;(like for a high rate network card, the buffer can be full and overrun if the OS doesn&amp;#039;t read it before next packets arrive).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====The Programmable Interrupt Controller====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====The Programmable Interrupt Controller====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kindman</name></author>
	</entry>
	<entry>
		<id>http://wiki.amc-os.com/index.php?title=Interrupts&amp;diff=64&amp;oldid=prev</id>
		<title>Kindman: added i8259a spec</title>
		<link rel="alternate" type="text/html" href="http://wiki.amc-os.com/index.php?title=Interrupts&amp;diff=64&amp;oldid=prev"/>
		<updated>2012-08-30T13:00:29Z</updated>

		<summary type="html">&lt;p&gt;added i8259a spec&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:00, 30 August 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot;&gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To handle different interrupts, an programmable interrupt controller (PIC) is added. The PIC can handle multiple interrupt lines, priority between them, individual masking and so on. When an interrupt comes in, the INT# line is triggered and the interrupt number is sent to the CPU through data bus.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To handle different interrupts, an programmable interrupt controller (PIC) is added. The PIC can handle multiple interrupt lines, priority between them, individual masking and so on. When an interrupt comes in, the INT# line is triggered and the interrupt number is sent to the CPU through data bus.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On the x86 family, the i8259 PIC was first used in the XT. It supported 8 differents IRQ. On the AT, an other i8259 was cascaded to the first one, leading up to 15 differents IRQs (16 minor the one used for cascading). It is only since some Pentium processors that it was replaced by an advanced PIC (APIC) supporting, amongst other things, 23 differents IRQ.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On the x86 family, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the [[#Programming &lt;/ins&gt;the i8259 PIC&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|i8259 PIC]] &lt;/ins&gt;was first used in the XT. It supported 8 differents IRQ. On the AT, an other i8259 was cascaded to the first one, leading up to 15 differents IRQs (16 minor the one used for cascading). It is only since some Pentium processors that it was replaced by an advanced PIC (APIC) supporting, amongst other things, 23 differents IRQ.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Programming the i8259 PIC==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===Original specifications===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[http://www.amc-os.com/developers/specifications/intel_8259a.pdf Intel 8259A datasheet]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kindman</name></author>
	</entry>
	<entry>
		<id>http://wiki.amc-os.com/index.php?title=Interrupts&amp;diff=51&amp;oldid=prev</id>
		<title>Kindman: Creation</title>
		<link rel="alternate" type="text/html" href="http://wiki.amc-os.com/index.php?title=Interrupts&amp;diff=51&amp;oldid=prev"/>
		<updated>2012-08-18T22:22:05Z</updated>

		<summary type="html">&lt;p&gt;Creation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Processor===&lt;br /&gt;
====General considerations====&lt;br /&gt;
&lt;br /&gt;
The processor can interrupt the execution of the current process due to 3 different types of interruptions :&lt;br /&gt;
* Exceptions/Faults : the running process made a fault, like for example the typical &amp;quot;General Protection Fault&amp;quot; if the process read or wrote memory in a wrong place.&lt;br /&gt;
* Software interrupts : The process called an interrupt with the INT XX instruction.&lt;br /&gt;
* Hardware interrupts : Associated hardware raised the INT# line of the processor to inform it of any kind of event that just happened, like for a example &amp;quot;a key has been pressed&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The x86 family support 256 interrupts, and the first 32 are reserved for the exceptions and traps generated by the processor itself. All the others are available to software and external hardware. &lt;br /&gt;
&lt;br /&gt;
====Interrupt Descriptor Table (IDT)====&lt;br /&gt;
The OS maintains an &amp;#039;&amp;#039;interrupt descriptor table&amp;#039;&amp;#039; used by the processor to know what to do when a specific interrupt is triggered. In real mode, it is just a list of FAR jump addresses located at physical memory address 0. In protected mode, it is a table of descriptors (interrupt gate, task gate...). &lt;br /&gt;
&lt;br /&gt;
Once prepared, the interrupt descriptor table is set up using the LIDT instruction.&lt;br /&gt;
&lt;br /&gt;
===Hardware interrupts (IRQ)===&lt;br /&gt;
&lt;br /&gt;
Whenever the hardware wants to inform the system that something happened, like a new disc has been inserted or the user moved the mouse for example, it can deal with it in two different ways :&lt;br /&gt;
* Update its internal status and wait for the operating system to check for it (this method is called &amp;#039;&amp;#039;polling&amp;#039;&amp;#039;).&lt;br /&gt;
* Request the interruption (IRQ) of the current process execution to immediately inform the operating system of an event to deal with.&lt;br /&gt;
&lt;br /&gt;
Both methods have their own interest, but the thing to keep in mind is that interrupts are used to treat the event as quickly as possible. Interrupts are more resource consuming due to task switching, and reduce control on how CPU time is divided between each process, but if the OS doesn&amp;#039;t check as quickly as necessary the hardware status, it can possibly lose date (like for a high rate network card, the buffer can be full and overrun if the OS doesn&amp;#039;t read it before next packets arrive).&lt;br /&gt;
&lt;br /&gt;
====The Programmable Interrupt Controller====&lt;br /&gt;
&lt;br /&gt;
As on most microcomputers, the x86 CPU have two external interrupt lines : a software maskable (SMI) and a non-maskable interrupt line (NMI). The SMI is used by standard hardware to trigger an interrupt, and the NMI is used during critical condition (memory or I/O parity error) or to force the OS to an escape routine.&lt;br /&gt;
&lt;br /&gt;
To handle different interrupts, an programmable interrupt controller (PIC) is added. The PIC can handle multiple interrupt lines, priority between them, individual masking and so on. When an interrupt comes in, the INT# line is triggered and the interrupt number is sent to the CPU through data bus. &lt;br /&gt;
&lt;br /&gt;
On the x86 family, the i8259 PIC was first used in the XT. It supported 8 differents IRQ. On the AT, an other i8259 was cascaded to the first one, leading up to 15 differents IRQs (16 minor the one used for cascading). It is only since some Pentium processors that it was replaced by an advanced PIC (APIC) supporting, amongst other things, 23 differents IRQ.&lt;/div&gt;</summary>
		<author><name>Kindman</name></author>
	</entry>
</feed>