Questions tagged [multithreading]
The multithreading tag has no summary.
157 questions
1 vote
1 answer
240 views
How to measure actual CPU utilization in Linux for multi core applications?
I have a computation intensive process that I need to run multiple times on a multi-core processor but "top" isn't showing utilization or load in a useful way. For example, imagine my task ...
3 votes
1 answer
421 views
Thread Name: Is /proc/pid/comm always identical to the Name: line of /proc/pid/status and the second field of /proc/pid/stat?
A Linux thread or forked process may change its name and/or its commandline as visible by ps or in the /proc filesystem. When using the python-setproctitle package, the same change occurs on /proc/pid/...
0 votes
1 answer
452 views
linux find files with multiple threads
I made a search but couldn't find anything similar. I have huge codebases ( AOSP or Yocto ) stored in ext4 formatted NVME drives ( such as SAMSUNG 980Pro ). These codebases usually consist of hundreds ...
0 votes
1 answer
196 views
Is there a way to prevent a descendant thread from getting into cgroup of its ancestor thread automatically?
I write some threads of my app to a Linux cpu cgroup, created by me, explicitly (let us talk e.g. about v1 for now, but if you know a way for v2, that would be also great). However, I see that ...
0 votes
1 answer
1k views
How many times has my process been preempted?
I wrote a simple program with a thread which runs on a CPU core. It spins kind of aggressively, and it takes 100% of the CPU core. I can see that with top + 1. After N minutes, I would like to be able ...
3 votes
2 answers
808 views
Why does higher CPU-usage slow down a task?
I am using whisper.cpp to transcribe some sound files. It is a very CPU heavy process so I try to find some optimal settings and therefore I have done some tests with the thread setting (-t) but the ...
5 votes
1 answer
2k views
Does thread stack comes from the memory mapping segment of the process on Linux?
I'm currently studying Linux. I know the thread is a kind of lightweight process on Linux. But I wonder to know where the thread stack space comes from. The stack of the thread is private. It is ...
0 votes
1 answer
171 views
Is there an implementation of POSIX semaphore not based on Mutex+CV?
I read that semaphores in the FreeBSD kernel is not as efficient as Mutex+CV from this man page. I've examined the kernel and syscall implementation of POSIX semaphore from the source code and ...