The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
1answer
45 views

What is a limit for number of threads?

I was wondering how many processes can I create on my machine (x64 with 8Gb of RAM and running Ubuntu). So I made simple master process which was continiously creating child processes, and that child ...
4
votes
0answers
48 views

kill -STOP shuts down [closed]

On a 12-core Linux machine, as a user (without root privilege) I start a job on a single process. When I hit Ctrl-Z the process is suspended and kill -CONT resumes it. This works fine. But when the ...
0
votes
2answers
27 views

Parallel tasks and killing process

I have 3 tasks in a script which have to run as follow. #1 and 2 need to run in parallel task1 & task2 #when task 1 is complete, task 3 is launched task3 My problem is that task 2 being a ...
1
vote
0answers
24 views

Can i use kernel_thread in kernel when its version is over 3.10?

In my module code, i want to create my thread which doesn't fork from kthreadd, because kthreadd will clone_fs from init, then the fs of init was chroot, so it's not good for me, i just want to create ...
0
votes
1answer
29 views

poor mans backup with find and parallel compression

I'm planning to backup the /home folder of my Kubuntu box to an external drive. In order to speed up the process I consider zipping large files (individually) so that writing them is faster. I also ...
0
votes
1answer
81 views

Multithreaded applications on a single threaded CPU?

The motivation behind this question arises from exploring the Intel Galileo gen2 board which has a single threaded processor. I'm looking for a conceptual explanation on what does that mean for all ...
0
votes
0answers
19 views

Chat program not sending the data to other user

I am writing two programs in Ubuntu which will run and each terminals and chatting can be done . But when I type something in terminal 1 , text doesn't goto terminal 2 and when I type in terminal 2 ,...
0
votes
0answers
56 views

Why would this thread in my program be starving?

I've got a program that has about 80 threads. It's running on a ~50ish core machine on linux 3.36. At most there are 2 of these programs running at once, and they are identical. Nothing else is ...
2
votes
0answers
70 views

Why is Firefox stuck, and how might I get it unstuck?

Firefox is hung. Usually I kill it with -1, -9 or -15, but this time, dang it, I want to find out why. I have an hour or so to waste on this, and seek education above actually solving the problem. ...
-1
votes
1answer
29 views

Are there UNIX variants or other OS which make user level threads visible to OS kernel? [closed]

Are there UNIX variants or other OS which make user level threads visible to OS kernel ?
0
votes
1answer
23 views

Is it possible that the kernel doesn't let a already ready thread run even when there is a idle processor?

Suppose each thread's affinity is all the processors. Whenever a thread becomes ready, will the kernel attempt to find an idle processor to run it?
0
votes
1answer
98 views

Processor affinity not respected by iperf threads

I'm running iperf in server mode on a Ubuntu box (14.04 LTS). The hardware is quad core with hyper-threading, so I have cores 0-7 available (0 is paired with 4, 1 with 5 and so on). I've set the ...
3
votes
1answer
315 views

How do I specify which core a pthread is spawned on

I am running a cluster where each node has an Intel Xeon E5430. /proc/cpuinfo reports 8 cores. I am using C/C++ compiled with gcc ver 5.3.1 on an Ubuntu 16.04LTS. Distributing my work to each node ...
0
votes
0answers
53 views

Fast file access for many threads doing read / write operations?

I have a disk with a lot of data on it and I want to write some code such that thousands of threads can operate on the data. Each thread would work on its own individual file. This will speed up ...
2
votes
2answers
194 views

How to run bash script via multithreading

I have bash script which creates high energy collision events, if one event takes around 2 minutes then for 100000 events it takes 200000 minutes, which is too much. so if I have 50 cores in a node, I ...
6
votes
4answers
1k views

Get chrome's total memory usage

Since google chrome/chromium spawn multiple processes it's harder to see how much total memory these processes use in total. Is there an easy way to see how much total memory a series of connected ...
2
votes
1answer
27 views

Pthread scheduler scope variables?

I read that their is 1:1 mapping of user and kernel thread in linux What is the difference between PTHREAD_SCOPE_PROCESS & PTHREAD_SCOPE_SYSTEM in linux if kernel is considering every thread ...
0
votes
1answer
247 views

Run GNU Octave script on multiple cores

I am computing Monte-Carlo simulations using GNU Octave 4.0.0 on my 4-core PC. The simulation takes almost 4 hours to compute the script for 50,000 times (specific to my problem), which is a lot of ...
0
votes
1answer
66 views

Multithreading (increasing the number of threads for the process)

I wonder if there is any way of adding thread to specific process just to prove that number of thread which are assigned to process can be changed by user. If so, how could I do that ? [root@195689 ...
21
votes
5answers
2k views

How to run a command at an average of 5 times per second?

I have a command-line script that performs an API call and updates a database with the results. I have a limit of 5 API calls per second with the API provider. The script takes more than 0.2 seconds ...
2
votes
1answer
442 views

Multi processing / Multi threading in BASH

I have a test file that looks like this 5002 2014-11-24 12:59:37.112 2014-11-24 12:59:37.112 0.000 UDP ...... 23.234.22.106 48104 101 0 0 8.8.8.8 53 68.0 1.0 1 0.0 0 68 0 48 Each line contains a ...
3
votes
1answer
345 views

Use multi-threaded make by default?

Is there any way to have make use multi-threading (6 threads is ideal on my system) system-wide, instead of by just adding -j6 to the command line? So, that if I run make, it acts the same as if I ...
1
vote
2answers
362 views

Can a single core of a cpu process more than one process?

This is the reasoning for my question is what I read in a text book which states: Each CPU (or core) can be working on one process at a time. I'm assuming that this used to be accurate but is no ...
2
votes
0answers
73 views

Is using threads still considered an anti-pattern? [closed]

Background In The Art of Unix Programming, Eric S. Raymond dismisses multithreaded programming as a performance hack that should be avoided. According to him, the biggest problem with threads is that ...
2
votes
1answer
2k views

Running a python script 200,000 times in parallel using bash [duplicate]

I need to run my Python script 200,000 times. Is it possible to do parallel execution using bash? Since it's 200,000 times I would like to use at least 10 threads simultaneously
-1
votes
1answer
152 views

Why an LWP (Light Weight Process) is required for each concurrent system call in many to many thread model?

An LWP is a data structure placed between user thread and kernel thread, an appears as a virtual processor to user thread library. So, the minimum number of LWP required in many to many model of ...
1
vote
0answers
79 views

What are scheduler Activations?

I am reading about multi-threading in Peter Baer Galvin's Operating System Concepts; I don't understand the following topics: How LWP (virtual processor) works and schedules threads or maps to kernel ...
6
votes
1answer
924 views

What happens to a multithreaded Linux process if it gets a signal?

If a Unix (Posix) process receives a signal, a signal handler will run. What will happen to it in a multithreaded process? Which thread receives the signal? On my opinion, the signal API should be ...
1
vote
1answer
174 views

Threads vs interrupts

What does it mean when threads are time-sliced? Does that mean they work as interrupts, don't exit while routine is not finished? Or it executes one instruction from one thread then one instruction ...
0
votes
1answer
55 views

Two or more threads on single core [closed]

What are the advantages of using threads on single core, does that makes sense to use multithreading on single core?
0
votes
2answers
71 views

Plain installation vs Virtual machines - what is better for multicore? [closed]

We've currently bought a new server, with 64 GB of RAM and 8 cores with hyperthreading support. We are going to build a system using: nginx. apache. mysql. php So, the question is about performance: ...
1
vote
1answer
2k views

unpigz (and untar) to a specific directory

I know how to gunzip a file to a selected location. But when it comes to utilizing all CPU power, many consider pigz instead of gzip. So, the question is how do I unpigz (and untar) a *.tar.gz file ...
1
vote
1answer
326 views

Set ionice for a multi-threaded application

I have a program that spawns multiple threads, all of which do fairly intensive IO, running on the background. I want to set the scheduling class to idle so that it doesn't clog up the system; however,...
1
vote
1answer
441 views

Limit max thread use for multithreaded java app

I have downloaded a .jar file and am using java with it, and it seems multithreaded, which is great ... unless I don't want it to be multithreaded, or unless I want to use only N threads with it. Is ...
2
votes
2answers
105 views

how to workaround a deadlock (multithreading a program)

I need to run a program 100 times, a few hours each, which is fine when running it in a serial way, just takes very long, but when I try to parallelize it using GNU parallel or simple '&' in bash, ...
5
votes
1answer
943 views

Is vim multithreaded?

I have a HUGE (and I mean huge) text file that I am going to process with vim. I could process it using two different (debian) machines. One is duel-core and one is octo-core. A single core on my ...
7
votes
3answers
10k views

Multithreaded cp on linux? [duplicate]

Is there a multi-threaded cp command on Linux? I know how to do this on Windows, but I don't know how this is approached in a Linux environment.
0
votes
2answers
723 views

won't the ever changing affinity assigned to threads by the Linux kernel have adverse effect on overall performance?

In my program, I have several threads that are started with the process and that remain until the program ends. They will meet different loads during the lifetime of the app, and at times they will ...
7
votes
3answers
23k views

How to call a service URL from bash shell script in parallel?

I have a service which I am calling from another application. Below is my service URL which I am calling - http://www.betaservice.domain.host.com/web/hasChanged?ver=0 I need to do some load test on ...
8
votes
1answer
13k 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 ...
2
votes
3answers
154 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 ...
1
vote
1answer
305 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 ...
3
votes
1answer
103 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 main()...
3
votes
3answers
21k 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 ...
6
votes
2answers
25k views

Default stack size for pthreads

As I understand, the default stack size for a pthread on Linux is 16K. I am getting strange results on my 64-bit Ubuntu install. $ ulimit -s 8192 Also pthread_attr_init(&attr); ...
1
vote
2answers
649 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 ...
2
votes
1answer
156 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 user@...
1
vote
2answers
574 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. ...
1
vote
0answers
2k 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 ...
2
votes
1answer
2k 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 ...