In GeMRTOS, scheduling lists are the core mechanism for assigning tasks to processors in a multiprocessor RTOS running on Altera FPGA platforms with Nios V processors. Each task is assigned to a scheduling list, and one or more processors may serve that list — combining the predictability of partitioned scheduling with the flexibility of global load balancing. A timer-tickless scheduler minimizes overhead, while floating scheduling isolates system design from the number of processors in the hardware architecture. The generic feature allows partial, global, and partitioned scheduling configurations.

What Are GeMRTOS Scheduling Lists? #
A scheduling list groups tasks that share the same scheduling discipline and determines which processors execute those tasks. Processors may be associated with one or more scheduling lists, and their assignments can change at any time during runtime without restarting the system. Resources may be shared among tasks from different scheduling lists. Tasks may also migrate from one scheduling list to another at runtime, enabling dynamic workload redistribution across processors.
Hybrid partition scheduling — based on scheduling lists — allows the different subsystems of an application to be scheduled independently, each with its own priority discipline and processor assignment.
Scheduling List Types #
GeMRTOS defines the following scheduling list types. Additional types can be defined to extend the system:
- GS_LCBTypeEDF — implements the Earliest Deadline First (EDF) discipline among the tasks assigned to the list. The task with the earliest deadline receives the highest priority. Tasks assigned to an EDF list should be of the periodic type, with deadlines measured from each release time.
- GS_LCBTypeFP — implements the Fixed Priority (FP) discipline among the tasks assigned to the list. A static priority is assigned to each task, though priorities may be modified at runtime. Tasks in an FP list should not be implemented as infinite loops without an event-suspension wait, to avoid starving lower-priority tasks. Only the lowest-priority task may safely use an infinite-loop pattern.
Scheduling List API Reference #
Creating a Scheduling List #
Create a new scheduling list with the desired discipline using:
GS_LCB *gu_SchedulingListCreate(enum lcbtype lcbtype);The gu_SchedulingListCreate function allocates and initializes a new scheduling list. The scheduling discipline used by the list is determined by the lcbtype parameter.
| Parameter | Description |
|---|---|
lcbtype | Enumeration value specifying the scheduling discipline: GS_LCBTypeEDF for Earliest Deadline First, or GS_LCBTypeFP for Fixed Priority. |
Returns: pointer to the newly created GS_LCB structure, or (GS_LCB *) 0 on failure.
Associating a Processor with a Scheduling List #
Assign a system processor to a scheduling list with:
G_INT32 gu_SchedulingListAssociateProcessor(GS_LCB *plcb, G_INT32 CPUID, G_INT32 priority);The gu_SchedulingListAssociateProcessor function links a processor to a scheduling list at a given priority level. When tasks are ready to execute, the processor selects work from the highest-priority scheduling list it is associated with. A lower numerical priority value indicates higher priority.
| Parameter | Description |
|---|---|
plcb | Pointer to the GS_LCB structure representing the scheduling list. |
CPUID | ID of the processor to associate with the scheduling list. |
priority | Priority of the association. Lower value = higher priority. The processor searches its highest-priority associated lists first for ready tasks. |
Returns: G_TRUE if the association succeeded, G_FALSE otherwise.
Assigning a Task to a Scheduling List #
Assign a task to a specific scheduling list with:
G_INT32 gu_SchedulingListAssociateTask(struct gs_tcb *ptcb, struct gs_lcb *plcb);The gu_SchedulingListAssociateTask function assigns a task to the specified scheduling list. Once assigned, the task is scheduled according to the priority discipline defined for that list.
| Parameter | Description |
|---|---|
ptcb | Pointer to the GS_TCB structure representing the task to assign. |
plcb | Pointer to the GS_LCB structure representing the target scheduling list. |
Returns: G_TRUE if the task was successfully assigned, G_FALSE otherwise.
Key Takeaways #
- GeMRTOS scheduling lists decouple task scheduling from processor count, enabling hybrid partitioned and global scheduling on Nios V FPGA platforms without redesigning the application.
- Two built-in disciplines: GS_LCBTypeEDF (Earliest Deadline First — for periodic tasks with hard deadlines) and GS_LCBTypeFP (Fixed Priority — for tasks with static or dynamically adjustable priorities).
- Processors and tasks can be reassigned to different scheduling lists at runtime with gu_SchedulingListAssociateProcessor and gu_SchedulingListAssociateTask — no system restart required.
- Resources may be shared across scheduling lists; tasks may migrate between lists dynamically, enabling flexible load balancing.
- Setting a scheduling list’s exclusion parameter to 1 serializes execution across all assigned tasks, providing race-condition-free critical sections without explicit mutex calls.