Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
39 views

Can Kubernetes help with providing more processing power for the same request?

I am fairly new to Docker and Kubernetes and I have a question for which I could not figure out the answer myself. I am working on an application that does string matching on data extracted from ...
1
vote
3answers
74 views

Workflow for designing a parallel architecture

I have been interested in parallel computing lately, and I just wanted to check if there's some sort of standard or workflow for designing a parallel architecture. In particular, I am interested in ...
0
votes
0answers
45 views

How to design parallel web api in c# .net 4.5?

I am trying to design a web api that can get data from an external server but with limitations. I'm trying to figure out how best to design it to be efficient. My api has an endpoint that takes an ...
2
votes
1answer
95 views

Relation Between Flynn's Taxonomy and Concurrency

I have known about the Flynn taxonomy for a while (SIMD, MIMD, etc.), as well as models of concurrency (actor model, petri nets, etc.). However I am wondering now how they overlap and interrelate. If ...
0
votes
0answers
21 views

Solution to Deal with Patching/Merging Problem in Parallel Data Synchronization

Introduction Say you have 10 processes going at the same time. These can be at different temporal scales: 10 browser sessions editing a document. Let's say there is a 100ms latency from the browser ...
3
votes
1answer
154 views

Design for avoiding concurrent calls to an interface implementation

The application I'm developing requires that some data is obtained through different channels. As this is a network process, I have decided to use async programming. I have designed the following ...
7
votes
3answers
423 views

How do I know if a set of code is a good candidate for parallelization?

How can I tell in an application if there are parts that will benefit from using the C# Task library (I believe that is the Parallel processing library.) Given other optimizations have been done, how ...
1
vote
2answers
395 views

How Functional Programming addresses concurrent increment/decrement operations invoked by different users?

Using Functional language, How can 2 different parties achieve the result of increment/decrement operations concurrently? For the below scenario, Let's say, I've 2 quantities in stock and 2 users in ...
6
votes
1answer
180 views

Immediately awaiting an asynchronous call [duplicate]

While working on an inherited project, I noticed the original dev(s) created many asynchronous functions that never seem to take advantage of being, well, asynchronous. For example: // The async ...
3
votes
2answers
240 views

Parallel sorting algorithm that compares all elements

I'm implementing an algorithm that needs to Sort elements, in parallel (this will be done on a GPU, but that doesn't matter much) Compute a comparison metric for every pair of elements. This ...
1
vote
2answers
167 views

Parallel algorithm: calculations on graph

I have general parallel programming question. Suppose there is a directed graph with cycles. Let’s assume that each node has fairly small amount of incoming edges ~ from 0 to 20 and potentially ...
0
votes
1answer
120 views

Celluloid actors parallel work slow?

I'm new to actors and just playing around in ruby using Celluloid. I have this code below module Enumerable # Simple parallel map using Celluloid::Futures def pmap(&block) futures = map { ...
0
votes
1answer
154 views

Implement an actor-based concurrent language in ruby?

How would one implement an actor-based concurrent language in ruby? My thought is that only the correct way of creating programs is using actors, but I'm not entirely sure on how this could be done, ...
26
votes
10answers
7k views

Programming language where every function call/block is done in a separate thread? [closed]

I'm currently creating a programming language for fun where the idea is that every function call/new block (if clauses, loops etc) will work in a separate thread. Instead of creating new Threads the ...
1
vote
0answers
74 views

What specific attributes make code able to be executed in parallel? [closed]

List specific programming concepts that should code adhere to that it will run in parallel. For example, if a block of code does not change shared state, it should be able to be done on another thread....
0
votes
1answer
233 views

How to manage threads in a framework

I'm developing a framework with C++, and it contains three layers: Low level functions which do the hard work An upper layer which uses the low level functions to accomplish tasks (functions at this ...
2
votes
2answers
869 views

Parallel Image Processing Best Practices

When doing (possibly heavy) pixel processing on a large image, multithreading becomes a must. The standard practice is to initiate a loop whose indices are partitioned into multiple threads within a ...
3
votes
2answers
111 views

Get service data of future iterations

I have a doubt with threading data service calls within a foreach loop. Here it goes: Say you need to request data from a service and then process that data, for this example, let's say data request ...
1
vote
1answer
160 views

parallel programming memory usage

I am starting to learn parallel programming in c++, and I have a program like this: for i = 1:N do something time and memory intensive end If I program this in parallel, and my processors have ...
0
votes
3answers
459 views

Excute Procedure in Parallel or Async

I have inherited an application which performs approximately 100,000 executions in a C# for-loop against SQL Server. for (int i=0; i<100000; i++) { //Execution can take 0.250 to 5 seconds to ...
1
vote
4answers
1k views

Best algorithm to multi-thread this application?

I define an algorithm to be best if it minimizes the total run time over commodity hardware (e.g. normal desktop and server PCs). I have sets A and B. I also have function f that works like f(a, b, n)...
-1
votes
2answers
133 views

Designing an application with safe paralleled tasking

The title may have been a little vague... I am working on a piece of software that is designed to perform one task. I would like this task to work in parallel, allowing for multiple asynchronous ...
0
votes
0answers
79 views

OpenMPI: Speeding up process

I have a scenario where suppose I have 10 files, each with lots of values(~100,000) of co-ordinates (x,y,z). Now I use open MPI to create 10 processes ,each of which read from its assigned file and ...
1
vote
0answers
144 views

One producer and one consumer vs inconsistent shared resource state

I was reading about implementation of producer-consumer problem with one producer and one consumer. Looking at this paragraph I see the implementation where shared resource access is not synchronized ...
-2
votes
1answer
50 views

Grand Central Dispatch efficiency

Running a ray tracing program as a single thread on an iMac quad-core processor the CPU utilisation is 12%. OK so one of the Intel hyper-threads has been 100% allocated to the process. When GCD is ...
6
votes
1answer
670 views

Partially parallel producer-consumer pattern with internal state

I need to implement a producer-consumer pattern for reading, processing and saving electrical values. I have to implement this in C# .NET 4.6.1. I try to describe this in great detail, so that there ...
1
vote
2answers
3k views

Is python list comprehension using multi-threading or parallelized in any way by default?

When I write... l2 = [my_computation(x) for x in l] ..., I wonder if python is applying my_computation to every x using all cores of my CPU. If not, why ? Is there a simple way to make python ...
0
votes
1answer
148 views

Raspberry pi computer cluster question?

I am wanting to have/ or make a program that runs on a (raspberry pi)computer cluster with one pi executing only video content while the other only handles music, etc under a main program like an AI. ...
0
votes
0answers
87 views

can a parallel queue empty itself?

Is there a way to accomplish this pseudo-code in C# in .NET4.5? parallelQueue.attemptDequeueFirstItem(item) success -> ( doAsyncTask(item).Success(UpdateDatabase) ) ...
0
votes
1answer
509 views

Is the logic behind `Asyncio.wait()` and async/await, the same, just the code is written differently (syntax)?

I'm learning Python, more specially parallel programming using Python Parallel Programming Cookbook by Giancarlo Zaccone. At the time the book was published async/await was still in the beta version ...
42
votes
5answers
10k views

What is it about functional programming that makes it inherently adapted to parallel execution? [duplicate]

I've been reading over and over that functional languages are ideal (or at least very often useful) for parallelism. Why is this? What core concepts and paradigms are typically employed and which ...
1
vote
3answers
656 views

Executing scripts in parallel based on dependency tree

We have an app that is using a fairly simple stack (Linux, PHP, Oracle, Shell Scripts, etc). We have a series of scripts that need to be executed: /scr/app1/start.sh /scr/app2/start.php /scr/app3/...
20
votes
10answers
4k views

Do algorithms depend on computer architectures?

I read somewhere (forgot which book it is) that algorithms are independent of computer architectures. Some even say algorithms are themselves computation (machines?)? On the other hand, books on ...
5
votes
2answers
998 views

Why is the Jacobi method a good candidate algorithm to implement on a GPU?

I understand that GPU's has hundreds of cores that can handle thousands of threads all at once and that with the Jacobi iteration you're essentially using the same numbers over and over again to ...
3
votes
1answer
194 views

Does parallel mergesort run differently on mesh vs linear array of processors?

I'm currently taking course on introduction to algorithm and I came across the parallel mergesort algorithm. My question is: Is there any differences in the algorithm plan if it runs on a 2d mesh ...
2
votes
0answers
160 views

Does OpenMp have support for Real Time Multiprocessor Computing?

I am working on a real time multiprocessor scheduling algorithm. I found very few results via google research related to it. A few simulators are available but are not robust enough. OpenMp is an ...
0
votes
0answers
189 views

Whats the best way to parallel my problem using Java API

I´m with trouble, because I want to make faster my code using threads, fork in join or any kind of parallel. I did a code using fork in join but I saw my arraylist isn´t getting the correct values. ...
-1
votes
1answer
1k views

Extracting data from log files

I will be extracting certain bits from log files using regular expressions to filter out bit of data. Initially I was going to do this with Python. I later started to think about the fastest way I can ...
0
votes
0answers
160 views

Report generator windows service polling database for work

I'm building a new report generator for our in-house survey system. (No I can not use any off-the-shelf software. These are highly customized reports.) I want to use Topshelf to host the generator as ...
0
votes
0answers
68 views

Help in finding the total time taken by the entire production?

I have a line object and each line object has an array of tasks associated with it.Each task has a start time and an end time.Each task also has a list of tasks which are its predecessors. So if all ...
6
votes
1answer
577 views

Help/suggestions for Parallel assembly line scheduling (Dynamic programming)

I am working on a problem similar to the assembly line scheduling by dynamic programming.The issue is that unlike the classic problem where we have predefined stations now I only have information ...
2
votes
3answers
1k views

Parallel.For Inconsistency results

I am using VB.net to write a parallel based code. I use Parallel.For to generate pairs of 500 objects or in combination C(500,2) such as the following code; but I found that it didn't always generate ...
0
votes
2answers
2k views

Memory allocation of Classes that don't have any global data and locks

static void Main(string[] args) { var c2 = new Class2(); var c3 = new Class3(); var c1 = new Class1(c2, c3); c1.Method1(); } class Class1 { ...
2
votes
6answers
571 views

Is an atomic action supposed to be deterministic?

I was reading about the at most once property that defines what an atomic action is and I've been curios about this example: x = 0, y = 0 x = y + 1 || y = y + 1 If we use the 'at most once' ...
1
vote
0answers
430 views

Parallel Programing in C#

I have a code where I have to read some Binary files in database. I wrote a For loop that iterate over my file path array, then it call a READ function that read that file into database. I run this ...
6
votes
1answer
1k views

Which parallel pattern to use?

I need to write a server application that fetches mails from different mail servers/mailboxes and then needs to process/analyze these mails. Traditionally, I would do this multi-threaded, launching a ...
5
votes
1answer
717 views

How can I benchmark concurrent key-value stores?

I have some concurrent key-value store implementations that are implemented with hash tables and search trees that I would like to compare. I would like to benchmark them with a real world application ...
1
vote
2answers
437 views

Relation of CPU Hz's and network speed in clusters

In cluster the Amdahl's law, Gustafson's law exists. I though that there might be some law which states the relation between CPU Hz's and network speed: maximum network speed after which no ...
1
vote
1answer
1k views

Parallel computing using xcode

I'm making mandelbrot fractals in C using Xcode and I want to use parallel computing but everything I've tried so far doesn't work. Such as This Question and other how to guides. Whats the easiest way ...
6
votes
1answer
245 views

Asynchronously returning a hierarchal data using .NET TPL… what should my return object “look” like?

I want to use the .NET TPL to asynchronously do a DIR /S and search each subdirectory on a hard drive, and want to search for a word in each file... what should my API look like? In this scenario I ...