Hi,
Say there's a statement waiting for a variable to be updated by another thread.
#in thread1:
while (flag == 0);
Without using any kind of lock, there might be a read-write conflict if one thread reads the variable while it's being updated by another one.
#in thread2:
flag = 1;
Can this lead to an infinite loop? or is the conf...
Say we have an embarrassingly parallel task, ants providing food for their queen for instance.
X = Amount of food needed
Y = Time it takes an ant to get a unit of food
Z = To get an ant to start foraging for food a single primary thread takes Z seconds.
The primary thread can spawn threads until the problem is fully solved but there i...
I'm working on a simple job threading framework which is very similar to the one described in id Tech 5 Challenges. On the most basic level, I have a set of lists of jobs, and I want to schedule these list across a bunch of CPU threads (using a standard thread pool for the actual dispatching.) However, I wonder how this signal/wait stuff...
Hi,
I'm pretty new to Python, and programming in general and I'm creating a virtual pet style game for my little sister.
Is it possible to run 2 while loops parallel to each other in python?
eg:
while 1:
input_event_1 = gui.buttonbox(
msg = 'Hello, what would you like to do with your Potato Head?',
title = 'Main Scr...
How can multiple calculations be launched in parallel, while stopping them all when the first one returns?
The application I have in mind is the following: there are multiple ways of calculating a certain value; each method takes a different amount of time depending on the function parameters; by launching calculations in parallel, the ...
Using clojure I have a very large amount of data in a sequence and I want to process it in parallel, with a relatively small number of cores (4 to 8).
The easiest thing to do is use pmap instead of map, to map my processing function over the sequence of data. But the coordination overhead results in a net loss in my case.
I think the r...
Currently I'm in the process of designing the messaging system for my application (which uses AMQP on the backend via RabbitMQ). There are going to be multiple instances where a method can get data from multiple sources at the same time (ie. doesn't have to be sequential queries).
Originally, I was going to use the ThreadPool and QueueU...
I just started learning how to use OpenMP. I am trying to figure out why the following code does not run in parallel with Visual Studio 2008. It compiles and runs fine. However it uses only one core on my quad core machine. This is part of the code that I am trying to port to a MATLAB mex function. Any pointer is appreciated.
#pragma om...
I've just completed a significant revision of my task pool/parallelization library for the D programming language. I'm interested in having the API critiqued, especially by people who are not regular users of D, but know a decent amount about use cases for such a library. I'd like to avoid the groupthink that would be created by asking...
I am writing an application that deals with lots of data (gigabytes). I am considering splitting the data onto multiple hard drives and reading it in parallel. I am wondering what kind of limitations I will run into--for example, is it possible to read from 4 or 8 hard drives in parallel, and will I get approximately 4 or 8 times the per...
We are looking into the solution that facilitate massively parallel data processing. Our processing graphs are often rather complex, so well developed operator framework like one Pervasive DataRush provides comes handy. Does anyone know any alternative solutions to one from Pervasive? DataRush is Java but I would like to consider all pla...
Hello,
I am slightly confused as to what "feature selection / extractor / weights" mean and the difference between them. As I read the literature sometimes I feel lost as I find the term used quite loosely, my primary concerns are --
When people talk of Feature Frequency, Feature Presence - is it feature selection?
When people talk ...
In the past I've used performance profiling tools such as nprof, Equatec profiler and Yourkit profiler to identify and remove/reduce performance bottlenecks in code mostly running in one thread (serialized execution). Nowadays I write a lot of multi-threaded code which can be slowed down by lock contention; what tools and tricks can be u...
(Any One There)
I am working on vehicle tracking system:-
I have n number of buses say
b1t1(start at 7 am and stop at 7 pm)
bt2 (start at 8 am and stop at 8 pm) and bt3 (start at 9 am and stop at 9 pm)
,where t is start time of a bus
now i h...
The more I research a couple topics with regards to ASP.net, the more I feel like there's a real gap on how and where to properly apply a few things to the ASP.net realm (both webforms and mvc).
Workflow Foundation
I love using WF; however, everything that I've ever read is that it's not recommended for ASP.Net apps because of the 1 wo...
Hi,
I have a massive, static dataset and I've a function to apply to it.
f is in the form reduce(map(f, dataset)), so I would use the MapReduce skeleton. However, I don't want to scatter the data at each request (and ideally I want to take advantage of indexing in order to speedup f). There is a MapReduce implementation that address th...
I have multiple processor objects which I use with ThreadPool to use them in a paralel process. Which processor I am going to use is basically depend on the incoming data and there might be more than 2000 different types; so as soon as my app runs it creates 1-2K number of processors in a dictionary and run the one I need according to in...
If I want to parallelize the execution of an algorithm what are the smalls chunks of code that I should split?
A classic example is a sorting algorithm. For what element size or typical execution time does it make sense to split the sorting between multiple threads? Or when is the overhead for waiting on another thread larger than the e...
I'm fairly new to OpenMP and I'm trying to start an individual thread to process each item in a 2D array.
So essentially, this:
for (i = 0; i < dimension; i++) {
for (int j = 0; j < dimension; j++) {
a[i][j] = b[i][j] + c[i][j];
What I'm doing is this:
#pragma omp parallel for shared(a,b,c) private(i,j) reduction(+:diff)...
I have implemented an iterative algorithm, where each iteration involves a pre-order tree traversal (sometimes called downwards accumulation) followed by a post-order tree traversal (upwards accumulation). Each visit to each node involves calculating and storing information to be used for the next visit (either in the subsequent post-or...