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 [parallelism]

The tag has no usage guidance.

1
vote
0answers
24 views

UML how to model parallel activity with runtime-dependent number of participants

I want to model an activity that involves processing several items in parallel. So to speak, I want to find a Activity Diagram representation for something like the following snippet / pseudocode: ...
2
votes
1answer
94 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 ...
3
votes
1answer
72 views

Architecture for Large-Scale Matrix Multiplication: Distributed Architecture or One Strong Server

I've asked a question about Scaling Matrix Multiplication by CPU Cores on StackOverflow and it seems that merely adding more CPU cores to this problem won't reduce the time to do Matrix ...
1
vote
1answer
86 views

Should I do parallel processing in RPC web service?

Recently I was reviewing my team leader pull request in our Web API hosted by Kestrel. There was a place in our code which is sort of hot path and we are processing frequently over hundred of items ...
2
votes
1answer
163 views

Designing a pause'able & resume'able task handler

I don't think the title describes the situation exactly. I apologize for the poor description. I'm trying to write a software system, in C++, that will have a heavy job (scanning the file system for ...
0
votes
0answers
19 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
260 views

Are design principles of functional programming languages and current hardware (register-machines) contrary?

Functional languages seek to minimize accidental state (computationally-convenient but logically unnecessary data dependencies) by endorsing the most granularly modular, mathematically unambiguous ...
-5
votes
1answer
62 views

two processes with same execute time [closed]

Process A take 10 seconds to finish an execution. Process B take 10 seconds to finish an execution. Is it possible to take 5, 8, 15 seconds to finish an execeution if they run stimulately.
2
votes
1answer
89 views

Docker and GPU-based computations. Feasible? [closed]

Recently I ran against this question and this Nvidia-docker project, which is an Nvidia Docker implementation and it made me wondering where, why and how this scheme makes sense? I found out some ...
0
votes
1answer
76 views

Definition and usage of “warp” in parallel / GPU programming

I have come across the word "warp" in a few places but haven't seen a thorough definition (there's no Wikipedia page on it either). A brief definition is found here: In the SIMT paradigm, threads ...
0
votes
1answer
82 views

Example of parallel sum algorithm on GPU

Trying to imagine how you would go about implementing summation (or reduction?) on a parallel architecture and am having a difficult time. Specifically thinking in terms of WebGL arrays of vectors ...
2
votes
1answer
297 views

Parallel processing a Tree on GPU

I have seen a few papers on parallel/GPU processing of trees, but after briefly looking through them I wasn't able to grasp what they did. The closest to a helpful explanation was found in ...
0
votes
0answers
34 views

Can data in a rooted tree be processed in parallel?

I have data that is structured like the following: users: id | name | parent_id 1 | Bob | NULL 2 | Jan | 1 3 | Mat | 2 4 | Irene | 2 5 | Ellie | 2 6 | Laura | 5 7 | Uma | 6 ...
5
votes
1answer
175 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 ...
0
votes
2answers
711 views

Threads - When to use barrier?

Using python syntax, threading.Barrier(NUM_THREADS) establishes a control point and all participating threads block until all of the participating “parties” have reached that point. It lets threads ...
2
votes
0answers
58 views

Sharing tasks among parallel independent jobs

I am getting files on HDFS and I have a legacy java app which checks for new files every 15 mins, does some transformations and write them to some remote server. Now, I am facing scaling issue with ...
-3
votes
1answer
240 views

Producing Consumers Thread Pool

I’m coding a Hash-Life implementation in C++14 and working on a multi-threaded implementation. It has obvious potential for multi-threading. The task can be broken down into essentially 13 sub-tasks. ...
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 ...
5
votes
1answer
500 views

Parallelism when using Azure Functions to update a DocumentDB document

I'm writing a web app which allows users to upload real-estate listings. Part of what this does is allow them to upload photos of the property they're listing. I'm using a micro-service type approach ...
1
vote
2answers
296 views

Decrement counter with high concurrency in distributed system

I am working on problem where a call to reduce a counter will come to a service and if counter is greater zero then call should be able to reduce it else fail. Pretty straightforward? huh! For 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 ...
6
votes
3answers
271 views

Server architecture for short bursts of ~150 parallel CPU-heavy subqueries

The client sends a query (a few hundred characters) to the web service. This query can be split into 20 to 150 subqueries with a simple regex. Those subqueries can then be computed independently and ...
1
vote
1answer
154 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 ...
1
vote
3answers
756 views

Processing queued tasks in parallel?

We have a system that publishes requests for processing into a database table. We also have a scheduled task that runs every minute and looks for pending requests in that table. If a request is found, ...
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)...
0
votes
2answers
84 views

How is server A faster than server B in some (or all) cases if B employs more parallel tasks?

After researching modern web servers, I feel that I am pretty ignorant when it comes to server design and concurrent task management by both the operating system and the server. I understand some ...
1
vote
1answer
129 views

What's the proper way to have one active callback at any time?

We have an Android app. The Android App uses Volley (https://developer.android.com/training/volley/index.html) to transmit network data. The point though is not about Volley, is about the pattern ...
1
vote
0answers
142 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 ...
1
vote
1answer
262 views

Does this workload fit GPU's?

I have a perfectly parallel function that would run great on a machine with 1024 cores and 4GB RAM. There's quite a lot of branching (doing set union and traversing structs). There is no communication ...
2
votes
2answers
80 views

Ideas on processing input text file in parallel by Bash script

I have a Bash script that processes files read from standard input, one pathname per line, and runs a CPU intensive task on each file. I happened to notice that even with four cores (grep -c ^...
3
votes
1answer
389 views

More scalable alternative to a transaction-per.request in a SQL+REST stack?

I'm new in web programming with SQL database. So please forgive my ignorance. I'm using some modern framework to make a REST server with a SQL database. I'm using transaction only when I think I need ...
2
votes
2answers
1k views

can a single SQL Server connection be shared among tasks executed in parallel

Can a single SQL Server connection be shared among tasks executing in parallel? Each task would dequeue an item from a ParallelQueue, instantiate a SqlClient command, and insert a row into the table. ...
10
votes
2answers
492 views

Why do programmers define programming models to replace C/POSIX for parallelism?

Providers of new computer architectures regularly try to introduce new programming models, e.g. recently CUDA/OpenCL for GPGPUs, and displace C/POSIX as the control interface to platform ...
5
votes
1answer
184 views

Querying large amount of data for parallel processing [closed]

I have a dataset containing list of users (around 50M). Each user has an email address, name, and some more data columns. I want to send a weekly email to those users, and the content of the email ...
5
votes
2answers
301 views

How to optimize/parallelize the following clustering/joining algorithm:

I have relatively-small algorithm that takes up ~60% of the total run-time of my scientific code (57 lines of 3600), so I would like to find a way to optimize what I'm doing and make the code order-...
3
votes
3answers
526 views

Which scenarios to use .NET Concurrent Collections effectively?

I am investigating how to introduce parallelism into an application to improve performance. In particular, I am looking at parallel for loops and their variants and my initial experiments show ...
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 ...
0
votes
0answers
43 views

Algorithm to minimize total processing time with multiple workers?

Say you have an office with 3 printers, all execute print jobs at exactly the same speed. Say you have a fixed order size of: 20 single page reports which take 10 seconds each 15 paper packets which ...
2
votes
0answers
75 views

What parallelization methods can make neural nets train faster?

A fairly straightforward way (on a theoretical level, at least) of parallelizing artifical neural networks (ANNs) would be to divy up the batches of training examples during every epoch so that ...
2
votes
2answers
71 views

Parallelising processing of users

Update I updated my question to reflect the fact I'm working with a database. I need to process user actions: The actions for each user change the user's balance which is then persisted to a database....
1
vote
0answers
59 views

Can't figure out how to parallelize the calculation of the amount of offspring expected for species in genetic algorithm

I developed a genetic algorithm in java 8 taking advantage of its reasonably free parallelism opportunities with Streams. As you are likely aware, running the epochs takes its time for even a test ...
1
vote
1answer
149 views

Matrix distribution to process grid

I need to write a program, which will perform LU-decomposition, etc. The problem is that I don't know about the preferred way to distribute the loaded matrix from the root process to other processes. ...
1
vote
0answers
405 views

What parallelism happens in a vector processor?

From Tanebaum's Structured Computer Organization A vector processor is very efficient at executing a sequence of operations on pairs of data elements. All of the operations are performed in a ...
3
votes
2answers
298 views

Strategy game, how do I calculate the parallel actions?

I am building a strategy game where multiple units(5 - 20) fighting each other. I have a game logic that calculate all the actions that been done on each turn, and send it to the game engine 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 ...
1
vote
2answers
701 views

Diagram to express parallelism in a process workflow

I'm modelling part of a software architecture on which several processes run as a workflow. The architecture involves data parallelism, where a certain serial process produces N pieces of data which ...
18
votes
1answer
934 views

Using uniqueness types to implement safe parallelism

I've been interested in uniqueness types as an alternative to monads in pure functional languages for some time; unfortunately, this is kind of an esoteric area of CS research and online resources ...
0
votes
0answers
187 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. ...
0
votes
4answers
178 views

Data Structure for Small Number of Agents in a Relatively Big 2D World

I'm working on a project where we will implement a kind of world simulation where there is a square 2D world. Agents live on this world and make decisions like moving or replicating themselves based ...
3
votes
1answer
674 views

Python multithreading and utilizing modern processors - what is the downside?

CPython implementation detail: In CPython, due to the Global Interpreter Lock, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome ...