Process management

RTEMS executive does not implement multiprocess environment with separated application address spaces. As a result, next functions supporting independent process creation and deletion are not implemented: fork(), execl(), execv(), execle(), execve(), execlp(), execvp(), pthread_atfork() and wait().

RTEMS executive is focused on multithread applications and its Task Manager supports full set of functions in classic and POSIX API. Cancellation functions are implemented by Cancellation Manager.

Table 10-1. Thread Creation and Deletion calls

POSIX APIClassic APIDescription
pthread_create()rtems_task_create()Create a new thread of execution.
pthread_exit()rtems_task_delete()Destroy a thread.
pthread_cancel() Cancel a thread at the next cancellation point.
pthread_detach()Detach a thread so it doesn't need to be joined.
pthread_join()Join a thread waiting for its exit status.
All other POSIX thread control related functions are implemented: pthread_self(), pthread_equal(), pthread_once(), pthread_setschedparam(), pthread_getschedparam() and group of functions pthread_attr_getxxx()/pthread_attr_setxxx().

Scheduling policy:

  • Event-driven, priority-based, preemptive scheduling

  • Optional rate monotonic scheduling

Periodic threads:

RTEMS do not provide any special API call to schedule peritodic threads.

Range of priorities and maximum number of threads:

  • 255 executive kernel priority levels (1 the highest till 255 the lowest)

    POSIX API defines its own priority range from 1 to 254 (1 the lowest and 254 the highest)

  • Maximal number of threads can be defined for each application and configurable maximum depends on amount of available memory.

Thread creation and deletion:

Threads can be created dynamically.

Controlled thread deletion?. Yes