The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
21 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
29 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 ...
0
votes
0answers
12 views

Running a function in parallel (in python) on clusters using different screens [migrated]

I have 2 functions which I need to run them in parallel written in python. The issue is that I'm running the code on the cluster, so first I open a screen and then I execute the python code. if ...
3
votes
1answer
30 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 ...
-2
votes
0answers
12 views

Why are these printfs behaving differently? [migrated]

I'm practicing threaded programing and found this. When I printf("1"), the output will comes after a few seconds, but when I printf("\n"), the output comes step-by-step. Why? #include<stdio.h>//...
1
vote
1answer
1k 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 ...
0
votes
1answer
41 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 ...
2
votes
2answers
46 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 ...
0
votes
0answers
18 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 ...
4
votes
3answers
108 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
14 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 ...
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 ...
0
votes
1answer
36 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 ...
5
votes
2answers
19k 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); ...
0
votes
0answers
205 views

FATAL: ThreadSanitizer can not mmap the shadow memory (something is mapped at 0x2ba33adb9000 < 0x7cf000000000)

I am trying to use thread-sanitizer functionality in my code .For doing so I have used following script : g++ -Wreturn-type -fmessage-length=0 -std=c++11 -c -O2 -fno-strict-aliasing -...
2
votes
1answer
109 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 ...
2
votes
1answer
68 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
65 views

Need to format 5 disks in parallel

I tried this xargs -p 5 -n1 mke2fs -t ext4 /dev/sd[d-p]1 and got this [/dev/mapper]# seq 1 15 | xargs -p 5 -n 1 mke2fs -t ext4 /dev/sd[b-p]1 5 -n 1 mke2fs -t ext4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /...
1
vote
2answers
114 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
60 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 ...
0
votes
0answers
18 views

Who controls the thread activity?

I know that there is a program called scheduler which controls the process activity within a system. But which part of the system controls the activity of threads within a process? By the way, do or ...
0
votes
0answers
33 views

Where are thread stacks located in user space?

Let's assume a single threaded-process sets the (user)stack at the end of its assigned userspace (e.g. 1GB) and it starts growing closer to the heap (1GB --> 0). How would it work in a multi threaded ...
1
vote
1answer
1k 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
73 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
48 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 ...
2
votes
0answers
372 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
100 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
45 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
125 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 ...
1
vote
2answers
4k 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 ...
0
votes
2answers
49 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 ...
3
votes
1answer
632 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 ...
1
vote
1answer
320 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 ...
1
vote
1answer
236 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,...
3
votes
2answers
2k 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 ...
2
votes
3answers
485 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, ...
2
votes
2answers
90 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, ...
3
votes
1answer
463 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 ...
6
votes
3answers
7k 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
502 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 ...
6
votes
3answers
16k 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 ...
7
votes
1answer
11k 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 ...
6
votes
2answers
2k 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
16k 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
3answers
145 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
242 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
92 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()...
1
vote
2answers
543 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
140 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
528 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. ...