{"id":13726760,"url":"https://github.com/codingskynet/concurrent-data-structure","last_synced_at":"2025-05-07T22:30:31.324Z","repository":{"id":38791199,"uuid":"381895418","full_name":"codingskynet/concurrent-data-structure","owner":"codingskynet","description":"Concurrent Data Structure for Rust","archived":false,"fork":false,"pushed_at":"2022-12-25T09:18:43.000Z","size":211,"stargazers_count":29,"open_issues_count":13,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-06T05:59:19.100Z","etag":null,"topics":["concurrent","datastructure","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codingskynet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-01T03:15:53.000Z","updated_at":"2025-03-10T08:41:19.000Z","dependencies_parsed_at":"2023-01-30T21:46:12.191Z","dependency_job_id":null,"html_url":"https://github.com/codingskynet/concurrent-data-structure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingskynet%2Fconcurrent-data-structure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingskynet%2Fconcurrent-data-structure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingskynet%2Fconcurrent-data-structure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingskynet%2Fconcurrent-data-structure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingskynet","download_url":"https://codeload.github.com/codingskynet/concurrent-data-structure/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965071,"owners_count":21832817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrent","datastructure","rust"],"created_at":"2024-08-03T01:03:20.169Z","updated_at":"2025-05-07T22:30:30.947Z","avatar_url":"https://github.com/codingskynet.png","language":"Rust","readme":"# Concurrent Data Structure for Rust\n\n## Goal \u0026 Status\nImplement sequential, lock-based and lock-free concurrent data structures below:\n\n|            | Stack | Queue | Linked List | AVL Tree | HashTable |\n|------------|-------|-------|-------------|----------|-----------|\n| Sequential | Done  | Done  |    Done     |   Done   |           |\n| Lock-based | Done  | Done  |             |   Done   |           |\n| Lock-free  | Done  | Done  |             |          |           |\n\n## Benchmark\nYou can run bench like this:\n```bash\ncargo install cargo-criterion\n# default feature has accumulating stats on available structure.\ncargo criterion --bench {bench_name} --no-default-features\n```\n\nAvailable Benches:\n- stack\n- queue\n- avltree\n- btree\n\n## Profile\n\n### Use CDS stats\nSeveral cds has its own statistics. Use it by printing on test.\n\n### Flamegraph\n```bash\ncargo install flamegraph\nsudo cargo flamegraph --no-default-features --test tests -- {test_name}\n```\n\n## Detail\n### Lock\n- common spin lock and sequece lock(SeqLock)\n- flat combining lock\n\n### Stack\n- lock stack(based on std::sync::Mutex and spin lock)\n- Treiber's Stack\n- Elimination-Backoff Stack\n\n### Queue\n- lock queue(based on std::sync::Mutex and spin lock)\n- two lock queue\n- FCQueue(use flat combining lock)\n- Michael-Scott queue\n\n### Linked List\n- TODO: implement Harris linked list\n\n### AVL Tree\n- SeqLockAVLTree, RwLockAVLTree(use crossbeam_utils::sync::ShardedLock)\n\n### HashTable\n- TODO: ?\n\n## Reference\n### General\n- The Art of Multiprocessor Programming\n- https://github.com/kaist-cp/cs431\n- https://github.com/khizmax/libcds\n- https://www.cs.cmu.edu/~yihans/papers/tutorial.pdf\n\n### Lock\n- flat combining lock: https://people.csail.mit.edu/shanir/publications/Flat%20Combining%20SPAA%2010.pdf\n\n### Stack\n- Treiber's Stack: https://dominoweb.draco.res.ibm.com/58319a2ed2b1078985257003004617ef.html\n- Elimination-Backoff Stack: https://people.csail.mit.edu/shanir/publications/Lock_Free.pdf\n\n### Queue\n- two lock queue, Michael-Scott Queue: https://www.cs.rochester.edu/~scott/papers/1996_PODC_queues.pdf\n\n### Binary Search Tree\n- AVL Tree: https://stanford-ppl.github.io/website/papers/ppopp207-bronson.pdf\n- B+ Tree: http://www.vldb.org/pvldb/vol4/p795-sewall.pdf\n- Red-Black Tree: https://www.cs.umanitoba.ca/~hacamero/Research/RBTreesKim.pdf\n- BzTree(B Tree): http://www.vldb.org/pvldb/vol11/p553-arulraj.pdf\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingskynet%2Fconcurrent-data-structure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingskynet%2Fconcurrent-data-structure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingskynet%2Fconcurrent-data-structure/lists"}