Most voted "parallelism" questions
Parallel computing is a form of computation in which multiple calculations are performed simultaneously, operating on the principle that large problems can usually be divided into smaller problems, which are then solved concurrently (in parallel).
Learn more…66 questions
Sort by count of
-
124
votes8
answers5920
viewsIs it always guaranteed that a multi-threaded application runs faster than using a single thread?
It is possible to observe in some cases that the separation of tasks into multiple threads does not give gain and even makes an application slower than the use in thread unique. It should not always…
competition performance multithreading parallelism optimizingasked 10 years, 10 months ago Maniero 444,682 -
20
votes3
answers2015
viewsWhat is the difference between async, multithreading, parallelism and competition?
What is the difference between async, multithreading, etc..? They depend on the amount of processor cores? If I do a program in Visual Basic and open 33 instances of it, would it be running in…
-
20
votes3
answers8582
viewsWhat are Parallel.For and Parallel.Foreach loops?
I saw the use of Parallel.For and Parallel.ForEach in some places, I know they are loops, but I didn’t understand how and when to use them and I have my doubts. What are loop Parallel.For and…
-
15
votes3
answers5066
viewsWhat is parallel programming?
I have some doubts about parallel programming: What is parallel programming? It is a technique or a programming paradigm? Is there a specific language for parallel programming? Where parallel…
-
14
votes1
answer12287
viewsConcurrent Programming x Parallel x Distributed
What are, what are the characteristics of each? Problems that each one proposes to solve? Main difference between them?
-
11
votes1
answer252
viewsIn a map/reduce in Java, should the accumulation operation generate a new object? Or can I use the old one?
I have an application that creates several objects on top of a stream of functions. And then I collect all these generated objects in a accumulator. For example, if I generated strings and…
-
10
votes1
answer187
viewsPersist "pieces" of a tree (large) in parallel
I find myself with the following problem at hand: Goal: Parallelize an ETL process that: Reads from an external interface a tree with an undetermined number of elements. Transforms the…
-
8
votes3
answers918
viewsParallelism and Simultaneity
Reading a few things on the subject, I realized they are not the same thing, so I would like to find out: What’s the difference between Parallelism and Simultaneity in proceedings?…
-
8
votes1
answer638
viewsWhat is the pcntl_fork function for?
I was looking for some solution in PHP, where I could run a script without waiting for a certain function that processes time-consuming things to be expected to finish the execution of it. I came…
-
8
votes1
answer385
viewsWould "Promise.all" (and other similar functions) be an example of Javascript parallelism?
In Javascript, we have the Promise.all, that solves an array of promises in a single Promise. This process is apparently parallel, since the promises are resolved at the same time, and not in a…
-
7
votes2
answers664
viewsWhat are the advantages of Parallel.Foreach in C#?
Working with C# I saw that we have the option to work with parallel.ForEach(). What is the advantage of working with her and not the foreach?
-
7
votes2
answers2995
viewsHow the Parallel hint works
One of the first things I see a crowd suggest to boost the performance of a query in the Oracle is the use of hint Parallel. What benefits/risks the use of this hint can bring, I may have problems…
-
7
votes1
answer5602
viewsWhat is the meaning of the acronyms SISD, SIMD, MISD, MIMD? What is your relationship with programming?
In some answers and questions I see quotations to these acronyms. They usually fit in the following table: | Single data | Multiple data Single instruction | SISD | SIMD Multiple instruction | MISD…
-
6
votes1
answer226
viewsWhy a loop FOR faster than 10 FOR together
I made a for alone count up to 1000000 (sending 1 message each loop) and it took 14 seconds. public class main { public static void main(String[] args) throws InterruptedException { long init =…
-
6
votes1
answer550
viewsNumber of threads on a 16 processor machine
A question fell on my proof of Operating Systems and I was in doubt. During the race I got confused and marked alternative D, today I know she is wrong and has nothing to do with it. I am tending…
-
6
votes1
answer360
viewsC# Parallel.Foreach Javascript equivalent
I’m trying to write methods with behavior similar to Array.prototype.forEach and the Array.prototype.map, but using multiple threads. In the case of Array.prototype.parallelMap, I did the following:…
-
5
votes1
answer264
viewsParallelism and Entity Framework
I’m having some problems using parallelism (I don’t have much knowledge in this area) with C# and Entity Framework. My scenario is as follows, I am using an ASP.NET MVC application and within it I…
-
5
votes1
answer181
viewsHow to parallelize on multiple levels in R?
I’ve been researching how to parallelize for in R and found the package foreach, which, from what I understand and correct me if I’m wrong, replaces the for as follows: library(foreach) vetor <-…
-
5
votes1
answer126
views(NODE) What good is a processor with multiple nuclei if Nodejs only runs on one thread?
Example: If I want to set up a server, then I have to "worry" about the clock and not the amounts of nuclei ? Like, if I have two processors to buy X-Processor -> 8 2.0GHz Nucleus &&…
-
4
votes2
answers90
viewsProblems Embarrassingly Parallel?
I was looking for problems called "embarrassingly parallel", which are problems that there are no dependencies between tasks, which can be divided in parallel. Could you give me some suggestion of…
parallelismasked 10 years ago Bruno 656 -
4
votes2
answers630
viewsJava Fork/Join Does it work the same as C Fork?
Discussing with a friend about a matrix calculation solution that we are developing, the following question arose. Java Fork/Join Framework operation is equal to C? Reading a little I could not…
-
4
votes1
answer115
viewsWhat is the best way to make multiple requests to an API?
I came to ask this question once again thinking that it would be beneficial for the community to have a canonical way of making several http requests to a particular API. More specifically this…
-
4
votes1
answer160
viewsUsing Callable in java runs code sequentially
I am making a server in java wanted to perform certain tasks in parallel. I have a list of a certain type I want 20 threads to deal with elements of the list. for( Item item : result ) {…
-
4
votes1
answer225
viewsRatio of threads to number of processors
In the image below my task manager there are 3058 Threads. My processor has 4 threads. This means that of these 3058 it will run 4 in 4 threads? My processor has 4 cores and 4 threads, that means…
-
4
votes0
answers37
viewsWhat are the differences between Asymchronism, Parallelism and Multithread?
Sometimes the terms Asynchronous, Multithread and Parallelism appears whenever I do a search related to multiprocessing or something related. However, I have a hard time understanding the…
-
4
votes0
answers38
viewsDo the processes executed in parallel relate to the number of Cpus nuclei?
I’m studying the module multiprocessing of Python, in which allow me to run several processes in parallel (in my understanding). As an illustration case let’s see the example below: import time from…
-
3
votes0
answers48
viewsParallel Computing -how does the data dependency work?
I’m studying a little bit about parallel computing and I’m doubting how data dependency works?
parallelismasked 7 years, 3 months ago Um Programador 1,491 -
3
votes1
answer64
viewsperform . Globalenv function in parallel processing
I need to execute a function that is in . Globalenv in a parallel processing using the multidplyr package. Using a simple example without parallel processing, it works as expected: library(dplyr)…
-
3
votes1
answer1356
viewsPython serial vs multiprocessing vs threading code
I’m using python version 3.4 How do I find out that my codes are actually working and doing what they’re supposed to? When looking at the System Monitor (linux) I noticed that codes using…
-
3
votes1
answer384
viewsAsparallel(). Forall vs async await
When to use AsParallel().ForAll, and when to use async await? I am providing an example with a download and file manipulation routine. The AsParallel().ForAll has better performance in the download…
-
2
votes3
answers1447
viewsFork in Join in Java
During a project I was suggested the use of Fork in Join of the Java API instead of threads, I found nothing easy to understand by the examples found on Google. I understood that it is possible to…
-
2
votes1
answer67
viewsIs there a race condition problem in my code?
Is there any problem of race condition in the code below? Private Shared Sub TestRandomNumberGeneration(ByVal random As Random) Dim failed As Boolean = False Parallel.For(0, 100000, Sub(i, state)…
-
2
votes1
answer119
viewsError writing to Mongodb using C#Parallelism
I have a collection on Mongo that has subdocuments, so I read xml files and write them to Mongodb. Each xml file is a document in Mongo. My classes public class Cabecalho { public Cabecalho() {…
-
2
votes1
answer384
viewsUsing classes from the java.util.Concurrent package to multiply matrices on android?
I was doing this program to multiply matrices, I saw that it correctly calculates the result, but there is no performance gain by putting more threads, often even worse performance despite running…
-
2
votes1
answer62
viewsHow to work with Parallel using the Ninject library
How can you configure ninject to provide an instance of a given object for each thread that calls it? The ninject kernel can be run before a code with parallelism or it is necessary to instantiate a…
-
2
votes2
answers1285
viewsNumber of simultaneous requests a PHP server supports
Let’s say I have a server with a 4-core/8 i7 processor threads. In an architecture multi-threaded, assuming that a thread by request, only 8 simultaneous requests will be allowed, since the…
php software-architecture multithreading parallelismasked 7 years, 2 months ago Filipe Moraes 8,737 -
2
votes1
answer95
viewsParallelize with just one core?
I want to parallelize an application, in this case a 'Cosine similarity' calculation, but the machine I am working on has only one core. Parallelizing this calculation with just one core will have…
-
2
votes2
answers1322
viewsI understand a parallel run using Fork. How does Fork work?
import os def filho(): print('Ola do filho', os.getpid()) os._exit(0) def pai(): while True: newpid = os.fork()# fornece ID para um novo processo! if newpid == 0: filho() else: print('Ola do pai',…
-
2
votes1
answer46
viewsHow to parallelize a sapply with table
I can perform the sapply smoothly, but I can’t parallel. In the original script I have more than 9,000,000 lines and so it is impossible to continue without parallelization.…
-
2
votes1
answer504
viewsHow to use joblib in Python for parallelism?
I was trying to use the Thread Python to parallelize my code but I ran into a problem: when I create the Threads, the number of them exceeds 1,000 Threads easily, which, from 140, all start to give…
-
2
votes0
answers15
viewsCUDA. Threads "disappearing" in sequential executions
I have been working on a project using CUDA to perform a segmentation operation. In my project I have some conditions if which modify a matrix by adding a 1 to the index of this matrix according to…
-
1
votes1
answer179
viewsHow to use Futuretask class correctly?
I’m looking to calculate the number of numbers that can be divided by a splitter with no rest in parallel. The problem is the result of the method always return to half of what it should, it seems…
-
1
votes0
answers75
viewsParallel calculation using Geforce Cuda
I have the following method that calculates the value of PI in a serial way: public static double CalculoPISerie() { double integral = 0; double h = 1.0 / NUMERO; for (int i = 0; i <= NUMERO;…
-
1
votes1
answer140
viewsFor nested in parallel
I’m trying to spin two for nested. The second would like it to be parallel. It follows my code. for (int i = 0; i < original.Width; i++) { Parallel.For(0, original.Height, j => { Color…
-
1
votes0
answers31
viewsHow can I check lock-free (lock-free) algorithms?
Is there any tool/process/methodology available to prove that a competing program but that does not use Locks in its critical regions is correct?
-
1
votes2
answers243
viewsParallelism in Sql Server with C#
I am implementing async methods in C# and would like to know how to proceed when I arrive in Sql. When I open a connection to sql server, does it allow me to parallelize through just one connection?…
sql-server async asynchronous parallelismasked 7 years, 3 months ago Fernando Augusto De Almeida Ba 91 -
1
votes0
answers60
viewsFaster parallel process but doubles billet number
I have a process that needs to go through a list of 3000 accounts receivable, generate a billet number and save. I made an approach in parallel that is much faster, but doubles the number of…
-
1
votes0
answers134
viewsParallelization of Bubblesort Open-MP C++
I’m trying to paralyze the bubblesort algorithm using Open-MP and C++, and the parallelization strategy is pipe. The following code, to me, makes sense, but it doesn’t work, and only sorts the…
-
1
votes1
answer116
viewsHow to use Lock Functions (Lock Routines) from Openmp?
I need to create 5 easy-to-understand algorithms for each of the blocking functions below in C or C++ to be able to exemplify how each one works and present to my office staff.…
-
1
votes1
answer168
viewsDoubt about parallel programming
I’m starting to learn parallel programming, and I’m looking to compare a program with a single thread with a multi thread. What I thought was to make a very simple algorithm that, in a 1-minute…