Efficient Implementation of Application-Aware Spinlock Control in MPSoCs

Spinlocks are a common technique in Multi-Processor Systems-on-Chip (MPSoCs) to protect shared resources and prevent data corruption. Without a priori application knowledge, the control of spinlocks is often highly random which can degrade the system performance significantly. To improve this, a centralized control mechanism for spinlocks is proposed in this paper, which utilizes application-specific information during spinlock control. The complete control flow is presented, which starts from integrating high-level user-defined information down to a low-level realization of the control. An Application-Specific Instruction-set Processor (ASIP) called OSIP, which was originally designed for task scheduling and mapping, is extended to support this mechanism. The case studies demonstrate the high efficiency of the proposed approach and at the same time highlight the efficiency and flexibility advantages of using an ASIP as the system controller in MPSoCs. DOI: 10.4018/jertcs.2013010104 International Journal of Embedded and Real-Time Communication Systems, 4(1), 64-84, January-March 2013 65 Copyright © 2013, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited. erals and to prevent data corruption, mutual exclusion needs to be guaranteed. Spinlocks are widely used to ensure that a shared resource can only be accessed by one task at a time. In literature, many studies have been carried out on the implementation of spinlocks. Most of them focus on the fairness of spinlock acquisition or the reduction of transaction costs due to repeatedly requesting the locks. However, they typically do not consider application knowledge. This leads to a random acquisition order of spinlocks. In many cases, this results in a low parallelism in task execution, and consequently worsens the system performance. A simple example is depicted in Figure 1, in which two PEs compete for the same spinlock. In the example, two different execution sequences of tasks are possible by acquiring the lock in different orders. The execution time shows that assigning the spinlock to PE2 first (Figure 1(b)) is a better choice, which achieves a higher performance. Despite its simplicity, this example shows that a smart control of spinlocks can increase the system performance. To guide the spinlock control in a smart way, application knowledge such as task sizes and task dependencies needs to be considered. In this work, experiments are done by including application knowledge into the spinlock control flow. As the application knowledge varies from one application to another, it is important to have user-defined spinlock control algorithms, which can be adapted to the application. Instead of developing yet another control unit in the system to execute userdefined algorithms, which will introduce high area cost, they can naturally be implemented on an existing system controller. However, the controller should be programmable, can e.g. be a RISC processor or an Application-Specific Instruction-set Processor (ASIP). This work uses systems with an ASIP controller as the experiment platforms. This ASIP is called OSIP, which stands for Operating System ASIP and was originally designed for task scheduling and mapping. The remainder of this paper is organized as follows. After discussing about the related work, a brief overview of OSIP-based MPSoCs is given. Next, an application-aware spinlock control flow in OSIP-based systems is introduced, which starts from the high-level integration of application knowledge down to the low-level realization. Two case studies – a synthetic application and a multimedia application (H.264 video decoding) are performed, which demonstrate the efficiency of the proposed spinlock control mechanism and highlight the advantages of using an ASIP as the system controller. Finally, a summary and an outlook are given.

[1]  Rainer Leupers,et al.  MAPS: Mapping Concurrent Dataflow Applications to Heterogeneous MPSoCs , 2013, IEEE Transactions on Industrial Informatics.

[2]  Shuming Chen,et al.  Handling shared variable synchronization in multi-core Network-on-Chips with distributed memory , 2010, 23rd IEEE International SOC Conference.

[3]  Gianluca Palermo,et al.  Efficient Synchronization for Embedded On-Chip Multiprocessors , 2006, IEEE Transactions on Very Large Scale Integration (VLSI) Systems.

[4]  Larry Rudolph,et al.  Dynamic decentralized cache schemes for mimd parallel processors , 1984, ISCA 1984.

[5]  Michael L. Scott,et al.  Algorithms for scalable synchronization on shared-memory multiprocessors , 1991, TOCS.

[6]  Luca Benini,et al.  Networks on Chips : A New SoC Paradigm , 2022 .

[7]  Theodore Johnson,et al.  A Prioritized Multiprocessor Spin Lock , 1997, IEEE Trans. Parallel Distributed Syst..

[8]  Martin Schoeberl,et al.  Hardware synchronization for embedded multi-core processors , 2011, 2011 IEEE International Symposium of Circuits and Systems (ISCAS).

[9]  Rainer Leupers,et al.  Task management in MPSoCs: An ASIP approach , 2009, 2009 IEEE/ACM International Conference on Computer-Aided Design - Digest of Technical Papers.

[10]  Thomas E. Anderson,et al.  The Performance of Spin Lock Alternatives for Shared-Memory Multiprocessors , 1990, IEEE Trans. Parallel Distributed Syst..

[11]  Jarmo Takala,et al.  Customizable Datapath Integrated Lock Unit , 2011, 2011 International Symposium on System on Chip (SoC).

[12]  Rainer Leupers,et al.  Optimized Communication Architecture of MPSoCs with a Hardware Scheduler: A System-Level Analysis , 2011, Int. J. Embed. Real Time Commun. Syst..

[13]  Soo-Ik Chae,et al.  A hardware operating system kernel for multi-processor systems , 2008, IEICE Electron. Express.

[14]  Gerhard Fettweis,et al.  Instruction Set Architecture Extensions for a Dynamic Task Scheduling Unit , 2012, 2012 IEEE Computer Society Annual Symposium on VLSI.

[15]  Chenjie Yu,et al.  Distributed and low-power synchronization architecture for embedded multiprocessors , 2008, CODES+ISSS '08.