Skip to main content

Questions tagged [concurrency]

5 votes
1 answer
390 views

Common method for preventing concurrent runs for a given script is utilizing flock as: LOCK=/var/lock/my-lock exec 9>>"$LOCK" if ! flock --exclusive --nonblock 9; then echo "...
basher's user avatar
  • 71
1 vote
1 answer
104 views

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 ...
Archduke's user avatar
  • 113
-1 votes
1 answer
146 views

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 ...
Spartacus's user avatar
0 votes
1 answer
101 views

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. ...
peterh's user avatar
  • 10.5k
5 votes
3 answers
949 views

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 ...
classicmusiclover's user avatar
0 votes
1 answer
464 views

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 ...
Álvaro G. Tenorio's user avatar
2 votes
1 answer
589 views

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 ...
rijkdw's user avatar
  • 23
2 votes
3 answers
2k views

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 & /....
RoyBatty279's user avatar
7 votes
1 answer
2k views

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 ...
John Smith's user avatar
1 vote
2 answers
2k views

#!/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....
John Smith's user avatar
0 votes
1 answer
1k views

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 ...
Rob's user avatar
  • 101
0 votes
1 answer
104 views

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/...
dollar bill's user avatar
0 votes
1 answer
261 views

(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(...
kankan256's user avatar
  • 103
3 votes
2 answers
239 views

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 ...
Liam Pieri's user avatar
-1 votes
1 answer
65 views

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 ...
Tim's user avatar
  • 107k

15 30 50 per page
1
2 3 4 5 6