The Design and Implementation of Portable Symmetric Message Passing and Management Mechanism for Shared Memory Multi-Processor Architecture
碩士 === 國立成功大學 === 電腦與通信工程研究所 === 102 === SUMMARY Multi-processor or multi-core architecture has become a common feature in modern embedded system products. While the architecture helps improve system performance, one very important issue that can not be overlooked is the inter-process communication...
Main Authors: | , |
---|---|
Other Authors: | |
Format: | Others |
Language: | zh-TW |
Published: |
2014
|
Online Access: | http://ndltd.ncl.edu.tw/handle/39905640901602751669 |
id |
ndltd-TW-102NCKU5652109 |
---|---|
record_format |
oai_dc |
collection |
NDLTD |
language |
zh-TW |
format |
Others
|
sources |
NDLTD |
description |
碩士 === 國立成功大學 === 電腦與通信工程研究所 === 102 === SUMMARY
Multi-processor or multi-core architecture has become a common feature in modern embedded system products. While the architecture helps improve system performance, one very important issue that can not be overlooked is the inter-process communication (IPC) which concerns processes running on the same processor as well as running on different processors. In this study, a portable symmetric message passing and management mechanism suitable for shared memory multi-processor architecture is designed and implemented. The main goal is supporting message exchange across processor cores in various contexts while achieving portability among shared memory multi-processor or multi-core platforms of similar architectures but equipped different IPC mechanisms so that cross-processor synchronization and co-operation between processes can be realized.
The symmetric message passing and management mechanism provides not only essential functionality of sending and receiving messages in both synchronous and asynchronous manners, but also supports functions of receiving message from specific processor core or process, querying the subsequent status of message asynchronously sent, and returning status code of function invocation. Regarding the issue that process might be trapped in the state of endless waiting due to sending or receiving message synchronously, a handling mechanism based on the concept of time-limit is provided. To address the portability issue, the differences in hardware IPC commonly available in multi-core platforms are analyzed and considered their characteristics as the parameters needed in building the binary executable for a platform. A user-friendly configuration program is implemented to help enter the platform-specific parameters when building the binary executable to run on a particular platform.
PAC DUO and OMAP35x shared memory multi-core platforms are used to conduct experiments in verifying the functionality and portability of this design and implementation. The experiment results show that all processes running on the two platforms can make use of this symmetric message passing and management mechanism for exchanging messages across processor cores, and prove the correctness of the functionality. Further, the binary executables for these platforms were built using the configuration program during conducting the experiments. Therefore, those results of the experiments also demonstrate the portability.
Key words: Shared Memory Multi-Processor Architecture, Symmetric Message Passing and Management Mechanism, Portability, PAC Duo, OMAP35x
INTRODUCTION
Multi-processor or multi-core architecture has become a common feature in modern embedded system products. The trend is deploying SOC (System-On-a-Chip) as the main hardware component in which two or more processor cores, which are not necessarily of the same type, are put into one single silicon chip. OMAP and DaVinci are well-known examples and both are composed of an ARM9 core and a DSP (Digital Signal Processing) core to form a platform of chip-level heterogeneous multi- processor architecture. Typically, the platform consists of one GPP (General Purpose Processor) and one or more SPP (Special purpose Processor) to co-operate, in addition to performing their dedicated functions. Such a configuration of multiple processor cores has been used in many consumer embedded system products.
While embedded system products based on multi-processor or multi-core architecture can effectively meet the requirements imposed from some possibly conflicting restrictions, such as high performance and low cost, the architecture of chip-level heterogeneous multi-processor not only brings new challenges but also increases complexity in developing embedded software. One very important issue that can not be overlooked is the inter-process communication (IPC) which concerns processes running on the same processor as well as running on different processors. The general requirement is that processes can communicate through exchanging messages or sharing data. In this study, a portable symmetric message passing and management mechanism suitable for shared memory multi-processor architecture is designed and implemented. The main goal is supporting application process to exchange messages across processor cores in various contexts while achieving portability among shared memory multi-processor or multi-core platforms of similar architectures but equipped different IPC mechanisms in order to help realize cross- processor synchronization and co-operation between processes.
The symmetric message passing and management mechanism consists of four main components in addition to the desirable hardware IPC supports, namely process communication manager, message queue manager, message exchanging interface function module, and the configuration program. In supporting exchanging messages across processor cores, it provides not only essential functionality of sending and receiving messages in both synchronous and asynchronous manners, but also supports functions of receiving message from specific processor core or process, querying the status of an asynchronously sent message, and returning status code of function invocation. In case that process might be blocked and trapped in the state of endless waiting due to sending or receiving message synchronously, a handling mechanism based on the concept of time-limit is provided.
The shared memory multi-processor architecture considered in this study mainly, but not necessarily, are heterogeneous multi-processor or multi-core architecture in which at least both shared memory of UMA (Uniform Memory Access) and hardware IPC mechanism are supported. The hardware IPC mechanism might be either simple inter-processor interrupt or inter-processor interrupt with mailbox capability. To achieve portability among these platforms, the hardware IPC mechanisms are analyzed and the platform-specific characteristics data can be entered through the configuration program when building the binary executable to run on a particular platform.
Based on the design and implementation of the symmetric message passing and management mechanism, PAC DUO and OMAP35x shared memory multi-core platforms are used to conduct experiments in order to verify its functional correctness and portability. The binary executables for these platforms were built using the configuration program to enter platform-specific data values. The results from these experiments show that all processes running on the two platforms can make use of this symmetric message passing and management mechanism for exchanging messages across processor cores, and hence prove the correctness and portability.
MATERIALS AND METHODS
The symmetric message passing and management mechanism is designed with the assumption that the multi-processor or multi-core platform supports shared memory and hardware inter-processor interrupt as the hardware components of the mechanism. The hardware inter-processor interrupt may have mailbox capability which enables the interrupt signal to carry a short message of command and limited amount of data for cross-processor communication. In case of an inter-processor interrupt without mailbox capability, a small amount of the shared memory is allocated for the purpose of mailbox instead. The software part of the mechanism is designed to have four components, namely communication manager, message queue manager, message exchanging interface function module, and a configuration program. The names imply their functionality and Table 1 lists the message exchange functions in the module which are invoked by applications to deliver messages.
Based on the purposes, there are messages for the communication between the communication managers and the messages of application processes. All the message exchanges are handled by the communication manager deployed at each processor core while application processes request communication manger to deliver messages by invoking a suitable message exchange interface function. To prevent a process from waiting endlessly due to using blocking message exchange functions, such as blocked sending, blocked receiving, and send-and-wait-response, the communication manager is designed to check for such cases when it is running. Each waiting is associated with an attribute of time-limit so that the communication manager can intervene to abort the waiting after a long enough time has elapsed.
The configuration program plays the role of achieving portability. It is designed to help enter platform-specific data values of hardware parameters in order to build the binary executable of the communication manager. The parameters, such as the presence of hardware mailbox and the I/O address of inter-processor interrupt, are obtained via analyzing the hardware features essential to the implementation of the mechanism. This configuration program produces a header file to be included as part of the source program code of the communication manager.
RESULTS AND DISCUSSION
TI’s heterogeneous multi-core platform OMAP35x and ITRI’s heterogeneous multi-core platform PAC DUO are employed for functional and Portability testing in the present paper. The functional test is divided into two parts, namely user call function such as: query send, non-blocking receive, send and wait and send response; and underlying features of Symmetric message passing and management mechanism, such as: IPC Manager, message queue storage and management mechanism, handling mechanism for endless wait of processes and message return mechanisms for functional testing. Regarding Portability verification, output configuration files from an interface program for user development platform hardware environment configuration provided in the present paper after setting corresponding parameters, compile them respectively to generate corresponding executable files, and load them into PAC DUO and OMAP35x for the aforementioned functional testing. The final test results show that the processes running on the two platforms can exchange messages between cores in accordance with the functions designed in the present paper, which proves the feasibility and Portability of the mechanism proposed in the present paper.
CONCLUSIONS
The design of this portable symmetric message passing and management mechanism is implemented using C programming language for Linux operating system and C/OS-II real-time kernel. It is tested for functional correctness and portability by the experiments using two shared memory multi-core platforms, namely PAC DUO and OMAP35x. PAC DUO is a triple-core SOC which contains one ARM processor core and two DSP processor cores developed by ITRI and provides hardware mailbox mechanism as the communication media between the processor cores. OMAP35x is a dual-core SOC of an ARM processor core and a DSP processor core, which is one of the popular embedded system platform products of Texas Instruments and provides shared memory and hardware inter-processor interrupts as the communication media between processor cores.
While the portability can be demonstrated through entering platform-specific data values using the configuration program and building the binary executable, the experiments of functional tests are divided into two groups: the message exchanging function tests and the management function tests. The former includes invoking cross-processor message transmission functions from applications, such as functions of non-blocking send and receive, blocking send and receive, query send, send and wait, send response. The later includes handling message exchanges between the communication managers on both sides of the hardware IPC mechanism and handling potentially endless waiting of application processes, in addition to the management functions in delivering messages to applications. All the results from the experiments are satisfactory and thus prove the functional correctness as well as the portability.
|
author2 |
Jing Chen |
author_facet |
Jing Chen Shu-LinChu 朱書麟 |
author |
Shu-LinChu 朱書麟 |
spellingShingle |
Shu-LinChu 朱書麟 The Design and Implementation of Portable Symmetric Message Passing and Management Mechanism for Shared Memory Multi-Processor Architecture |
author_sort |
Shu-LinChu |
title |
The Design and Implementation of Portable Symmetric Message Passing and Management Mechanism for Shared Memory Multi-Processor Architecture |
title_short |
The Design and Implementation of Portable Symmetric Message Passing and Management Mechanism for Shared Memory Multi-Processor Architecture |
title_full |
The Design and Implementation of Portable Symmetric Message Passing and Management Mechanism for Shared Memory Multi-Processor Architecture |
title_fullStr |
The Design and Implementation of Portable Symmetric Message Passing and Management Mechanism for Shared Memory Multi-Processor Architecture |
title_full_unstemmed |
The Design and Implementation of Portable Symmetric Message Passing and Management Mechanism for Shared Memory Multi-Processor Architecture |
title_sort |
design and implementation of portable symmetric message passing and management mechanism for shared memory multi-processor architecture |
publishDate |
2014 |
url |
http://ndltd.ncl.edu.tw/handle/39905640901602751669 |
work_keys_str_mv |
AT shulinchu thedesignandimplementationofportablesymmetricmessagepassingandmanagementmechanismforsharedmemorymultiprocessorarchitecture AT zhūshūlín thedesignandimplementationofportablesymmetricmessagepassingandmanagementmechanismforsharedmemorymultiprocessorarchitecture AT shulinchu gòngxiǎngjìyìtǐduōchùlǐqìjiàgòukěxiéduìchēngshìxùnxīchuándìyǔguǎnlǐjīzhìzhīshèjìyǔshízuò AT zhūshūlín gòngxiǎngjìyìtǐduōchùlǐqìjiàgòukěxiéduìchēngshìxùnxīchuándìyǔguǎnlǐjīzhìzhīshèjìyǔshízuò AT shulinchu designandimplementationofportablesymmetricmessagepassingandmanagementmechanismforsharedmemorymultiprocessorarchitecture AT zhūshūlín designandimplementationofportablesymmetricmessagepassingandmanagementmechanismforsharedmemorymultiprocessorarchitecture |
_version_ |
1718087757334577152 |
spelling |
ndltd-TW-102NCKU56521092015-10-14T00:12:48Z http://ndltd.ncl.edu.tw/handle/39905640901602751669 The Design and Implementation of Portable Symmetric Message Passing and Management Mechanism for Shared Memory Multi-Processor Architecture 共享記憶體多處理器架構可攜對稱式訊息傳遞與管理機制之設計與實作 Shu-LinChu 朱書麟 碩士 國立成功大學 電腦與通信工程研究所 102 SUMMARY Multi-processor or multi-core architecture has become a common feature in modern embedded system products. While the architecture helps improve system performance, one very important issue that can not be overlooked is the inter-process communication (IPC) which concerns processes running on the same processor as well as running on different processors. In this study, a portable symmetric message passing and management mechanism suitable for shared memory multi-processor architecture is designed and implemented. The main goal is supporting message exchange across processor cores in various contexts while achieving portability among shared memory multi-processor or multi-core platforms of similar architectures but equipped different IPC mechanisms so that cross-processor synchronization and co-operation between processes can be realized. The symmetric message passing and management mechanism provides not only essential functionality of sending and receiving messages in both synchronous and asynchronous manners, but also supports functions of receiving message from specific processor core or process, querying the subsequent status of message asynchronously sent, and returning status code of function invocation. Regarding the issue that process might be trapped in the state of endless waiting due to sending or receiving message synchronously, a handling mechanism based on the concept of time-limit is provided. To address the portability issue, the differences in hardware IPC commonly available in multi-core platforms are analyzed and considered their characteristics as the parameters needed in building the binary executable for a platform. A user-friendly configuration program is implemented to help enter the platform-specific parameters when building the binary executable to run on a particular platform. PAC DUO and OMAP35x shared memory multi-core platforms are used to conduct experiments in verifying the functionality and portability of this design and implementation. The experiment results show that all processes running on the two platforms can make use of this symmetric message passing and management mechanism for exchanging messages across processor cores, and prove the correctness of the functionality. Further, the binary executables for these platforms were built using the configuration program during conducting the experiments. Therefore, those results of the experiments also demonstrate the portability. Key words: Shared Memory Multi-Processor Architecture, Symmetric Message Passing and Management Mechanism, Portability, PAC Duo, OMAP35x INTRODUCTION Multi-processor or multi-core architecture has become a common feature in modern embedded system products. The trend is deploying SOC (System-On-a-Chip) as the main hardware component in which two or more processor cores, which are not necessarily of the same type, are put into one single silicon chip. OMAP and DaVinci are well-known examples and both are composed of an ARM9 core and a DSP (Digital Signal Processing) core to form a platform of chip-level heterogeneous multi- processor architecture. Typically, the platform consists of one GPP (General Purpose Processor) and one or more SPP (Special purpose Processor) to co-operate, in addition to performing their dedicated functions. Such a configuration of multiple processor cores has been used in many consumer embedded system products. While embedded system products based on multi-processor or multi-core architecture can effectively meet the requirements imposed from some possibly conflicting restrictions, such as high performance and low cost, the architecture of chip-level heterogeneous multi-processor not only brings new challenges but also increases complexity in developing embedded software. One very important issue that can not be overlooked is the inter-process communication (IPC) which concerns processes running on the same processor as well as running on different processors. The general requirement is that processes can communicate through exchanging messages or sharing data. In this study, a portable symmetric message passing and management mechanism suitable for shared memory multi-processor architecture is designed and implemented. The main goal is supporting application process to exchange messages across processor cores in various contexts while achieving portability among shared memory multi-processor or multi-core platforms of similar architectures but equipped different IPC mechanisms in order to help realize cross- processor synchronization and co-operation between processes. The symmetric message passing and management mechanism consists of four main components in addition to the desirable hardware IPC supports, namely process communication manager, message queue manager, message exchanging interface function module, and the configuration program. In supporting exchanging messages across processor cores, it provides not only essential functionality of sending and receiving messages in both synchronous and asynchronous manners, but also supports functions of receiving message from specific processor core or process, querying the status of an asynchronously sent message, and returning status code of function invocation. In case that process might be blocked and trapped in the state of endless waiting due to sending or receiving message synchronously, a handling mechanism based on the concept of time-limit is provided. The shared memory multi-processor architecture considered in this study mainly, but not necessarily, are heterogeneous multi-processor or multi-core architecture in which at least both shared memory of UMA (Uniform Memory Access) and hardware IPC mechanism are supported. The hardware IPC mechanism might be either simple inter-processor interrupt or inter-processor interrupt with mailbox capability. To achieve portability among these platforms, the hardware IPC mechanisms are analyzed and the platform-specific characteristics data can be entered through the configuration program when building the binary executable to run on a particular platform. Based on the design and implementation of the symmetric message passing and management mechanism, PAC DUO and OMAP35x shared memory multi-core platforms are used to conduct experiments in order to verify its functional correctness and portability. The binary executables for these platforms were built using the configuration program to enter platform-specific data values. The results from these experiments show that all processes running on the two platforms can make use of this symmetric message passing and management mechanism for exchanging messages across processor cores, and hence prove the correctness and portability. MATERIALS AND METHODS The symmetric message passing and management mechanism is designed with the assumption that the multi-processor or multi-core platform supports shared memory and hardware inter-processor interrupt as the hardware components of the mechanism. The hardware inter-processor interrupt may have mailbox capability which enables the interrupt signal to carry a short message of command and limited amount of data for cross-processor communication. In case of an inter-processor interrupt without mailbox capability, a small amount of the shared memory is allocated for the purpose of mailbox instead. The software part of the mechanism is designed to have four components, namely communication manager, message queue manager, message exchanging interface function module, and a configuration program. The names imply their functionality and Table 1 lists the message exchange functions in the module which are invoked by applications to deliver messages. Based on the purposes, there are messages for the communication between the communication managers and the messages of application processes. All the message exchanges are handled by the communication manager deployed at each processor core while application processes request communication manger to deliver messages by invoking a suitable message exchange interface function. To prevent a process from waiting endlessly due to using blocking message exchange functions, such as blocked sending, blocked receiving, and send-and-wait-response, the communication manager is designed to check for such cases when it is running. Each waiting is associated with an attribute of time-limit so that the communication manager can intervene to abort the waiting after a long enough time has elapsed. The configuration program plays the role of achieving portability. It is designed to help enter platform-specific data values of hardware parameters in order to build the binary executable of the communication manager. The parameters, such as the presence of hardware mailbox and the I/O address of inter-processor interrupt, are obtained via analyzing the hardware features essential to the implementation of the mechanism. This configuration program produces a header file to be included as part of the source program code of the communication manager. RESULTS AND DISCUSSION TI’s heterogeneous multi-core platform OMAP35x and ITRI’s heterogeneous multi-core platform PAC DUO are employed for functional and Portability testing in the present paper. The functional test is divided into two parts, namely user call function such as: query send, non-blocking receive, send and wait and send response; and underlying features of Symmetric message passing and management mechanism, such as: IPC Manager, message queue storage and management mechanism, handling mechanism for endless wait of processes and message return mechanisms for functional testing. Regarding Portability verification, output configuration files from an interface program for user development platform hardware environment configuration provided in the present paper after setting corresponding parameters, compile them respectively to generate corresponding executable files, and load them into PAC DUO and OMAP35x for the aforementioned functional testing. The final test results show that the processes running on the two platforms can exchange messages between cores in accordance with the functions designed in the present paper, which proves the feasibility and Portability of the mechanism proposed in the present paper. CONCLUSIONS The design of this portable symmetric message passing and management mechanism is implemented using C programming language for Linux operating system and C/OS-II real-time kernel. It is tested for functional correctness and portability by the experiments using two shared memory multi-core platforms, namely PAC DUO and OMAP35x. PAC DUO is a triple-core SOC which contains one ARM processor core and two DSP processor cores developed by ITRI and provides hardware mailbox mechanism as the communication media between the processor cores. OMAP35x is a dual-core SOC of an ARM processor core and a DSP processor core, which is one of the popular embedded system platform products of Texas Instruments and provides shared memory and hardware inter-processor interrupts as the communication media between processor cores. While the portability can be demonstrated through entering platform-specific data values using the configuration program and building the binary executable, the experiments of functional tests are divided into two groups: the message exchanging function tests and the management function tests. The former includes invoking cross-processor message transmission functions from applications, such as functions of non-blocking send and receive, blocking send and receive, query send, send and wait, send response. The later includes handling message exchanges between the communication managers on both sides of the hardware IPC mechanism and handling potentially endless waiting of application processes, in addition to the management functions in delivering messages to applications. All the results from the experiments are satisfactory and thus prove the functional correctness as well as the portability. Jing Chen 陳敬 2014 學位論文 ; thesis 121 zh-TW |