File process_manager.hpp

Tools to fix the CPU to specific processor.

Author

Maximilien Naveau (maximilien.naveau@gmail.com)

Copyright

Copyright (c) 2019, New York University and Max Planck Gesellschaft.

Date

2019-05-06

namespace real_time_tools

Functions

bool fix_current_process_to_cpu(std::vector<int> &cpu_affinities, int pid)

Pin an executing process to a specific CPU in order to avoid jumps between CPUs.

Return

true if everything went well.

Return

false otherwise

Parameters
  • cpu_affinities: is the index of the CPU one wants to pin the process on.

  • pid: is the PID of the current process.

bool set_cpu_dma_latency(int max_latency_us)

Set the _cpu_dma_latency objectWe can set the maximum CPU latency for processes in micro seconds.

Return

true if everything went well.

Return

false if something went wrong.

Parameters
  • max_latency_us: is the maximum latency in micro-seconds.