# RTIC compatibility with the theory of real time scheduling
## Priorities
Priorities in RTIC are fixed, determined statically at project time.
The system is preemptive.
## Tasks
One of the major incompatibilities with the theory is the fact that RTIC does not allow non-terminating tasks.
The framework specifies a dichotomy between Hardware Tasks (HT) and Software Tasks. The difference lays in the fact that the former are bound to a specific interrupt vector while the latter are bound to a specific dispatcher.
Furthermore, STs can "spawn" other STs.
This feature combined with the use of the system timer can be used to simulate periodic tasks, by making a task spawn after a fixed amount of time.
A software task can be called with an argument to implement message passing.
## Resources
In RTIC there are two types of resources: local and shared. Both are declared in a `struct` before any task is initialized. The structs themselves may be initialized in the `#[init]` task.
Resources employed in a task are declared in its attribute.
A local resource does not have any lock or critical section as it is used only by one task. Attempting to use it by multiple tasks will result in a compile time error. Local resources are useful as tasks are non-reentrant.
Shared resources on the other and implement the `Mutex` trait, and the framework employs Immediate Ceiling Priority Protocol.