RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Modules | Files | Data Structures | Typedefs | Enumerations | Functions

This group contains the SMP Scheduler implementation. More...

Modules

 Deterministic Priority SMP Scheduler
 This group contains the Deterministic Priority SMP Scheduler implementation.
 
 Earliest Deadline First (EDF) Priority SMP Scheduler
 This group contains the Earliest Deadline First (EDF) Priority SMP Scheduler implementation.
 
 Simple Priority SMP Scheduler
 This group contains the Simple Priority SMP Scheduler implementation.
 
 Strong APA Scheduler
 This group contains the Strong APA Scheduler implementation.
 

Files

file  schedulersmp.h
 This header file provides interfaces of the SMP Scheduler which are used by the implementation and the Application Configuration.
 
file  schedulersmpimpl.h
 This header file provides interfaces of the SMP Scheduler which are only used by the implementation.
 

Data Structures

struct  Scheduler_SMP_Context
 Scheduler context specialization for SMP schedulers. More...
 
struct  Scheduler_SMP_Node
 Scheduler node specialization for SMP schedulers. More...
 

Typedefs

typedef bool(* Scheduler_SMP_Has_ready) (Scheduler_Context *context)
 
typedef Scheduler_Node *(* Scheduler_SMP_Get_highest_ready) (Scheduler_Context *context, Scheduler_Node *filter)
 
typedef Scheduler_Node *(* Scheduler_SMP_Get_lowest_ready) (Scheduler_Context *context)
 
typedef Scheduler_Node *(* Scheduler_SMP_Get_lowest_scheduled) (Scheduler_Context *context, Scheduler_Node *filter)
 
typedef void(* Scheduler_SMP_Extract) (Scheduler_Context *context, Scheduler_Node *node_to_extract)
 
typedef void(* Scheduler_SMP_Insert) (Scheduler_Context *context, Scheduler_Node *node_to_insert, Priority_Control insert_priority)
 
typedef void(* Scheduler_SMP_Move) (Scheduler_Context *context, Scheduler_Node *node_to_move)
 
typedef bool(* Scheduler_SMP_Ask_for_help) (Scheduler_Context *context, Thread_Control *thread, Scheduler_Node *node)
 
typedef void(* Scheduler_SMP_Update) (Scheduler_Context *context, Scheduler_Node *node_to_update, Priority_Control new_priority)
 
typedef void(* Scheduler_SMP_Set_affinity) (Scheduler_Context *context, Scheduler_Node *node, void *arg)
 
typedef bool(* Scheduler_SMP_Enqueue) (Scheduler_Context *context, Scheduler_Node *node_to_enqueue, Priority_Control priority)
 
typedef void(* Scheduler_SMP_Enqueue_scheduled) (Scheduler_Context *context, Scheduler_Node *node_to_enqueue, Priority_Control priority)
 
typedef void(* Scheduler_SMP_Allocate_processor) (Scheduler_Context *context, Scheduler_Node *scheduled, Per_CPU_Control *cpu)
 
typedef void(* Scheduler_SMP_Register_idle) (Scheduler_Context *context, Scheduler_Node *idle, Per_CPU_Control *cpu)
 

Enumerations

enum  Scheduler_SMP_Node_state { SCHEDULER_SMP_NODE_BLOCKED , SCHEDULER_SMP_NODE_SCHEDULED , SCHEDULER_SMP_NODE_READY }
 SMP scheduler node states. More...
 
enum  Scheduler_SMP_Action { SCHEDULER_SMP_DO_SCHEDULE , SCHEDULER_SMP_DO_NOT_SCHEDULE }
 This enumeration defines what a scheduler should do with a node which could be scheduled.
 

Functions

void _Scheduler_SMP_Start_idle (const Scheduler_Control *scheduler, Thread_Control *idle, struct Per_CPU_Control *cpu)
 Starts an idle thread on the specified cpu.
 
void _Scheduler_SMP_Remove_ask_for_help_from_processor (Thread_Control *thread, Per_CPU_Control *cpu)
 Removes the thread's ask for help request from the processor.
 

Detailed Description

This group contains the SMP Scheduler implementation.

The scheduler nodes can be in four states

State transitions are triggered via basic operations

During system initialization each processor of the scheduler instance starts with an idle thread assigned to it. Lets have a look at an example with two idle threads I and J with priority 5. We also have blocked threads A, B and C with priorities 1, 2 and 3 respectively. The scheduler nodes are ordered with respect to the thread priority from left to right in the below diagrams. The highest priority node (lowest priority number) is the leftmost node. Since the processor assignment is independent of the thread priority the processor indices may move from one state to the other.

Lets start A. For this an enqueue operation is performed.

Lets start C.

Lets start B.

Lets change the priority of thread A to 4.

Now perform a blocking operation with thread B. Please note that thread A migrated now from processor 0 to processor 1 and thread C still executes on processor 1.

Enumeration Type Documentation

◆ Scheduler_SMP_Node_state

SMP scheduler node states.

Enumerator
SCHEDULER_SMP_NODE_BLOCKED 

This scheduler node is blocked.

A scheduler node is blocked if the corresponding thread is not ready.

SCHEDULER_SMP_NODE_SCHEDULED 

The scheduler node is scheduled.

A scheduler node is scheduled if the corresponding thread is ready and the scheduler allocated a processor for it. A scheduled node is assigned to exactly one processor. The count of scheduled nodes in this scheduler instance equals the processor count owned by the scheduler instance.

SCHEDULER_SMP_NODE_READY 

This scheduler node is ready.

A scheduler node is ready if the corresponding thread is ready and the scheduler did not allocate a processor for it.

Function Documentation

◆ _Scheduler_SMP_Remove_ask_for_help_from_processor()

void _Scheduler_SMP_Remove_ask_for_help_from_processor ( Thread_Control thread,
Per_CPU_Control cpu 
)

Removes the thread's ask for help request from the processor.

The caller must be the owner of the thread's scheduler lock.

Parameters
[in,out]threadis the thread of the ask for help request.
[in,out]cpuis the processor from which the ask for help request should be removed.

◆ _Scheduler_SMP_Start_idle()

void _Scheduler_SMP_Start_idle ( const Scheduler_Control scheduler,
Thread_Control idle,
struct Per_CPU_Control cpu 
)

Starts an idle thread on the specified cpu.

Parameters
schedulerThe scheduler instance.
[in,out]idleThe idle thread to schedule.
[out]cpuThe cpu to run the idle thread on.