The tag has no wiki summary.

learn more… | top users | synonyms

15
votes
6answers
2k views

Why using more threads makes it slower than using less threads

Tried to run program X using 8 threads and it was over in n minutes. Tried to run same program using 50 threads and it was over in n*10 minutes. Why does this happen and how can I get optimal ...
5
votes
1answer
137 views

Multi-Threading/Forking in a bash script

I have written a bash script which is in following format: #!/bin/bash start=$(date +%s) inFile="input.txt" outFile="output.csv" rm -f $inFile $outFile while read line do -- Block of Commands ...
5
votes
2answers
626 views

What is the need of the struct thread_info in locating struct task_struct?

While reading through the Linux Device Drivers, I could understand that the Process Descriptor (of type struct task_struct) has all the info regarding a particular task. The process descriptors are ...
3
votes
3answers
841 views

Is crontab multithread?

I don't know where I can find more information about crontab, so I ask here. Crontab is it multithread? How does it work?
3
votes
2answers
6k views

Linux max threads count

my server has been running with Amazon Ec2 linux. I have a mongodb server inside. The mongodb server has been running under heavily load, and, unhappily , I've ran into a problem with it :/ As known, ...
3
votes
2answers
741 views

What is meant by stack in connection to a process?

From the book Advanced programming in the Unix environment I read the following line regarding threads in Unix like systems All the threads within a process share the same address space, file ...
3
votes
1answer
353 views

Speed up zgrep on a multi-core computer

I'm running zgrep on a computer with 16 CPUs, but it only takes one CPU to run the task. Can I speed it up, perhaps utilize all 16 cores? P.S The IO is just fine, I could just copy the gzipped file ...
3
votes
3answers
728 views

Why do top and ps show different PIDs for the same processes?

When I run top -H, I see that my multiple mysql threads all have the same PID. However, in ps -eLf I see each one has a different PID: ps -eLf UID PID PPID LWP C NLWP STIME TTY ...
3
votes
1answer
55 views

Is each process considered a thread?

Is a Linux process considered a thread? For example, if I write a simple c program that calls pthread_create to create a new thread in main(), does that mean that I now have 2 threads, one for ...
2
votes
1answer
225 views

What makes the Linux scheduler seem unpredictable?

The question refers to the output of a multi-threaded application, where each thread merely prints its ID (user assigned number) on the standard output. Here all threads have equal priority and ...
2
votes
3answers
694 views

How to launch two threads in bash shell script?

I am trying to copy files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for ...
2
votes
1answer
137 views

Which system calls could create a new process?

When executing ps command in my Linux system i see some user processes twice (different PID...). I wonder if they are new processes or threads of the same process. I know some functions in standard C ...
2
votes
3answers
76 views

Linux - preventing an application from failing due to lack of disk space

Due to an unpredicted scenario I am currently in need of finding a solution to the fact that an application (which I do not wish to kill) is slowly hogging the entire disk space. To give more context ...
2
votes
1answer
305 views

Running a process multiple times at the same time

I have a c++ program with opencv library which takes an image as input and perform pose estimation,color detection,phog. When I run this program from the command line it takes around 4-5sec to ...
2
votes
1answer
80 views

Multiplex bash function execution

I created a bash function to "automagically" connect on our switches and retrive their startup-config using the expect command. I have to use expect because this switch does not accept the ssh ...
2
votes
0answers
120 views

So the design of client-server separation is not the bottleneck of X Window?

In the answer of this, it mentioned: People also hear that X uses the "network" and think this is going to be a performance bottleneck. "Network" here means local UNIX domain socket, which has ...
2
votes
1answer
539 views

Does uClibc support using pthreads?

I recently attended an embedded Linux course that stated that uClibc does not support the use of pthreads and that it only supports linuxthreads. Furthermore, the course instructor implied that ...
1
vote
3answers
184 views

can the “cat” command use multi-processes

I need to merge bunch of files in a directory on a unix box that has 8 cores. I am looking for a fast way to merge these files. The cat command uses only one core... is there a way where I can make it ...
1
vote
1answer
82 views

How to copy in two folders simultaneously using GNU parallel by spawning multiple threads?

I am trying to copy files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for ...
1
vote
2answers
170 views

Is any part of the X.org software multithreaded?

None of the command-line shells that I am aware of are multithreaded. In particular, even those shells that support "job control" (Control-Z, bg, fg, etc) do so via facilities (namely, fork, exec, ...
1
vote
1answer
2k views

System sending SIGTERM and SIGKILL during normal work

I have a program (C++) that works with TCP sockets in multithreaded manner. The multithreading is intensive, about 100 threads (POSIX threads). Sometimes, not quite sure when, the program gets ...
1
vote
1answer
259 views

Analyzing the behavior of a threaded program

Is there an application that will do what Threadscope or the parallel tools of Visual Studio does for multithreaded program analysis in Linux?
1
vote
1answer
703 views

Default stack size for pthreads

As I understand the default stack size for a pthread on linux is 16K. I am getting strange sesults on my 64bit ubuntu install. $ ulimit -s 8192 Also pthread_attr_init(&attr); ...
1
vote
2answers
155 views

How to copy three files at once instead of one file at a time in bash shell scripting?

I am running my shell script on machineA which copies the files from machineB and machineC to machineA. If the file is not there in machineB, then it should be there in machineC for sure. So I will ...
1
vote
0answers
125 views

What exactly is the lwp and threads in solaris?

The book "Solaris Internals" says Solaris executes kernel threads for kernel-related tasks, such as interrupt handling, memory page management, device drivers, etc. For user-process execution, kernel ...
1
vote
0answers
76 views

multithread handling in AM1808 using embedded Linux

I am using AM1808 ARM9 based board using GCC compiler (UBUNTU 10.04) . I am using Sqlite3 database management. I have some requirement regarding handling threads in background having access on ...
0
votes
2answers
104 views

Make Ubuntu acknowledge that a custom built version of PHP is installed

I'm trying to install PHP from source code on my Ubuntu 12.04 VPS. I'm installing PHP like this: Download the latest version from the php.net website. Configure it using the parameters below. ...
0
votes
0answers
13 views

segmentation fault when running with high data resolution [on hold]

I have a tool that uses some ray-tracing computations. In this tool I can set the ray-tracing resolution grid. High resolution means more data and more accurate results. Also, the program uses ...
0
votes
0answers
17 views

Problem with installing mcsima+

I am trying to install mcsima+, but I am facing an issue over step 5 which requires me to compile the program. The instruction I ran for step 5 is, 5. Compile a test program 'stream' - cd ...
0
votes
1answer
89 views

When was the threading implemented in unix?

Which is the first Unix version or Linux version which implemented threads. And in which version bound and unbound threads were implemented? I know that in current Linux version threads are unbound by ...
-3
votes
2answers
88 views

Which Linux distro/mode offers lowest interference when running your own applications?

I'm interested in a Linux distro to build C projects and test their behavior in a very predictable and controlled environment. I'm especially concerned about letting the scheduler deal as much as ...