real-time

C# Disable garbage collection for USB ReadPipe

。_饼干妹妹 提交于 2020-01-13 11:43:13
问题 I am attempting to collect data from a USB port using D3XX.NET from FTDI. The data is collected and then sent to a fast fourier transform for plotting a spectrum. This works fine, even if you miss some data. You can't tell. However, if you then want to send this data to an audio output component, you will notice data missing. This is where my problem appears to be. The data is collected and then sent to the audio device. All packets are making it within the time span needed. However, the

C# Disable garbage collection for USB ReadPipe

我只是一个虾纸丫 提交于 2020-01-13 11:42:52
问题 I am attempting to collect data from a USB port using D3XX.NET from FTDI. The data is collected and then sent to a fast fourier transform for plotting a spectrum. This works fine, even if you miss some data. You can't tell. However, if you then want to send this data to an audio output component, you will notice data missing. This is where my problem appears to be. The data is collected and then sent to the audio device. All packets are making it within the time span needed. However, the

Can't provoke Priority Inversion in C++

大城市里の小女人 提交于 2020-01-12 10:19:28
问题 I'm trying to provoke Priority Inversion on a small C++ program for demonstration purposes but I can't: The low priority thread that holds the mutex is not preempted and keeps running on the critical section. This is what I'm doing: // let's declare a global mutex pthread_mutex_t my_mutex; ... int main(int argc, char **argv) { ... pthread_t normal_thread; pthread_t prio_thread; pthread_mutexattr_t attr; pthread_mutexattr_init (&attr); pthread_mutexattr_setprotocol (&attr, PTHREAD_PRIO_NONE);

Can't provoke Priority Inversion in C++

强颜欢笑 提交于 2020-01-12 10:19:13
问题 I'm trying to provoke Priority Inversion on a small C++ program for demonstration purposes but I can't: The low priority thread that holds the mutex is not preempted and keeps running on the critical section. This is what I'm doing: // let's declare a global mutex pthread_mutex_t my_mutex; ... int main(int argc, char **argv) { ... pthread_t normal_thread; pthread_t prio_thread; pthread_mutexattr_t attr; pthread_mutexattr_init (&attr); pthread_mutexattr_setprotocol (&attr, PTHREAD_PRIO_NONE);

Can't provoke Priority Inversion in C++

两盒软妹~` 提交于 2020-01-12 10:19:12
问题 I'm trying to provoke Priority Inversion on a small C++ program for demonstration purposes but I can't: The low priority thread that holds the mutex is not preempted and keeps running on the critical section. This is what I'm doing: // let's declare a global mutex pthread_mutex_t my_mutex; ... int main(int argc, char **argv) { ... pthread_t normal_thread; pthread_t prio_thread; pthread_mutexattr_t attr; pthread_mutexattr_init (&attr); pthread_mutexattr_setprotocol (&attr, PTHREAD_PRIO_NONE);

Real time linux : disable local timer interrupts

故事扮演 提交于 2020-01-12 08:13:13
问题 TL;DR : Using linux kernel real time with NO_HZ_FULL I need to isolate a process in order to have deterministic results but /proc/interrupts tell me there is still local timer interrupts (among other). How to disable it? Long version : I want to make sure my program is not being interrupt so I try to use a real time linux kernel. I'm using the real time version of arch linux (linux-rt on AUR) and I modified the configuration of the kernel to selection the following options : CONFIG_NO_HZ_FULL

Real time linux : disable local timer interrupts

给你一囗甜甜゛ 提交于 2020-01-12 08:13:09
问题 TL;DR : Using linux kernel real time with NO_HZ_FULL I need to isolate a process in order to have deterministic results but /proc/interrupts tell me there is still local timer interrupts (among other). How to disable it? Long version : I want to make sure my program is not being interrupt so I try to use a real time linux kernel. I'm using the real time version of arch linux (linux-rt on AUR) and I modified the configuration of the kernel to selection the following options : CONFIG_NO_HZ_FULL

How to coordinate threads properly based on a fixed cycle frequency?

大城市里の小女人 提交于 2020-01-11 13:01:18
问题 I want to create a gateway to pass messages from a can bus and lcm and vice-versa. If a message in lcm is sent at a specific frequency, its copy on the can bus should be sent at the exact same frequency. How would you solve this? In my mind I thought about two threads, one for each direction converting the message from one system to another in a loop. The two threads are coordinated by a timer which is set to a frequency which is much lower than the maximum message passing frequency possible.

Eclipse cannot import javax.realtime

别说谁变了你拦得住时间么 提交于 2020-01-11 12:53:40
问题 I am very new to java and only start to use Eclipse to run some real-time java program. I could not find javax.realtime to import, I get the error: The import javax.realtime cannot be resolved Any idea how to resolve this? Do I need to download any extra package or change some project setup? 回答1: This package is not a part of built in packages. You will need additional Jar file for this package. Check this link out. 回答2: Yes, you need a real-time Java library. There are some intended for

Storm cluster shutdown in Eclipse

纵然是瞬间 提交于 2020-01-11 09:09:13
问题 I have a problem.I understad trouble but I don't find solution.Cluster isn't shutdown,throw IOException.I/O methods not work because Windows doesn't allow temp folder.I mean this path; C:\Users\Mert\AppData\Local\Temp\8bbdc8e5-a753-40f3-afe0-0c2fcc1c25a0\version-2\log.1 Storm be able to delete log files for shutdown. I tried administrator mode for Eclipse.exe and javaw.exe but it doesn't work.What can I do ? IO Exception stack trace: exception.detailMessage -> java.io.IOException: Unable to