javaf's repositories
backoff-lock
Backoff Lock uses an atomic value for critical section execution, and is suitable for memory-limited architectures.
array-queue
Array queue is a bounded lock-based FIFO queue using an array. It uses 2 separate locks for head and tail.
combining-tree
A Combining Tree is an N-ary tree of nodes, that follows software combining to reduce memory contention while updating a shared value.
elimination-backoff-stack
Elimination-backoff stack is an unbounded lock-free LIFO linked list, that eliminates concurrent pairs of pushes and pops with exchanges.
fifo-read-write-lock
FIFO Read-write Lock blocks any new readers once a writer requests, thus preventing writer lock-out due to continual stream of readers.
locked-queue
A Locked Queue in a concurrent FIFO queue that uses locks and conditions to block enqueue when queue is full, and dequeue when it is empty.
bitonic-network
Bitonic network is a balanced counting network that allows processes to decompose operations, like counting, and reduce memory contention.
simple-read-write-lock
Simple Read-write Lock uses a counter and a boolean flag to keep track of multiple readers and a writer, but does not prioritize writers.
array-lock
Array Queue Lock maintains a fixed array for critical section execution, and is suitable for cache-less static memory architectures.
array-stack
Array stack is a bounded lock-based stack using an array. It uses a common lock for both push and pop operations.
backoff-stack
Backoff stack is an unbounded lock-free LIFO linked list, where pushes and pops synchronize at a single location.
bathroom-lock
A Bathroom Lock allows N genders (thread types) to access a common bathroom (critical section) such that different genders do not clash.
bowling-alley
Bowling Alley Management System assignment in Software Engineering Course.
coarse-set
Coarse Set is a collection of unique elements maintained as a linked list. It uses a coarse grained lock, and useful when contention is low.
dining-philosophers-problem
The dining philosophers problem is an example problem often used in concurrent algorithm design.
extra-boolean
Boolean data type has two possible truth values to represent logic.
hello-world
A "Hello, World!" is an introductory computer program.
javaf.github.io
A summary of programs written in Java.
k-compare-single-swap
k-compare single-swap (KCSS) is an extension of CAS that enables atomically checking multiple addresses before making an update.
optimistic-set
Optimistic Set is a linked-list based unique collection. It traverses the list twice per operation, only locking the nodes to be updated.
periodic-network
Periodic network is a balanced counting network that allows processes to decompose operations, like counting, and reduce memory contention.
savings-account
A savings account is used to store salary/savings in a bank. This is a concurrent object (RAM) based account. For educational purposes only.
simple-reentrant-lock
A lock is re-entrant if it can be acquired multiple times by the same thread. Java already provides one. This for educational purposes only.
simple-semaphore
Semaphore is a generalization of mutual exclusion locks. It allows at most N threads into critical section. Java has a built-in Semaphore.