1,015 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Best practices
0
votes
3
replies
48
views
Implementing fair sharing in multi tenant applications
I'm building a multi tenant database and I would like to implement fair sharing of resources across multiple tenants. Let's say I have many concurrent users, each with its custom amount of resources ...
1
vote
0
answers
64
views
Correct usage of multi-dependencies and mutexinoutset in OpenMP
Recent OpenMP standards introduced task multi-dependencies. This feature was originally proposed in OmpSs if I'm not mistaken. I found an example of applying multi-dependencies to the assembly step of ...
1
vote
0
answers
95
views
Lua preemptive multitasking and supporting nested coroutines
I am trying to write a scheduler for a virtual computer that runs Lua and is transparent to the user (i.e.; no coroutine. yields needed) and would still like the user to be able to create coroutines ...
2
votes
2
answers
189
views
What memory bandwidth utilisation to expect? And why does multi-threading/multi-processing make it worse?
We have C code that loops over large (10M - 1000M) double arrays (32-byte aligned) and aggregates them. The code (below) looks trivial, but is as fast as we could get it. Over 20 other approaches, ...
0
votes
1
answer
66
views
Task switch during fork() causes random stack errors
I'm working on multitasking for my OS, more specifically fork() for usermode ELF-binaries (they call it by a syscall).
After calling fork, it manages to return to the parent process (sometimes) but on ...
0
votes
1
answer
347
views
Using one UART in three same priority tasks in FreeRTOS with STM32
I'm trying to use one UART in three same priority tasks like the code below, but what is happening is confusing for me! In fact, I want any task to send a string once per second, so I should have 3 ...
-1
votes
2
answers
501
views
RTOS on ATtiny85, 8 bit MCU. Is it possible?
Everyone, I am working with ATtiny85 using Arduino IDE. Recently I was learning about RTOS. I want to ask if it possible to run RTOS on ATtiny85 microcontroller? According to my knowledge it may be ...
1
vote
1
answer
149
views
Add a delay between futures in Python
In official docs of Python exist next example:
import concurrent.futures
import urllib.request
URLS = ['http://www.foxnews.com/',
'http://www.cnn.com/',
'http://europe.wsj.com/',
...
-2
votes
2
answers
135
views
Is a thread nothing but a sequence of machine instructions? [closed]
I was watching this video from Computerphile and at 10:03 you can see this:
where T1 and T2 are threads, and under them are machine instructions.
Does it mean a thread is basically made up of a ...
2
votes
0
answers
219
views
Why is FreeRTOS not preempting tasks?
I'm using FreeRTOS on a Raspberry Pi Pico (R2040). I'm starting with a 'hello world' type program to check that I can run two tasks:
#include "FreeRTOS.h"
#include "task.h"
#...
0
votes
1
answer
104
views
Python Multi-threading - How to kill all child threads when one of them raise an exception or failed
Depending on the needs of the program, I used multi-threads within a sub-thread for parallel tasking. In this "deep" multi-threading, potential problems such as timeouts and failures may be ...
0
votes
2
answers
227
views
Problems with locking single producer, multiple consumer fifo queue
I have this little simple queue where a one task read from a file into the queue and several tasks unpack the content. I works for a while, but eventually crashes because the queue is empty even ...
-1
votes
1
answer
148
views
My code with numba is slower than without numba
My code with Numba is slower than without Numba, I don't know what's happening. Please instruct me.
#with numba
import numpy as np
from numba import njit, prange
import time
(X_train, Y_train), (...
1
vote
0
answers
145
views
The first exception inside the generator procedure takes a long time to handle on Windows 10
I'm using a Delphi generator implementation.
The main idea is taken from here: https://habr.com/ru/articles/157777 (text in Russian, but the main idea is clear from the code). The same code can be ...
0
votes
0
answers
133
views
Why are interrupts not triggered during an infinite printing loop task
Specifically, I have two tasks fn and fn1 that are being run by a scheduler. The code for each is below:
int fn(void *arg)
{
for(;;) {
printf("a");
}
return 6;
}
int fn2(void *arg)...