GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Pslydhh/PslyAlgorithm: Programming thinking

BranchesTags
Open more actions menu

Latest commit

 

History

82 Commits
82 Commits

Folders and files

NameName
Last commit message
Last commit date
PslyMaxAllocatedArraySize
PslyMaxAllocatedArraySize
 
 
cfilesforhazardpointer
cfilesforhazardpointer
 
 
git-tutorial
git-tutorial
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
ConcurrentLinkedQueue.java
ConcurrentLinkedQueue.java
 
 
LICENSE
LICENSE
 
 
LinkedTransferQueueFix.java
LinkedTransferQueueFix.java
 
 
LockFreeLinkedList.java
LockFreeLinkedList.java
 
 
LockFreeLinkedListWithRefCount.java
LockFreeLinkedListWithRefCount.java
 
 
LockFreeLinkedListWithRefCount2.java
LockFreeLinkedListWithRefCount2.java
 
 
README.md
README.md
 
 
StampedLock.java
StampedLock.java
 
 
TestForMultiverse.java
TestForMultiverse.java
 
 
TestForStampedLock.java
TestForStampedLock.java
 
 
UnsafeSupport.java
UnsafeSupport.java
 
 
WaitFreeGetAndIncrement.java
WaitFreeGetAndIncrement.java
 
 
WaitFreeQueue.java
WaitFreeQueue.java
 
 
WaitFreeQueueFastPath.java
WaitFreeQueueFastPath.java
 
 
list.rs
list.rs
 
 

Repository files navigation

Email: [email protected]

PslyAlgorithm

old blog: http://blog.csdn.net/luoyuyou

cur blog: https://segmentfault.com/blog/psly

latest blog: https://zhuanlan.zhihu.com/c_145672944

Here are some of the concurrent code I wrote

public final int getAndIncrement(int add) {
    for (;;) {
        int current = get();
        int next = current + add;
        if (compareAndSet(current, next))
            return current;
    }
}

WaitFreeGetAndIncrement.java: wait-free atomic counter based on cas (Compared to the one above's lock-free Atomic)

WaitFreeQueueFastPath.java: wait-free mpmc Queue;(Based on the classic's MSQueue, and Make a modification on http://www.cs.technion.ac.il/~erez/Papers/wf-methodology-ppopp12.pdf )

LockFreeLinkedListWithRefCount.java: An tool for statistical reference counters, version 1 (Java implementation),with main function to test

LockFreeLinkedListWithRefCount2.java: An tool for statistical reference counters, version 2 (Java implementation),with main function to test

LinkedTransferQueueFix.java: This file has made a modification on LinkedTransferQueue in JDK as my patch, modifying the problem of losing the signal because of the node's cancellation。

StampedLock.java: This file adds the preservation / recovery interrupt mechanism to StampedLock in JDK. It corrects the problem of Excessive occupancy of cpu. If you want to test, please note that the LockSupport.nextSecondarySeed used here is the package control domain.

TestForStampedLock.java: It is used to test StampedLock:. When the first read lock enters the waiting queue and timeout, then the read thread after it links will re join in the queue, so that the order of the lock is reversed. (the LockSupport.nextSecondarySeed in the source code should be annotated).

ConcurrentLinkedQueue.java: This take a little modification on ConcurrentLinkedQueue.java in JUC with poll method and offer method (retains the original code in the annotation) , uses the same idea as LinkedTransferQueue.

UnsafeSupport.java: Provide available Unsafe。

TestForMultiverse.java: A use case that runs Multiverse (software transaction memory)。

LockFreeLinkedList.java: The famous Harris's List, lock-free List. paper: https://www.microsoft.com/en-us/research/wp-content/uploads/2001/10/2001-disc.pdf

scalableconqueue.h:with unlink thread handler when thread over(Precondition: thread must over before queue destruct) scalableconqueue_no_unlink.h:Don't unlink thread handler so no need for the order of thread over and queue over.

About

Programming thinking

Topics

algorithmsconcurrentjavalock-freeoriginal

Resources

Readme
MIT license
Activity

Stars

7 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.