Embedded Multicore Building Blocks V1.0.0
Modules

Multicore Task Management API (MTAPI®). More...

Modules

 General
 Initialization, introspection, and finalization functions.
 
 Actions
 Hardware or software implementations of jobs.
 
 Action Functions
 Executable software functions that implement actions.
 
 Core Affinities
 Affinities for executing action functions on subsets of cores.
 
 Queues
 Queues for controlling the scheduling policy of tasks.
 
 Jobs
 Jobs implementing one or more actions.
 
 Tasks
 Tasks representing pieces of work "in flight" (similar to a thread handles).
 
 Task Groups
 Facilities for synchronizing on groups of tasks.
 
 MTAPI Extensions
 Provides extensions to the standard MTAPI API.
 

Detailed Description

Multicore Task Management API (MTAPI®).

MTAPI is an API standardized by the Multicore Association for leveraging task parallelism on a wide range of embedded devices containing symmetric or asymmetric multicore processors. A description of the basic terms and concepts is given below. More information can be found on the website of the Multicore Task Management Working Group.

Definitions

Action An action is the hardware or software implementation of a job. An action implemented in software consists of the implementation of an action function with a predefined signature. Software actions are registered with the MTAPI runtime and associated with a job. While executing, an action is also associated with a task and task context. Hardware implementations of actions must be known a priori in the MTAPI runtime implementation. There is no standardized way of registering hardware actions because they are highly hardware-dependent. Hardware and software actions are referenced by handles or indirectly through job IDs and job handles.
Action Function The executable function of an action, invoked by the MTAPI runtime when a task is started.
Affinity Defines which cores can execute a given action function.
Blocking A blocking function does not return until the function completes successfully or returns with an error.
Core A core is an undividable processing element. Two cores can share resources such as memory or ALUs for hyperthreaded cores. The core notion is necessary for core affinity, but is implementation-specific.
Domain An implementation of MTAPI includes one or more domains, each with one or more nodes. The concept of domains is consistent in all Multicore Association APIs. A domain is comparable to a subnet in a network or a namespace for unique names and IDs. Domains are supported by a runtime.
Handle An abstract reference to an object on the same node or to an object managed by another node. A handle is valid only on the node on which it was requested and generated. A handle is opaque, that is, its underlying representation is implementation-defined. Handles can be copied, assigned, and passed as arguments, but the application should make no other assumptions about the type, representation, or contents of a handle.
Job A job provides a way to reference one or more actions. Jobs are abstractions of the processing implemented in hardware or software by actions. Multiple actions can implement the same job based on different hardware resources (for instance a job can be implemented by one action on a DSP and by another action on a general purpose core, or a job can be implemented by both hardware and software actions). Each job is represented by a domain-wide job ID, or by a job handle local to a node.
MCA The Multicore Association.
MTAPI Multicore Task Management API, defined by The Multicore Association.
Node A node represents an independent unit of execution that maps to a process, thread, thread pool, instance of an operating system, hardware accelerator, processor core, a cluster of processor cores, or other abstract processing entity with an independent program counter. Each node can belong to only one domain. The concept of nodes is consistent in all Multicore Associations APIs. Code executed on an MTAPI node shares memory (data) with any other code executed on the same node.
Queue A software or hardware entity in which tasks are enqueued in a given order. The queue can ensure in-order execution of tasks. Furthermore, queues might implement other scheduling policies that can be configured by setting queue attributes.
Reference A reference exists when an object or abstract entity has knowledge or access to another object, without regard to the specific means of the implementation.
Resource A processing core or chip, hardware accelerator, memory region, or I/O.
Remote Memory Memory that cannot be accessed using standard load and store operations. For example, host memory is remote to a GPU core.
Runtime System An MTAPI runtime system (or "runtime") is the underlying implementation of MTAPI. The core of the runtime system supports task scheduling and communication with other nodes. Each MTAPI has an MTAPI runtime system.
SMP SMP is short for symmetric multiprocessing, in which two or more identical processing cores are connected to a shared main memory and are controlled by a single OS instance.
Task A task is the invocation of an action. A task is associated with a job object, which is associated with one or more actions. A task may optionally be associated with a task group. A task has attributes and an internal state. A task begins its lifetime with a call to mtapi_task_start() or mtapi_task_enqueue(). A task is referenced by a handle of type mtapi_task_hndl_t. After a task has started, it is possible to wait for task completion from other parts of the program. Every task can run exactly once, i.e., the task cannot be started a second time. (Note that in other contexts, the term "task" has a different meaning. Some real-time operating systems use "task" for operating system threads, for example.)
Task Context Information about the task, accessible by the corresponding action function; useful for action code reflection.

The MTAPI Feature Set

MTAPI supports two programming modes derived from use cases of the working group members:

MTAPI also supports the following types of tasks: