Operating System Process and Thread Migration in Heterogeneous Platforms

Operating System Process and Thread Migration in Heterogeneous Platforms

Operating System Process and Thread Migration in Heterogeneous Platforms Robert Lyerly, Antonio Barbalace, Christopher Jelesnianski Vincent Legout, Anthony Carno, Binoy Ravindran Dept. of Electrical and Computer Engineering Virginia Tech, Virginia, USA {rlyerly, antoniob, bielsk1, vlegout, acarno, binoy}@vt.edu ABSTRACT and optimizing sharing to reduce hardware overheads. Parallel and heterogeneous computing are here to stay. More- Heterogeneous Programming. The common practice over, diverse computational units are increasingly tighter- in heterogeneous platforms is to start the application on the integrated in emerging heterogeneous platforms, sharing ac- main processor (CPU) and during execution, offload parts cess to the memory bus. We argue that the traditional way of the application to a specific accelerator (e.g., GPU) that we use heterogeneous platforms is obsolete. We propose new atomically executes a computation and returns the result. system software that enables programming these platforms Offloading requires providing the remote processor with the as if they were an SMP, via the multi-threaded shared- code to be executed and the data on which it has to operate; memory programming model. Using this model provides in most architectures this requires a data copy. This com- better programmability, flexibility, and exploitability. We putational model is acceptable for devices that provide lim- first provide an overview of the state transformation problem ited control (non general-purpose), e.g., present-day GPUs. when migrating a thread between different-ISA processors. However, forcing the execution flow to return to the source We then propose, build and evaluate a series of offline and processor at the end of each offloaded function is too rigid for runtime mechanisms that implement our design on top of emerging heterogeneous platforms [8]. In CPU/CPU plat- Popcorn Linux ARM/x86. Results show that the overheads forms, the application can gain advantages by freely migrat- are minimal, thus proving the viability of our architecture. ing between processors – execution migration on CPU/CPU platforms has been shown to enable better performance [8, 17] and lower power consumption [13, 42] 1. INTRODUCTION Contributions. Due to these trends, we argue that with increasingly heterogeneous and tighter-integrated platforms Heterogeneous computing platforms are now ubiquitous, offloading should be substituted by execution migration. Hence, powering systems from mobile devices to servers, and are this paper introduces a system software architecture for pro- here to stay [40]. Similar to parallel computing, heteroge- cess and thread migration in a multiple-kernel operating sys- neous computing strictly depends on software to fully ex- tem (e.g., [7, 9]), atop OS-capable heterogeneous-ISA pro- ploit the hardware, complicating programming these sys- cessors. Similarly to traditional SMP OSs, threads migrate tems. Hence, in this paper we advocate system software among processors of different ISAs without any restriction. that improves the programmability of emerging heteroge- Therefore, we extend the multi-threaded shared memory neous platforms. Specifically, we propose OS and compiler programming model to heterogeneous platforms. We fur- mechanisms that enable the shared memory multi-threading thermore identify and evaluate the required system software programming model on such platforms, and thus process and mechanisms. This software design exploits a replicated- thread migration among ISA-diverse processors. kernel OS which provides atomic operating system services [21] Architectures Landscape. CPU/GPU setups are by for thread migration. A prototype has been built atop Pop- far the most popular heterogeneous platform. However, new corn Linux on an ARM/x86 platform. We choose these two platforms deploying heterogeneous CPUs have begun to en- ISAs due to their popularity in today’s server market and ter the market, e.g., ARM big.LITTLE [38], Intel Xeon and for their remarkable differences [13]. Note that this work Xeon Phi [25], and x86 and ARM [31, 13]. In heterogeneous does not address scheduling in these systems, but instead CPU/CPU platforms, each processor is general purpose and focuses on the mechanisms required for migration. able to run an operating system (OS-capable [31]). Pro- In Section 2 we survey the design space of the software cessors in heterogeneous computing platforms are becoming for heterogeneous-ISA platforms, in Section 3 we describe increasingly tightly-coupled [2, 38, 29, 3], i.e., they are in- the state transformation problem, and in Section 4 we in- terconnected through the memory bus, and therefore share troduce our system software architecture, which implements memory which can be cache-coherent. Although platform- a specific solution in the design space. Section 5 discusses wide shared memory is a definite trend [20, 22], cache-coherency our implementation and Section 6 reports the costs of some has been pinpointed as a fundamental issue hampering scal- of the proposed mechanisms. Section 7 concludes. ability to higher core counts [9, 15], opening the way to soft- ware programmed coherency [11, 33]. To exploit emerging heterogeneous platforms, applications should be able to use 2. HETEROGENEOUS PLATFORMS all available processor resources by seamlessly running across Heterogeneous platforms are historically built with mul- different processors to exploit diversity and by mapping data tiple processors (e.g., a CPU and GPU), each of which has its own memory. These platforms increasingly resemble dis- The space of possible solutions includes two dimensions: tributed systems, and previous works [10, 27] proposed ap- data storage format and data sharing. In the data storage plying distributed systems principles to heterogeneous plat- format dimension, data is either stored in a common for- forms. In particular, message passing has been advocated as mat or data is dynamically converted between ABIs at run- a way to hide diversity and enable scalability. However, it time. In the data sharing dimension, threads either share is unclear how programmers will be able to efficiently utilize all data (and therefore all program data), or no data is emerging platforms with such a software architecture. shared and replication is required, necessitating consistency Programming Models. Most application software for via message-passing. In this design space there are three so- heterogeneous platforms uses one of two programming mod- lutions often used today: shared everything using a common els for execution. Message-Passing, popular in distributed format (e.g., SMP multithreaded software), shared nothing systems, uses hard-coded communication channels to share using a custom format (e.g., the Internet), and shared noth- data between multiple processes, each of which may be exe- ing using a common format (e.g., PGAS models in a cluster). cuting on a different ISA. Data is transferred between pro- Execution on heterogeneous processors requires data con- cesses at programmer-defined intervals and in pre-agreed for- version. The knowledge for conversion can be either embed- mats. Additionally, the mapping of processes to processors ded in the code by the compiler (e.g., a common format and is done only at application startup and does not change dur- application layout), or retrieved at runtime through meta- ing execution. Code Offloading is widespread in single-node data lookup [37]. The former has less runtime overhead than heterogeneous platforms. Similarly to message-passing, of- the latter, but potentially limits architecture-specific opti- floading requires the developer to decouple an application mization. A middle-ground solution can retain performance into multiple execution environments with hard-coded data benefits while allowing execution flexibility. transfer points and pre-agreed data formats. Offloaded ex- ecution runs to completion and cannot be interrupted or 2.2 Level of Abstraction migrated. However, offloading differs from message-passing In a heterogeneous platform, data sharing and conversion in that code is passed along with data to processors. Nei- can be implemented at any level of the software stack – ther programming model provides the flexibility of shared- where should data sharing and conversion fit into the soft- memory, which allows applications to migrate among avail- ware stack to best enhance efficiency and programmability? able processors at any time according to a scheduler policy, Two main approaches have been proposed in the literature thus enhancing execution flexibility. for heterogeneous and homogeneous systems. System Software. Traditional system software for het- Application. As mentioned before, applications are tra- erogeneous platforms moves the burden of handling diver- ditionally the main users of platform heterogeneity (although sity outside the OS while providing minimal system abstrac- several works have explored accelerator usage in kernel space [39]). tions to communicate with remote processors (e.g., devices Seminal work from Attardi et al. [4] advocated for user- in Linux). Each set of different-ISA processors runs a dis- space process migration among heterogeneous processors, tinct and independent operating system. Hence, recent re- which was implemented by Smith and Hutchinson in the search in system software proposes tightly coupling distinct TUI system [37]. The TUI system implements a shared execution environments [9, 23, 31, 6], even if they are not nothing model with full state conversion when an applica-

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us