Global Sources
EE Times-India
Stay in touch with EE Times India
 
EE Times-India > Embedded
 
 
Embedded  

Fundamentals of MCAPI use in multi-core-based designs

Posted: 10 Sep 2014     Print Version  Bookmark and Share

Keywords:MCAPI  application program interface  API  symmetrical multi-processing  SMP 

MCAPI is a standardised application program interface (API) for communication and synchronisation between closely distributed cores and/or processors in embedded systems. It is defined and maintained by the Multicore Association (MCA). This article outlines what MCAPI is, how it works and how it may be deployed in multi-core systems.

Multicore
From the software perspective, there are two types of multi-core system: symmetrical multi-processing (SMP) and asymmetrical multi-processing (AMP). An SMP system is built on a multi-core chip that has multiple identical CPUs; a single operating system (a special variant designed for SMP) runs on the multiple cores and distributes work between them. An AMP system may be built on any type of multi-core chip; the CPUs may be identical or there may be a mixture of architectures. Each CPU has its own operating system (or may not have one at all – the code is running on "bare metal") and these need not all be the same. So, for example, an AMP system may include cores running Linux and others running a real-time operating system (RTOS).

With an SMP system, there is no issue with communication between cores, as the SMP operating system takes care of communication between tasks, threads, and/or processes regardless of which core they are running on; one task simply needs to, for example, 'post in a mailbox' and another task can receive the data.

On an AMP system, a separate layer of software is needed to facilitate communication between the cores. This is the role of MCAPI.

What is MCAPI?
MCAPI is a communications API, similar to the familiar sockets API used in networking. An application uses standardised function calls to send and receive data to and from any core in the system. The specification does not dictate how data is physically transferred—shared memory, Ethernet, etc. It specifies only the user's API-level expectations when executing the respective routines, which enables source code compatibility across multiple operating systems.

What MCAPI is not
The important thing to note is that MCAPI is not a protocol specification, which is, by definition, an implementation issue. No interoperability between different vendors' MCAPI implementations would be anticipated. However, all application source code should be totally portable between different MCAPI implementations.

MCAPI concepts and terminology
Some of the key MCAPI concepts may feel familiar to anyone with knowledge of networking. The first is a domain, which may be likened to a subnet in networking terms. A system that uses MCAPI includes one or more domains, and each domain includes a number of nodes. Each node can only belong to one domain, so there is a true hierarchy.

A node is an abstract concept, but may be thought of broadly as a stream of code execution. So it might be a process, thread, task, core, or one of a number of other possibilities. The exact nature of a node is specified for a given MCAPI implementation.

An endpoint is a destination to which messages may be sent or to which a connection may be established, rather like a socket in networking. A node may have multiple endpoints; each endpoint has a unique identifier, which is the tuple . The creating node receives from an endpoint, but any node may send to one.

MCAPI communications
Some inter-processor communications protocols require a full TCP/IP stack to exchange data, creating a bloated memory footprint. MCAPI, on the other hand, does not require TCP/IP and is much more lightweight. Another major benefit of MCAPI is scalability at the application level. As more threads are added and additional communication points are required, transactions are handled seamlessly through the use of the MCAPI primitives. Furthermore, MCAPI provides a reliable interface for data transfer, ensuring data is delivered as expected by the application.

1 • 2 Next Page Last Page



Comment on "Fundamentals of MCAPI use in multi-c..."
Comments:  
*  You can enter [0] more charecters.
*Verify code:
 
 
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

 

Go to top             Connect on Facebook      Follow us on Twitter      Follow us on Orkut

 
Back to Top