the execution of multiple concurrent processes in a system
Questions tagged [multiple-processes]
110 questions
-1
votes
1 answer
Java file lock for read and write with multiple processes
In my application multiple processes are trying access a file for read and write. Every application has a single thread. I need to make sure that no 2 processes are accessing the file at the same time. I am using FileLock in JDK. This works fine,…

Bagira
- 2,149
- 4
- 26
- 55
-1
votes
1 answer
Issues piping with C. Could an extra process be executing?
I don't know what is wrong in this code. There are multiple errors with its output. This program is supposed to imitate a UNIX shell. It can run any command fine as long as it does not contain any pipes. However, when I include pipes, funny things…

NoobProgrammer
- 11
- 4
-1
votes
1 answer
Which would be efficient on Multi Core system - A process with multiple threads or multiple processes with a single thread?
Suppose there is a system with 8 cores having 1 thread each and 32 GB of RAM. I want to run in case 1 -> 4 threads of in a single process (threads are independent so no synchronization needed) and case 2 -> 4 processes with single threads each.…

Yogesh kumar
- 15
- 1
- 6
-2
votes
1 answer
rand() in C with modulo never triggering
I'm trying to implement a real-world simulation involving synchronization, and when I have an event that has an 80% chance of occurring, I'm currently doing
while((rand()%10)<8){
up(sCar);
printf("SOUTH: new car\n");
}
However, the…

bkrause404
- 19
- 8
-3
votes
1 answer
Would doubling speed of CPU allow system to handle twice as many processes?
If the speed of the CPU is doubled, would the system be able to handle twice as many processes? Assuming you ignore context switches that is.

user2535202
- 13
- 4