Skip to main content

Questions tagged [parallel-programming]

For questions about programming in such a way that a task can be divided among multiple threads/workers which work simultaneously ('in parallel') on the subtasks, leading to performance gains.

1vote
1answer
420views

Determine when distributed and parallel process is completed

In a distributred system that uses parallel processing to complete tasks and I want to determine when all sub tasks have been completed, what design method or principals can i apply ? I am using ...
Manse's user avatar
0votes
0answers
35views

What are the typical properties of dependency graphs?

I want to run a complex algorithm consisting of many subtasks in parallel on a number of processors. These subtasks depend on one another, so that this algorithm is characterized by a DAG (Directed ...
Zur Luria's user avatar
-2votes
1answer
87views

Efficient static race detection [closed]

I am supervising a university project on the topic of race detection for multi-threaded processes with shared memory. We have a complex algorithm consisting of tens of thousands of subtasks, and we ...
Zur Luria's user avatar
0votes
0answers
99views

Optimizing the runtime of greedy scheduling for parallel computing

I have a situation where I want to run a complex algorithm consisting of many subtasks in parallel on a number of processors. These subtasks depend on one another, so that this algorithm is ...
Zur Luria's user avatar
0votes
1answer
143views

Difference between outcome of using mutex/spinlock/semaphore in this deadlock situation?

I'm not sure if my answers to the following exercise is correct: Suppose the program is run with two threads. Further suppose that the following sequence of events occurs: Time Thread 0 ...
Lilian Shi's user avatar
1vote
1answer
200views

Distribution of processing across cores between a LINQ and PLINQ query

I am trying to create a simple demonstration of using 'parallel LINQ' (PLINQ). I have two versions of my task, in C#: var result = Enumerable.Range(1,1000000).Where(x => IsPrime(x)).ToList(); ...
Richard Pawson's user avatar
3votes
1answer
143views

Design for deduplicating concurrent tasks in flight simultaneously

I have 1-20 agents that issue requests over time with roughly ~50 in total in flight at any given time. Many of these requests are identical. The tasks are idempotent, but if two identical requests ...
Unknown1987's user avatar
-3votes
2answers
129views

How are futures and speculations evaluated differently?

In Practical Foundation of Programming Languages 38 Futures and Speculations A future is a computation that is performed before it is value is needed. Like a suspension, a future represents a value ...
Tim's user avatar
  • 5,525
2votes
2answers
549views

Is sequential consistency equivalent to performing memory accesses by a processes in program order and performing each memory access atomically?

In Fundamentals of Parallel Multicore Architecture, by Yan Solihin, p304 defines sequential consistency memory model: Overall, we can express programmers’ implicit expectation of memory access ...
Tim's user avatar
  • 5,525
1vote
2answers
1kviews

What are the differences between memory coherence and cache coherence?

https://en.wikipedia.org/wiki/Memory_coherence says: Memory coherence is an issue that affects the design of computer systems in which two or more processors or cores share a common area of memory.[1]...
Tim's user avatar
  • 5,525
0votes
2answers
948views

Approaches of splitting the same type of work among multiple threads in C++

I have a reinforcement learning project. For this I created a vectorized environment in C++, which is a handler for multiple instances of a simple game. It is highly parallelizable. Each worker can ...
Dudly01's user avatar
0votes
0answers
44views

What is the most fitting thread model to redesign a sequential linear search algorithm?

Let's say that there is a simple sequential algorithm that performs a linear search of a unique key in an array: public class SearchSeq { public static int search(int[] a, int key) { for (int i ...
Konstantinos Loizas's user avatar
-2votes
1answer
802views

How to do achieve parallelism in a console application

I have a .net web application, let's say A and a .net console application, let's say B.In A, I have a queue with multiple jobs to be done by B.Once I select the jobs from A, a queue gets created. Each ...
mrinali's user avatar
3votes
3answers
2kviews

How can I improve the speed of scanning multiple directories recursively at the same?

So I am trying to speed up my program by using concurrency and/or multi-threading and/or process parallelism. The topics are pretty complex and I am sort of new to them so I am still trying to figure ...
tera_789's user avatar
3votes
1answer
10kviews

How to approach a large number of multiple, parallel HttpClient requests?

I have a website which offers pages in the format of https://www.example.com/X where X is a sequential, unique number increasing by one every time a page is created by the users and never reused even ...
nicktheone's user avatar

153050per page
close