Concurrency is a property of systems in which several processes are executing at the same time.

learn more… | top users | synonyms

0
votes
3answers
546 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 ...
10
votes
4answers
9k 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
184 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
412 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
433 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 ...
5
votes
1answer
1k 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
143 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 ...
16
votes
3answers
5k 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, ...
11
votes
2answers
4k 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
280 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
243 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
365 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
212 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
892 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
999 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
147 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
463 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 ...
1
vote
3answers
2k 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, ...
2
votes
1answer
741 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 ...
33
votes
7answers
3k 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 ...
1
vote
2answers
1k 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) ...
8
votes
1answer
1k 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
184 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
318 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
723 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 ...
2
votes
2answers
1k 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
91 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
916 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
272 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
570 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 ...
8
votes
4answers
771 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
230 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 ...
1
vote
1answer
644 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
571 views

When should I use parallelism? [closed]

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 ...
9
votes
5answers
5k views

Real world usage of DelayQueue

What would be a real world usage of DelayQueue, what common problem it was designed to solve?
3
votes
1answer
1k 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
407 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
207 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
871 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 ...
5
votes
4answers
5k views

Problems of multiple threads sharing/accessing the same data [closed]

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 ...
13
votes
3answers
3k 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
585 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
667 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
282 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 ...
1
vote
2answers
282 views

Are there any advantages of using separate RDBMS for reports?

My production database is SQL Server 2008 R2 Express. It has limited features and I am testing it in a production environment. To better handle reporting queries in a highly concurrent environment, I ...
2
votes
2answers
318 views

Concurrent Data Processing by Multiple People

Let's say I have a page, accessible by several people concurrently, that lists information that must be processed in some way by the user, after which it is either marked as "completed" and ...
8
votes
2answers
3k views

Looking for a distributed locking pattern

I need to come up with a custom recursive object locking mechanism\pattern for a distributed system in C#. Essentially, I have a multi-node system. Each node has exclusive write permissions over ...
2
votes
3answers
514 views

Sharing buffer between multiple threads part 2

This is a follow up to my previous not answered question, so I try to make it more clear: last question. I have a n-size buffer that is filled up from an external source, it has 2 main methods get() ...
2
votes
5answers
634 views

Programming language with native concurrency support for large graphs?

I'm currently looking for a new programming language to learn (currently working through some C++, know some C and Python), specifically one that has built-in concurrency support? I want to try to ...