Questions tagged [pthreads]

The tag has no usage guidance.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
1k views

Portable way to get all thread ids running inside a process.

During the porting of an application form Linux to FreeBSD I came up with the following problem. I need to get all thread id of all threads running inside my application. In terms of PThreads, I need ...
2
votes
0answers
466 views

Suddenly I see a lot of involuntary context switches for multi threaded app

I have a multi-threaded app, with 4 worker threads that until recently performed very well on my 4-core CPU. The system is running Ubuntu 16.04.3 LTS. Today I updated my OS with sudo apt-get dist-...
1
vote
0answers
41 views

Behavior of Linux kernel with respect to machine check exceptions (MCE) and threads

I was recently working with custom hardware that was not fully respecting the PCIe bus standards, and certain reads from the device would cause a bus fault and Linux machine check exception. When this ...
1
vote
1answer
87 views

file lock existence check on remote host

I want to check the existence of file lock on a file in gluster file system. So that I can see from any host that whether file lock is held by any process (remote or local) on file in gluster file ...
1
vote
0answers
88 views

Linux (kernel 3.x and 4.x) Pthread and general process scheduling algorithms

I was wondering if both scheduling (contention) scopes (SYSTEM and PROCESS) are used in the Linux kernel scheduling logic. POSIX supports PROCESS scope pthreads (MXN model) and SYSTEM scope pthreads (...
0
votes
0answers
24 views

FFMPEG : streaming two different videos using the same resource

I'm trying to use FFMPEG to stream a video to a web-server, I'm using Local-host for now,It works like a charm Both on MacOs and Ubuntu, But I want to try streaming two videos, on the same resource (...
0
votes
0answers
26 views

Linux pthread_cond_wait hangs in NASM

The following NASM code uses pthread_cond_wait to take 4 cores (numbered 0, 8, 16, 24) in core order, starting with core 0. After each core locks the mutex, it enters mutex_lock_loop where it tests ...
0
votes
0answers
200 views

Can a signal in one thread, interrupt sleep period of another thread of the same process in linux

There are two threads (parent thread and child thread, both runs in their own infinite loop) in a process. The parent thread does only one work, i.e. to continuously (while(1)) check the system time ...
0
votes
1answer
574 views

How can I view threads for a running process that is creating threads?

I made a very small program that creates two threads: #include <pthread.h> #include <stdio.h> #include <unistd.h> void *start() { printf("Am a new thread!\n"); ...
0
votes
1answer
4k views

Custom priority value: is a pthread high sched prio positive or negative?

I’m trying to reimplement in a backward-compatible way the RobotC API from C (although some details would better fit or would be easier with C++), and trying to reimplement their multithreading API in ...