Concurrency is a property of systems in which several processes are executing at the same time.
6
votes
2answers
157 views
Would Task-based programming in C++ require new language standard features?
So I saw this video on Youtube with all these C++ masters on GoingNative 2012 : Interactive panel where everybody could ask the questions.
This is the video I was talking about: GoingNative 2012 - ...
3
votes
0answers
131 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 ...
6
votes
4answers
365 views
Functional Programming: right ideas about concurrency and state?
FP proponents have claimed that concurrency is easy because their paradigm avoids mutable state. I don't get it.
Imagine we're creating a multiplayer dungeon crawl (a roguelike) using FP where we ...
0
votes
3answers
235 views
Multiple threads and single output source
For the sake of an exercise, say you have an input file with a series of lines of text with the objective of reversing their respective character sequences.
Now introduce 5 threads that will each do ...
8
votes
4answers
570 views
The difference between “concurrent” and “parallel” execution?
What is the difference between the terms concurrent and parallel execution? I've never quite been able to grasp the distinction.
The tag defines concurrency as a manner of running two processes ...
0
votes
2answers
136 views
How bad would it be to obtain a lock on every object?
Imagine a hypothetical programming environment that is largely like Java or .NET, i.e. object-oriented, garbage-collected, etc., but with one small change:
Every time you call a method on an object, ...
18
votes
3answers
1k views
Why five dining philosophers?
I was wondering why the Dining philosophers problem is based on a five philosophers case. Why not four?
I guess that we can observe all unpleasant issues that can occur when discussing five ...
4
votes
2answers
182 views
What is a good script language for writing server administration tasks? [closed]
I am administering hundreds of RHEL servers. There are many daily tasks to perform. Right now I am working with bash scripting and python. I was wondering if other languages such as Erlang, Lua, Ruby, ...
7
votes
1answer
227 views
In what meaningful ways does Erlang prevent race conditions in concurrent programming?
Reading about concurrency in Erlang, reminds me of the Akka concurrency toolkit. Both give you tools to prevent or limit race conditions. But you can send links to mutable data to other processes ...
2
votes
1answer
229 views
Common Lisp Implementations - threading and multiplatform?
I'm learning Common Lisp, mostly as a "mind gym" hobby thing, but I want to end up with a set of skills that would also be usable "in real life", because when you learn a language you also accumulate ...
1
vote
1answer
91 views
Design question about a concurrent forking server
I'm in the early stages of designing a client/server application. The clients will be batch programs that read a file of customer contact data (name, address, email address, phone no's) and pass ...
15
votes
3answers
1k views
Why is multithreading often preferred for improving performance?
I have a question, it's about why programmers seems to love concurrency and multi-threaded programs in general.
I'm considering 2 main approaches here:
an async approach basically based on signals, ...
10
votes
2answers
2k views
Are these advanced/unfair interview questions regarding Java concurrency? [closed]
Here are some questions I've recently asked interviewees who say they know Java concurrency:
Explain the hazard of "memory visibility" - the way the JVM can reorder certain operations on variables ...
0
votes
1answer
113 views
Concurrency checking with Last Change Time
I have an app with the following three tables
Email (emailNumber, Address)
Recipients (reportNumber, emailNumber, lastChangeTime, status)
Report (reportNumber, reportName)
I have a C# application ...
2
votes
1answer
115 views
How to keep background requests in sequence
I'm faced with implementing interfaces for some rather archaic systems, for handling online deposits to stored value accounts (think campus card accounts for students).
Here's my dilemma: stage 1 of ...
4
votes
2answers
285 views
Help me understand a part of Java Language Specification
I'm reading part 17.2.1 of Java language specification: http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.2.1
I won't copy a text, it's too long, but I would like to know, why for ...
1
vote
2answers
122 views
Requiring multithreading/concurrency for implementation of scripting language
Here's the deal: I'm looking at designing my own scripting/interpreted language for fun. I'm only in the planning stages right now; I want to make sure I have a very strong hold on exactly how I will ...
5
votes
3answers
445 views
how to verify ConcurrentHashMap is threadsafe?
As the jdk doc said, ConcurrentHashMap is thread safe and it doesn't block multiple thread read. It is not necessary to doubt that since it was under many and restricted test. But I just curious how ...
5
votes
2answers
507 views
Can Clojure's thread-based agents handle c10k performance?
I'm writing a c10k-style service and am trying to evaluate Clojure's performance. Can Clojure agents handle this scale of concurrency with its thread-based agents? Other high performance systems ...
3
votes
2answers
102 views
Why should most logic be in the monitor objects and not in the thread objects when writing concurrent software in Java?
When I took the Realtime and Concurrent programming course our lecturer told us that when writing concurrent programs in Java and using monitors, most of the logic should be in the monitor and as ...
3
votes
2answers
201 views
I have data that sends in “bursts” of 100 records with a significant delay. How do I structure my classes for multithreading?
My datasource sends information in 100 batches of 100 records with a delay of 1 to 3 seconds between batches.
I would like to start processing data as soon as it's received, but I'm not sure how to ...
3
votes
3answers
588 views
What's the opposite of parallel/concurrent execution?
In my program, I give the ability to execute certain code either as parallel or non-parallel. I don't know what to call the non-parallel option though. Is Linear a good term?
What would be the best ...
1
vote
3answers
669 views
How can I multiprocess my program?
I wrote a program which scrape internet sites. It is pretty straigtforward because it process link one by one.
With the limiting factor of the internet speed, the process is rather slow.
I wonder, ...
1
vote
1answer
237 views
Can I implement the readers and writers algorithm in OpenMP by replacing counting semaphores with another feature?
After reading about OpenMP and not finding functions to support semaphores, I did an internet search for OpenMP and the readers and writers problem, but found no suitable matches.
Is there a general ...
31
votes
7answers
2k views
Are there deprecated practices for multithread and multiprocessor programming that I should no longer use?
In the early days of FORTRAN and BASIC, essentially all programs were written with GOTO statements. The result was spaghetti code and the solution was structured programming.
Similarly, pointers can ...
0
votes
2answers
355 views
How can we handle multiple instances of a method through a single class instance
How can we handle multiple instances of a method through a single class instance(Single constructor call)?
To elaborate, I have a handler class which has two methods lets say verifyUser(String JSON) ...
7
votes
1answer
441 views
Conceptually what does it mean when it is said that each thread gets its own stack?
I have been reading Java Concurrency in Practice by Brian Goetz and inside the section Stack Confinement it is mentioned that each thread gets its own stack and so local variables are intrinsically ...
3
votes
1answer
149 views
How could one make a reasonably efficient, pointer-sized mutex?
I have my own ideas about how a pointer-sized mutex could be made: The integer is used as a set of flags, counter, index, and a spinlock that guards an entry in a table of pre-allocated kernel objects ...
5
votes
2answers
220 views
Good reasons for destroying mutexes with waiting threads
I'd like to see some valid examples of needing to let a thread enter a locked, non-re entrant mutex, then destroying the mutex (which supposedly terminates the thread).
I can't think of any good ...
1
vote
1answer
398 views
Java BufferedReader vs Separate Producer consumer thread
I have a very big file delimited by some sequence of characters '*L*I*N*E'. The file will be of the order of 250G. And each line comes around 600bytes to 1000 bytes. I will be performing the following ...
1
vote
2answers
623 views
Performance of concurrent software on multicore processors [closed]
Recently I have often read that, since the trend is to build processors with multiple cores, it will be increasingly important to have programming languages
that support concurrent and parallel ...
2
votes
1answer
81 views
concurrency semantics reading a file being written (ext)
In Ext 3/4 filesystem, if I have a log file open and being appended to, if another process tries to read it (e.g. with cat), what happens?
Can the reading process read part of / an incomplete write?
...
7
votes
2answers
207 views
Parallelism implies concurrency but not the other way round right?
I often read that parallelism and concurrency are different things. Very often the answerers/commenters go as far as writing that they're two entirely different things. Yet in my view they're related ...
2
votes
3answers
174 views
What are the usual difficulties in concurrent programming and tuning of concurrent programs (shared-memory model)?
I can list part of the problems that will show up when writing a moderately-sized concurrent application with shared memory:
Locking granularity
Choice of synchronization primitive
Number of threads
...
1
vote
2answers
284 views
How can I avoid concurrent access in PostgreSQL?
I would like to have your opinion, how I can handle the case when PDO engine and Hibernate engine "talk" to the same db? There is a PHP application as frontend, and a Java doing some job after user ...
7
votes
4answers
529 views
scalablity of Scala over Java
I read an article that says Scala handles concurrency better than Java.
http://www.theserverside.com/feature/Solving-the-Scalability-Paradox-with-Scala-Clojure-and-Groovy
...the scalability ...
3
votes
1answer
138 views
Concurrency with listeners and upload: is this solution sound?
I'm working on an Android app.
We have listeners for position data and camera capture which is timed on a background thread (not a service).
The timer thread dictates when the image is captured ...
5
votes
5answers
729 views
What is a comprehensive book on concurrent programming?
I'm looking for a book with a broad, comprehensive overview of concurrent programming. A lot of books focus on one language, platform, or concurrency technique. I'm more interested in a book that ...
1
vote
1answer
386 views
Static objects and concurrency in a web application
I'm developing small Java Web Applications on Tomcat server and I'm using MySQL as my database.
Up until now I was using a connection singleton for accessing the database but I found out that this ...
4
votes
8answers
429 views
When should I use parallelism?
After asking this question, I got to realize that parallelism may not always be good.
So far I can see that parallelism (under c#) is
A little complicated code-wise
Will probably insert some ...
6
votes
4answers
2k views
Real world usage of DelayQueue
What would be a real world usage of DelayQueue, what common problem it was design to solve?
3
votes
1answer
712 views
How to read from a database, and write to a file asynchronously / non blocking way in Java
I'm trying to modify a serial program that reads from a database, and writes results to a file, this is done in a blocking way and I think we can get performance boost of there is a memory buffer and ...
3
votes
2answers
300 views
How are you using CFThread in ColdFusion Applications? [closed]
I'm presenting on Concurrency in ColdFusion at CFObjective this year, and I'd like to hear how you're using CFThread in your ColdFusion applications.
In addition, what problems have you had while ...
3
votes
3answers
154 views
Actor based concurrency and cancellation
I'm reading about actor based concurrency and I appreciate the simplicity of actors sequentially processing messages on a single thread. However there is one scenario that doesn't seen possible.
...
5
votes
3answers
415 views
How to avoid halting of the JVM due to a deadlock in java?
I have read many websites talking about how to avoid and how to design etc. I completely understand those strategies.
My question is based on the following preconditions:
You have a company with ...
6
votes
4answers
2k views
Problems of multiple threads sharing/accessing the same data
I have been researching into when data is being accessed or shared by multiple threads within Java. And looking into the problems such as:
Thread Interference
Memory Consistency
Deadlock
Starvation
...
9
votes
4answers
595 views
What are the best resources for learning about concurrency and multi-threaded applications?
I realised I have a massive knowledge gap when it comes to multi-threaded applications and concurrent programming. I've covered some basics in the past, but most of it seems to be gone from my mind, ...
4
votes
1answer
386 views
Selective mutual exclusion in Dining Philosophers and Readers and Writers problem
I've been reading about selective mutual exclusion (SME). The idea I got is that if a process competes for its resources against a subset of all the other process instead of competing with all the ...
6
votes
3answers
446 views
Rendezvous in Ada
In a test I was asked:
What elements present in the general form of a rendezvous are not present in Ada language?
I was a bit stumbled as I thought Ada fully supported rendezvous. Now it seems ...
7
votes
3answers
256 views
Optimistic work sharing on sparsely distributed systems
What would a system like BOINC look like if it were written today?
At the time BOINC was written, databases were the primary choice for maintaining a shared state and concurrency among nodes.
Since ...