Skip to content

isaiah-perumalla/lockfree4j

Repository files navigation

Build Status License

LockFree4j

requires java 17

JAVA_HOME=/opt/jdks/zulu17 ./gradlew build

Experiment exploring Java memory model effects on different hardware. Various implementation of lock-free datastructures

Seqlock based data structures

SeqLock in Java, it mostly there to study the Java memory model. SeqLock is a type of reader/writer synchronisation structure , it is a useful data structures if read are far more frequent than they are written. The implementation allows for a single writer thread and many reader threads. Writer thread is wait-free , while the Reader thread(s) are lock-free. Reader might fail to aquire a consistent view, and should retry.

Implementations

There are several implementations, including some broken versions , this is there to study and understand the Java memory model .

Jsctress

included are Jcstress verification test to ensure correctness of the implementation

Jmh Benchmarks

Examine JIT C1/C2 output

-XX:+UnlockDiagnosticVMOptions
-XX:+TraceClassLoading
-XX:+LogCompilation
-XX:+PrintAssembly
-XX:PrintAssemblyOptions=intel
-XX:LogFile=jitBrokenlogfile.log

About

Implementation of SeqLock data structure in Java

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages