At a time where the clock speeds of processors have been stable over the past
couple of years, and Moore's Law is instead being applied by increasing the
number of processor cores, it is getting more important for applications to
use concurrent processing to reduce run/response times, as the time slicing
routine via increased clock speed will no longer be available to bail out
slow running programs.
Carl Hewitt proposed the Actor Model in 1973 as a way to implement unbounded
nondeterminism in concurrent processing. In many ways this model was
influenced by the packet switching mechanism, for example, no synchronous
handshake between sender and receiver, inherently concurrent message passing,
messages may not arrive in the order they were sent, addresses are stored in
The main difference between this model and most other parallel processing
systems i... (more)
Let's start with the basic question: What is the disruptor? The disruptor is
a concurrency framework for Java that allows data sharing between threads.
The age old way of coding a producer-consumer model is to use a queue as the
buffer area between the producer and the consumer, where the producer adds
data objects to the queue, which are in turn processed by the consumer.
However, such a model does not work well at the hardware level and ends up
being highly inefficient. The disruptor in its simplest form replaces the
queue with a data structure known as the ‘ring buffer'. Which... (more)
A deadlock is a situation where two or more threads are blocked while waiting
to obtain locks that some of the other threads in the deadlock are holding.
Deadlocks can occur when multiple threads need the same locks, at the same
time, but obtain them in different order. For instance, if thread 1 locks A,
and tries to lock B, and thread 2 has already locked B, and tries to lock A,
a deadlock arises. Thread 1 can never get B, and thread 2 can never get A. In
addition, neither of them will ever know. They will remain blocked on each of
their objects, A and B, forever.
Deadlock Dete... (more)