Small real time operating system for the atmega328p mcu.
When an OS managed interrupt happens, we store the context, handle the interrupt and run the scheduler to determine which thread should continue execution
Peripheral managed interrupts act as normal interrupts.
The system tick is generated by the timer0 output compate A interrupt. This is an OS managed interrupt as it might trigger a rescheduling.
Each thread owns an execution context, all the threads are executed concurrently. The threads can have multiple states: * running -> thread currently running * ready -> thread ready to run * suspended -> thread suspended for a specific ammount of time * waiting -> thread waiting on an event * disabled -> thread disabled
The scheduler keeps track of the states of each thread and handles the arbitration between all the threads that are ready to be executed