Questions tagged [concurrency]

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

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

374 questions
47
votes
5 answers

How does a movie theater seat booking system prevent multiple users from reserving the same seats?

In the movie theatre I go to they have ticket kiosks that allow you to select the seats you want; they also have a website that does the same (the website also has a countdown timer of like 30 secs in which you must choose a seat). While I…
mbwasi
  • 581
17
votes
7 answers

Why should I know concurrent programming?

Concurrent programming is quite difficult to me: even looking at a basic slide seems challenging to me. It seems so abstract. What are the benefits to knowing Concurrent programming concepts well? Will it help me in regular, sequential programming?…
13
votes
2 answers

Is The Free Lunch Over?

In his famous The Free Lunch Is Over article from 2005, Herb Sutter predicted a Concurrent Programming Revolution as big as Object-Oriented Revolution. Has this revolution really happend in years 2005 - 2013? Key points in the article: Processor…
cpp
  • 281
5
votes
2 answers

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 other processes then I'm facing a SME problem. 1)…
4
votes
3 answers

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 Method for decomposing into threads (data…
Jay
  • 141
3
votes
1 answer

Structured concurrency and GUI applications

Intro Structured concurrency is a relatively recent concept for structuring concurrent programs. It has implementations in for example Python, Java and Swift. Examples of structured concurrency often describe a server application which has to…
Lii
  • 471
  • 4
  • 7
2
votes
1 answer

What is the difference between local and non-local concurrency?

I was reading the Wikipedia article on Actor model and came across this line- ...bridging the chasm between local and nonlocal concurrency. What is this "non-local" concurrency and how is it different from "local" concurrency?
Gulshan
  • 9,442
1
vote
3 answers

Possible concurrency issues with database read/writes

For context, I am building an application with a server that is written in python, hosted on AWS, and uses DynamoDB for a database. My question pertains to the following operation: When a user purchases an item, I want to update the count of…
ashissl
  • 19
1
vote
2 answers

Approaches to dynamically determining if concurrency needed

There is a series of procedures, each of which falls into one of two general categories. Most of these are of category 1: it would be best to execute them one at a time - the overhead associated with threading or even using a thread pool negates any…
Aaron Thomas
  • 119
  • 5
0
votes
1 answer

Wrap REST API with a Lock to Support concurrent requests in a cluster environment

We are dealing with a third party API that doesn't handle concurrency, and we don't have access to the database directly. Our client application is deployed in a cluster environment and has multiple worker nodes sending update requests to this API.…