| 101 | |
| 102 | == G) Interrupts Routing == |
| 103 | |
| 104 | The completion of an I/O operation is signaled by the involved hardware device using an interrupt. This interrupt must be handled by the core running the server thread that launched the I/O operation. Therefore, the interrupt must be routed to the cluster containing the device descriptor involved in the I/O operation. ALMOS-MKH makes the assumption that interrupt routing (from peripherals to cores) is done by a dedicated hardware device, called PIC (Programmable Interrupt Controller). The main service provide by the PIC device is to allow the OS to route any IRQ (generated by a given peripheral channel to any core. |
| 105 | |
| 106 | This generic PIC device is supposed to be implemented by a ''distributed'' hardware infrastructure containing two types of hardware components: |
| 107 | * The IOPIC component (one single component in I/O cluster) interfaces the externals peripheral IRQs (one IPQ per channel) to the PIC infrastructure |
| 108 | * The LAPIC components (one component per cluster) interfaces the PIC infrastructure to the local cores in a given cluster. |
| 109 | The actual interrupt routing is defined during the PIC device initialization, using the architecture specific PIC driver. The PIC device is the first device initialized by the kernel_init() function. |
| 110 | |