BehaviorTree.CPP: Task Planning for Robots and Virtual Agents
We need a system Orchestrator to implement the robot behaviorRobot Behaviors This Coordinator or Task Planner is also the highest level of abstraction of our system, where we focus on WHAT the robot0 码力 | 59 页 | 7.97 MB | 5 月前3Rethinking Task Based Concurrency and Parallelism for Low Latency C++
used when we created them.” - Albert EinsteinSo what is there to Rethink?Rethinking: Task Queues Problem #1 - Task Queues Do Not Scale Well: ● Contention: ○ Even the most meticulously designed lock-free problems: ○ Task starvation ○ Load balancing ○ Forfeits strict FIFO behaviour ○ Increases memory footprint (or requires allocations) ○ Terrible task selection “fairness” Task Thread Thread Thread Task Task Task Task Task Task Task Task Back Front Task Queue Execute Task() Thread Thread PoolRethinking: Task Queues Problem #2 - No Inherent Support For Prioritization: ● Priority queues address this but0 码力 | 142 页 | 2.80 MB | 5 月前3Taro: Task graph-based Asynchronous Programming Using C++ Coroutine
behind Taro • Learn to use the Taro C++ programming model • Dive into the Taro’s coroutine-aware scheduling algorithm • Evaluate Taro on microbenchmarks and a real-world application • Conclusion 2Agenda coroutine-aware scheduling algorithm • Evaluate Taro on microbenchmarks and a real-world application • Conclusion 3• TGPS encapsulates function calls and their dependencies in a top-down task graph What What is Task Graph-based Programming System (TGPS) Code 4• TGPS encapsulates function calls and their dependencies in a top-down task graph What is Task Graph-based Programming System (TGPS) Code0 码力 | 84 页 | 8.82 MB | 5 月前3From Eager Futures/Promises to Lazy Continuations: Evolving an Actor Library Based on Lessons Learned from Large-Scale Deployments
actors (2) libprocess (3) revisiting the problem (4) evolution of libprocess (5) eventuals (6) scheduling (7) streams (8) type erasurechapters (1) motivating futures/promises + actors (2) libprocess libprocess (3) revisiting the problem (4) evolution of libprocess (5) eventuals (6) scheduling (7) streams (8) type erasurekey challenges we’ve faced building distributed systems with good performance actors (2) libprocess (3) revisiting the problem (4) evolution of libprocess (5) eventuals (6) scheduling (7) streams (8) type erasurechapters (1) motivating futures/promises + actors (2) libprocess0 码力 | 264 页 | 588.96 KB | 5 月前3Back to Basics: Concurrency
projects, etc. ● Our brains (i.e., human cpus) however tend to perform best when we can focus on one task at a time ○ (e.g., I am unable to code and listen to music with any lyrics...unfortunately) Thinking machines So--does our hardware support concurrency? Yes! Each core can be working on a separate task. (Note: A single core can also handle concurrency)(Quick Examples) X-Box One ● Yes, the hardware threads work with data? 681000 threads working together (1/4) 69 ● Assume you have some shared task: ○ Perhaps 1000 threads counting the sizes of files in a directory to find the total bytes of the0 码力 | 141 页 | 6.02 MB | 5 月前3C++ Memory Model: from C++11 to C++23
Dathskovsky | alex.dathskovsky@speedata.io | www.linkedin.com/in/alexdathskovsky OOO Execution : Dynamic Scheduling • instruction fetched • instruction dispatched to instruction que • The instruction waits in fileAlex Dathskovsky | alex.dathskovsky@speedata.io | www.linkedin.com/in/alexdathskovsky Dynamic Scheduling • Check for structural hazards • an instruction can be issued iff a functional unit is available availableAlex Dathskovsky | alex.dathskovsky@speedata.io | www.linkedin.com/in/alexdathskovsky Dynamic Scheduling • Check for data hazards • an instruction can be executed when its operands have been calculated0 码力 | 112 页 | 5.17 MB | 5 月前3Building bridges: Leveraging C++ and ROS for simulators, sensor data and algorithms
calls, such as fprintf, fwrite • Non-deterministic execution • Controlling memory usage • Controlling task execution Deterministic resource usage and runtime is necessary for a safety-critical system Dynamic RTOS-specific properties such as CPU affinity, scheduling priority, and thread distribution • Providing synchronization primitives that are preemptive, and have scheduling priorities set • Providing various other is work to be done • Can be timers, subscribers, clients, services, or file descriptors Execution task combines items and their triggering events • Can have a single item, a chain of items, or a graph0 码力 | 38 页 | 2.17 MB | 5 月前3Combining Co-Routines and Functions into a Job System
queuesHelmut Hlavacs – Combining Co-Routines and Functions into a Job System - CppCon 2021 11 / 39 Tagged Scheduling 1 2 //Phase 1 schedule(f()); schedule(g(), tag_t{2}); //Phase 2 schedule(tag_t{2}); //schedule 1 global queue per thread, tagged scheduling • Allocate from heap or memory resource • Log performance and visualize in Google Chrome chrome://tracing/ • Scheduling jobs • schedule(…) • continuation(…) Hlavacs – Combining Co-Routines and Functions into a Job System - CppCon 2021 13 / 39 void thread_task() noexcept { //initialize… while (!m_terminate) { //Run until the job system is terminated m_current_job0 码力 | 39 页 | 1.23 MB | 5 月前3Performance Engineering: Being Friendly to Your Hardware
PRE wait • One row active at a time • All rows need to be refreshed periodically • Request scheduling • Row size != page sizeMemory 25 ACT Row Column RD/WR wait wait data PRE wait • Usable Allocation Scheduling ROM Cache L1I • Not all operations are equal • Not all combinations of operations are equalExecution 54 Branching Fetch Decode Queue Allocation Scheduling Execution • Cycles • Latency vs throughputRetirement 55 Branching Fetch Decode Queue Allocation Scheduling Execution ROM Cache L1I L1D LSQ Retirement • All operations until now are speculative •0 码力 | 111 页 | 2.23 MB | 5 月前3cppcon 2021 safety guidelines for C parallel and concurrency
pattern) The rule intention is to avoid common errors, which might be introduced if common concurrency task is being reproduced with less care Is it easy to detect via review? • via careful understanding of not interact The Old World vs. The New ● Traditionally, automotive systems rely on static scheduling ● Each task is given a predetermined time slice in the schedule for execution ● The complete schedule module layer. ⇒ Component interaction across cores is minimized The Old World vs. The New ● Static scheduling works well only if the number of components is small or the interaction between components is0 码力 | 52 页 | 3.14 MB | 5 月前3
共 100 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
相关搜索词
BehaviorTreeCPPTaskPlanningforRobotsandVirtualAgentsRethinkingBasedConcurrencyParallelismLowLatencyC++TarographbasedAsynchronousProgrammingUsingCoroutineFromEagerFuturesPromisestoLazyContinuationsEvolvinganActorLibraryonLessonsLearnedfromLargeScaleDeploymentsBackBasicsMemoryModel1123BuildingbridgesLeveragingROSsimulatorssensordataalgorithmsCombiningCoRoutinesFunctionsintoJobSystemPerformanceEngineeringBeingFriendlyYourHardwarecppcon2021safetyguidelinesparallelconcurrency