RTOS Specification
RTOS Specification
RTOS Specification
Specifying Free-RTOS
Deepak DSouza
23 August 2011
Top-level specification of scheduling-related requirements Exercise
Outline
2 Exercise
Top-level specification of scheduling-related requirements Exercise
Scheduling-related
Implement its stated scheduling policy (fixed priority
pre-emptive scheduling).
Provide APIs for:
Task creation, deletion, set priority, etc.
Inter-task communication through queues, semaphores, and
mutexes.
Handle timer event correctly
Update tickcount,
Check delayed tasks, and move to ready if required,
Port-specific
Trap SWI and timer interrupts correctly.
Perform context-switching (save and restore) correctly.
Provide correct enterCritical and exitCritical
implementation.
Other requirements
Ensure that APIs use critical sections when they have to.
Top-level specification of scheduling-related requirements Exercise
Task2, xQueueSendToBack(xQueue,20)_b;
Task1, xQueueSendToBack(xQueue,10)_b;
Task3, vTaskPrioritySet(Task1,4);
Task3, xQueueReceive(xQueue,30);
Task3, vTaskPrioritySet(Task3,0);
Task2, xQueueSendToBack(xQueue,20)_e;
Top-level specification of scheduling-related requirements Exercise
MAX_SYSCALL_PRIORITY SemaphoreCreateBinary
SemaphoreCreateMutex
taskEnter_CRITICAL
portSWITCH_CONTEXT
Configuration
Hardware Interrupt
timer