Questions tagged [concurrency]
The concurrency tag has no summary.
81 questions
1
vote
1
answer
90
views
Are loads and stores to pointers atomic on Linux?
I came across the following quote in this LWN article:
Answer: On all systems running Linux, loads from and stores to pointers are atomic, that is, if a store to a pointer occurs at the same time as ...
-1
votes
1
answer
126
views
Why is the printf Output Order Not Respected in a Concurrent Scenario with Piped or Redirected stdout?
We are in a concurrent scenario where we have n concurrent processes. By using a synchronization policy (e.g., using pipes or signals), each process can print using printf("string\n") only ...
0
votes
1
answer
89
views
Distributed locks of file-backed mmap()-ed memory over network block devices
There are various ways to access block devices over a network, like
nbd, alias network block device
iscsi, alias scsi over tcp
or simply we can mmap() files mounted in an nfs or cifs network share.
...
5
votes
3
answers
946
views
Lock a bash script based on parameter?
I'm trying to find a way to lock a script based on a parameter given, but was unsuccessful in finding a proper answer.
What I'm trying to achieve is prevent another user from running a script based on ...
0
votes
1
answer
450
views
Prevent process from overwriting files
The setting
Let's say I have an executable file, let's call it program, whose source code is unavailable (maybe proprietary/legacy).
Each time this program is executed, it generates a file, let's call ...
2
votes
1
answer
583
views
Run subset of commands in parallel; once one command is done, run another
Let's say I have N bash commands stored in a file:
$ cat list_of_commands.txt
do_thing_1
do_thing_2
...
do_thing_N
The goal is to run them in parallel, but only 10 at a time (to avoid overloading the ...
2
votes
3
answers
2k
views
Execute several scripts at the same time with nohup
I want to execute four scripts at the same time with nohup. These scripts are all in the same folder.
Would something like this work?:
nohup /.scrip1.sh & /.scrip2.sh & /.scrip3.sh & /....
7
votes
1
answer
2k
views
What is the minimum amount of memory required for starting a process on a Linux-based system?
Routines in both languages are inexpensive: goroutines are 2KB each, while Elixir processes are 0.5KB each.
I understand that to start a process in BEAM requires 0.5KB of memory. This being so ...
1
vote
2
answers
2k
views
How might I execute this nested for loop in parallel?
#!/usr/bin/bash
TARGETS=(
"81.176.235.2"
"81.176.70.2"
"78.41.109.7"
)
myIPs=(
"185.164.100.1"
"185.164.100.2"
"185.164.100.3"
"185....
0
votes
1
answer
1k
views
Testing file locking
I have a script which locks a file to avoid concurrent access to it, How can I execute this same script from two different terminals synchronously, to check if it works?
Here is the script
#!/bin/bash
...
0
votes
1
answer
100
views
Asynchronous downloading from virtual machine?
I have some files stored on a virtual machine that I'm downloading onto my PC. There are approximately 1 million files and I have been using the following command:
scp vm_user@IP:/home/vm_user/...
0
votes
1
answer
259
views
different process in Linux in a single core PC how been managed?
(this a dummy question)multiple processes are running in the background. my understanding is each CPU core can run only 1 process at a time. so someone has the ability to interrupt the current process(...
3
votes
2
answers
239
views
Concurrency of a find, hash val, and replace across large amount of rows
I have a bunch of files and for each row there is a unique value I'm trying to obscure with a hash.
However there are 3M rows across the files and a rough calculation of the time needed to complete ...
-1
votes
1
answer
63
views
Does inetd simplify server programs, without affecting the part of concurrently handling multiple clients? [closed]
In The Linux Programming Interface, Chapter 60 talks about
designing a server to concurrently handle multiple clients, by using sockets, multiple processes/threads or thread/process pools
designing ...
3
votes
3
answers
7k
views
Concurrency and Parallelism on Bash
I'm a bit confused about concurrency and parallelism in the bash shell. As I understand it, when we run commands in more than one subshells at the same time, these commands run in parallel on ...