Questions tagged [linuxthreads]
22 questions
4
votes
3 answers
Real Time Java threads and OS Level threads on Linux
When using real time java threads (either RealtimeThread or NoHeapRealtimeThread), is there a 1 to 1 relationship between OS Level threads and Java threads? Also, is Java using fork() or clone() for each of the processes created at the OS Level?

rreyes1979
- 1,855
- 3
- 23
- 34
3
votes
3 answers
Are there specific defines of linuxthreads and nptl
I hav a programme, which must work differently for linuxthreads and nptl.
Are there defines in this libs, that can be used in my programme to detect, is nptl is used or is linuxthreads is?
UPDATE1: For runtime there is a getconf GLIBC_LIBPTHREADS,…

osgx
- 90,338
- 53
- 357
- 513
3
votes
0 answers
LinuxThreads/NPTL: Is it reliable to assign constant value 0 to variable of type pthread_t (ignoring POSIX compliance)
I am reviewing code using POSIX threads and running on Linux platform using older LinuxThreads implementatation of POSIX threads (cross-compiled code, target MIPS/uClibc if it makes any difference). If there is any difference in the answer for NPTL…

FooF
- 4,323
- 2
- 31
- 47
3
votes
0 answers
Process and thread CPU usage in Linux top
We just discovered the peculiar feature of the Linux "top" tool.
The feature is that the summary cpu time for all threads is less than the time displayed for entire process. This is observed when our application spawns more than 50 threads and works…

Aleksei Petrenko
- 6,698
- 10
- 53
- 87
1
vote
2 answers
Multithreading for callback function in C++
Im implementing a chat application using Jabber/XMPP and gloox framework which should send and receive messages concurrently in Ubuntu Linux.
My current code implementation is :
int main()
{
...
int temp = pthread_create(&iSend, NULL,…

user562701
- 11
- 4
1
vote
1 answer
What is the reason to kill old server threads/processes and launch new ones after serving certain number of requests
For example apache httpd provides a directive MaxConnectionsPerChild which controls how frequently the server recycles processes by killing old ones and launching new ones.
What is the reason for killing the old threads at all after serving certain…

Shashank V
- 10,007
- 2
- 25
- 41
1
vote
1 answer
Is it possible to export the raw text password in Linux when the user is logging in?
I was just wondering, is it possible to export the raw text password into a file using echo "$password" >> /home/user/Desktop/file name. I know that the password is validated against the shadow file by pam_unix.so. Can the username and password…

Gaj
- 150
- 2
- 15
1
vote
1 answer
Use NPTL while keeping glibc with linuxthreads
I would like to know if it is possible to test a specific binary with nptl instead of linuxthreads which is embedded in my glibc. I don't want to recompile the glibc because it is the one provided with my specific hardware/software and I don't want…

Jean-Baptiste Reich
- 41
- 1
- 1
- 7
0
votes
0 answers
Performance of select() in multiple threads (Linux)
According to CURL and libev maintainers, select gets really bogged down after about 100 or so file descriptors. Could I extend select to about 1000 or so file descriptors if I split my file descriptors across multiple threads? or would there be so…

unixman83
- 9,421
- 10
- 68
- 102
0
votes
1 answer
Map pthread_t to linux thead ID
I have a service running on my linux server that exposes an API. The purpose of this API is to create a thread for the calling process that runs for a longer period of time. The purpose of the thread doesn't matter in this context.
The service that…

Xershy
- 177
- 11
0
votes
2 answers
Delete lines prior to a specific date in a log file
I have a ffmpeg process log file in which log data get appended to it daily. I want to do a automatic maintainence of this log by going through the log and deleting lines belonging to a certain date.
I tried something but it didn't help.
How should…

Subham Sahu
- 55
- 7
0
votes
1 answer
How Thread uses software to protect datastructure
Hii ALL,
I started reading about Threads and came to know about Thread uses software and Process uses hardware to protect datastructure...But could anyone elaborate this fact more??

Amit Singh Tomar
- 8,380
- 27
- 120
- 199
0
votes
2 answers
How do you clone() in linux inside a class and namespace?
I'm taking an intro to operating systems course and we're to use the clone() call in linux to create threads and then do some stuff with them. I seem to be having trouble just using clone() at all.
I've structured my code into a single class (called…

Student
- 25
- 3
0
votes
1 answer
Does Posix thread ID have an one-to-one relation with linux thread ID?
I know the difference between pthread_self() and syscall(SYS_gettid). pthread_create() produces a POSIX thread ID which is represented by a struct pthread_t which is usually defined as an unsigned long int. We can use pthread_self to get the ID of…

Chalex
- 321
- 2
- 9
0
votes
1 answer
libgomp: Thread creation failed: Invalid argument after disabling/enabling CPUs
I've a 2 socket machine, each with 14 cores and hyper-threading enabled - thereby total 14*2*2 = 56 processing units or logical CPUs.
I disabled all odd numbered CPUs(1, 3, 5, 7, ..., 53, 55) by doing:
for i in {1..55..2}; do echo 0 >…

MrA
- 1
- 2