A Collaborative National Center for Fusion & Plasma Research

NSTX-U Advances in Real-time C++11 on Linux

Programming languages like C and Ada combined with proprietary embedded operating systems have dominated the realtime application space for decades.  The new C++11 standard includes native, language-level support for concurrency, a requirement for any event-oriented realtime software.  Threads, Locks, and Atomics now exist to provide the necessary tools to build the structures that make up the foundation of a complex realtime system.  The National Spherical Torus Experiment Upgrade (NSTX-U) at the Princeton Plasma Physics Laboratory (PPPL) is breaking new ground with the language as applied to the needs of fusion devices.  A new Digital Coil Protection System (DCPS) will serve as the main protection mechanism for the magnetic coils, and it is written entirely in C++11 running on Concurrent Computer Corporation’s realtime operating system, RedHawk Linux.  It runs over 600 algorithms in a 5kHz control loop that determine whether or not to shut down operations before physical damage occurs.  To accomplish this, NSTX-U engineers developed software tools that do not currently exist elsewhere, including two methods of realtime atomic synchronization, realtime schedulers, and a realtime logging framework.  Together with a recent (and carefully configured) version of the GCC compiler, these tools enable data acquisition, processing, and output using a conventional operating system to meet a hard realtime deadline (that is, missing one periodic is a failure) of 200 microseconds.


U.S. Department of Energy
Princeton Plasma Physics Laboratory is a U.S. Department of Energy national laboratory managed by Princeton University.

Website suggestions and feedback

Google+ · Pinterest · Instagram · Flipboard

PPPL is ISO-14001 certified

Princeton University Institutional Compliance Program

Privacy Policy

© 2017 Princeton Plasma Physics Laboratory. All rights reserved.

Princeton University
Princeton Plasma Physics Laboratory
P.O. Box 451
Princeton, NJ 08543-0451
GPS: 100 Stellarator Road
Princeton, NJ, 08540
(609) 243-2000