A task scheduling framework designed for the needs of game developers.

Overview

maintained license language count top language

Intel Games Task Scheduler (GTS)

To the documentation.

Introduction

GTS is a C++ task scheduling framework for multi-processor platforms. It is designed to let developers express their applications in task parallelism and let the scheduling framework maximize the physical parallelism on the available processors.

Key Goals

  • Simple expression of task parallelism
  • Highly efficient scheduling
  • Easy to configure and extend

Target Audience

GTS is designed for the needs of current and future game engine developers. Typical engine developers employ a highly customized, platform-scalable task system (or job system) that provides dedicated worker threads executing thousands of concurrent tasks. These threads may also share resources with driver, networking, middleware, and video streaming threads, all working in synchronized concert to deliver glitch-free real-time rendering on 60+ frames per second (FPS) applications. Future game engines will have to cope with more threads, more tasks, and potentially multiple instruction-set-architectures (ISAs), all running on an ever-expanding hardware landscape.

We built GTS to be simple and friendly to game engine task system use cases. We want a framework that allows the game development community to experiment with and learn from different scheduling algorithms easily. We also want a framework that allows us to demonstrate state-of-the-art algorithms on task scheduling. Finally, we want to encourage games to better express parallelism so they can compute more cool stuff and enable richer PC gaming experiences!

Features

  • Easily integrate GTS into an existing game engine complete with low level platform overrides. Game engines support a wide variety of operating systems and hardware platforms, with varying degrees of custom code and work-arounds. Since GTS cannot possibly support every work-around and corner case, we have simplified engine integration by allowing the developer to completely replace the GTS platform layer through a configuration file (user_config.h).
  • Express high-level program flow with persistent, dynamic task DAGs that can be executed homogeneously or heterogeneously with the Macro-Scheduler
  • Jump right into parallelism with predefined Parallel Patterns
  • Easily communicate between threads with Parallel Containers
  • Carve up CPU resources as you see fit with the WorkerPool
  • Express low-level algorithms and highly efficient execution policies with the Micro-scheduler and Task constructs.
  • Remove bottlenecks around heap access with gts_malloc.
  • Avoid contention and kernel-mode synchronization with GTS's user-mode synchronization primitives and contention reducing constructs.
  • OS-header-free and mostly STL-free interface. GTS won't pollute your engine with unnecessary headers.




You might also like...
Task System presented in
Task System presented in "Better Code: Concurrency - Sean Parent"

task_system task_system provides a task scheduler for modern C++. The scheduler manages an array of concurrent queues A task, when scheduled, is enque

Arcana.cpp - Arcana.cpp is a collection of helpers and utility code for low overhead, cross platform C++ implementation of task-based asynchrony.

Arcana.cpp Arcana is a collection of general purpose C++ utilities with no code that is specific to a particular project or specialized technology are

Cpp-taskflow - Modern C++ Parallel Task Programming Library
Cpp-taskflow - Modern C++ Parallel Task Programming Library

Cpp-Taskflow A fast C++ header-only library to help you quickly write parallel programs with complex task dependencies Why Cpp-Taskflow? Cpp-Taskflow

EnkiTS - A permissively licensed C and C++ Task Scheduler for creating parallel programs. Requires C++11 support.
EnkiTS - A permissively licensed C and C++ Task Scheduler for creating parallel programs. Requires C++11 support.

Support development of enkiTS through Github Sponsors or Patreon enkiTS Master branch Dev branch enki Task Scheduler A permissively licensed C and C++

Jobxx - Lightweight C++ task system

jobxx License Copyright (c) 2017 Sean Middleditch [email protected] This is free and unencumbered software released into the public domain. A

C++14 coroutine-based task library for games

SquidTasks Squid::Tasks is a header-only C++14 coroutine-based task library for games. Full project and source code available at https://github.com/we

Async++ concurrency framework for C++11

Async++ Async++ is a lightweight concurrency framework for C++11. The concept was inspired by the Microsoft PPL library and the N3428 C++ standard pro

An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.
An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.

What is SObjectizer? What distinguishes SObjectizer? SObjectizer is not like TBB, taskflow or HPX Show me the code! HelloWorld example Ping-Pong examp

Comments
  • Tasks never call destructor for emplaced data

    Tasks never call destructor for emplaced data

    Hi :)

    Thank you for sharing this library.

    Maybe I'm missing something, but it looks like emplaced data for tasks never get their destructors called. This causes memory leaks or, even worse issues if destructors are used for important logic. As the code calls constructors for the data, I was assuming the same will happen with destructors.

    If it's designed to avoid handling destructors, maybe addition of a static assert with std::is_trivially_destructible would help to avoid issues.

    If it is a bug or missing code, I think it should be possible to store the data with an additional pointer to a destructor function to resolve the ambiguity of the type, or add a new interface to explicitly call the destructor and an assert to guard when this call is missing for types with non trivial destructors.

    After some quick changes in my code, both approach are working fine here.

    opened by LuisAntonRebollo 7
  • Fixes some issues by PVS-Studio static code analyzer

    Fixes some issues by PVS-Studio static code analyzer

    First, thank you for scheduler and especially for research links on Intel article page! Saw a lot of implementations, but it is hard to understand what is going on without solid theoretical foundation.

    Second, code quality is really high. This is rare case i can read and understand underlying data structures and algorithms. Nice job!

    Third, I've a habit to run some static code analyzers before using some interesting project as my one dependency. So PVS-Studio + MSVC integrated static analyzer found some suspicious places. Could you please, take a look?

    Product page: https://www.viva64.com/en/pvs-studio/ How to use for free (almost): https://www.viva64.com/en/b/0600/

    opened by dimhotepus 1
  • Implicit destructor for Task's data when type is not trivially destructible

    Implicit destructor for Task's data when type is not trivially destructible

    As performance of Task's data destructors can be a problem, i tried to find a way to reduce the cost and use it only when types required it.

    The main idea is to inline the task execution code in a wrapper together with the code for destruction, in this way we dont need to add any additional indirect function call.

    Note this PR is mostly for discussion about the idea, as i feel i have not sufficient knowledge on how GTS works.

    Note: Use lambdas for the task function only will work with c++20.

    Sorry, if I'm missing some important detail and the idea is failing :P

    opened by LuisAntonRebollo 1
  • Debug code to assert Task's data destructor are called when type is non trivially destructible.

    Debug code to assert Task's data destructor are called when type is non trivially destructible.

    A different idea related the data destructors.

    This code only works when GTS_ASSERT are enabled, in this way the performance in release in not affected.

    The new asserts ensure Task::destructData will be called before any other data initialization or Task destruction.

    Note: this PR is mostly for discussion about the idea, as i feel i have not sufficient knowledge on how GTS works.

    opened by LuisAntonRebollo 0
Owner
null
A library for enabling task-based multi-threading. It allows execution of task graphs with arbitrary dependencies.

Fiber Tasking Lib This is a library for enabling task-based multi-threading. It allows execution of task graphs with arbitrary dependencies. Dependenc

RichieSams 788 Nov 18, 2022
Sqrt OS is a simulation of an OS scheduler and memory manager using different scheduling algorithms including Highest Priority First (non-preemptive), Shortest Remaining Time Next, and Round Robin

A CPU scheduler determines an order for the execution of its scheduled processes; it decides which process will run according to a certain data structure that keeps track of the processes in the system and their status.

null 10 Sep 7, 2022
Operating system project - implementing scheduling algorithms and some system calls for XV6 OS

About XV6 xv6 is a modern reimplementation of Sixth Edition Unix in ANSI C for multiprocessor x86 and RISC-V systems. It was created for pedagogical p

Amirhossein Rajabpour 22 Oct 24, 2022
Bistro: A fast, flexible toolkit for scheduling and running distributed tasks

Bistro is a flexible distributed scheduler, a high-performance framework supporting multiple paradigms while retaining ease of configuration, management, and monitoring.

Facebook 1.1k Nov 19, 2022
Px - Single header C++ Libraries for Thread Scheduling, Rendering, and so on...

px 'PpluX' Single header C++(11/14) Libraries Name Code Description px_sched px_sched.h Task oriented scheduler. See more px_render px_render.h Multit

PpluX 450 Nov 25, 2022
Scheduler - Modern C++ Scheduling Library

Scheduler Modern C++ Header-Only Scheduling Library. Tasks run in thread pool. Requires C++11 and ctpl_stl.h in the path. Inspired by the Rufus-Schedu

Spencer Bosma 228 Dec 5, 2022
A General-purpose Parallel and Heterogeneous Task Programming System

Taskflow Taskflow helps you quickly write parallel and heterogeneous tasks programs in modern C++ Why Taskflow? Taskflow is faster, more expressive, a

Taskflow 7.5k Nov 28, 2022
A hybrid thread / fiber task scheduler written in C++ 11

Marl Marl is a hybrid thread / fiber task scheduler written in C++ 11. About Marl is a C++ 11 library that provides a fluent interface for running tas

Google 1.4k Nov 29, 2022
A header-only C++ library for task concurrency

transwarp Doxygen documentation transwarp is a header-only C++ library for task concurrency. It allows you to easily create a graph of tasks where eve

Christian Blume 591 Nov 23, 2022
A General-purpose Parallel and Heterogeneous Task Programming System

Taskflow Taskflow helps you quickly write parallel and heterogeneous task programs in modern C++ Why Taskflow? Taskflow is faster, more expressive, an

Taskflow 7.5k Dec 1, 2022