| 32 | Nucleus modular division reflects main objectives of the operating system: |
| 33 | hardware interface, process alternation, low-level synchronization primitives |
| 34 | and exception handling routines. |
| 35 | Let's see such division in details: |
| 36 | * `initial.c` implements `main()` and exports the nucleus’s global variables |
| 37 | (e.g. process count, device descriptors, etc.); |
| 38 | * `interrupts.c` implements the device interrupt exception handler. Processes |
| 39 | all the device interrupts, including Interval Timer interrupts, converting |
| 40 | device interrupts into V operations on the appropriate semaphores; |
| 41 | * `exception.c` implements the TLB program trap and syscall/breakpoint |
| 42 | exception handlers; |
| 43 | * `dispatcher.c` implements Kaya’s process dispatcher and deadlock detector; |
| 44 | * `scheduler.c` implements Kaya’s process configurable scheduler; |
| 45 | * `tools.c` implements some kernel utilties and debugging tools. |