{"id":28000611,"url":"https://github.com/sysprog21/concurrent-ll","last_synced_at":"2025-05-08T23:53:50.108Z","repository":{"id":9995550,"uuid":"64039686","full_name":"sysprog21/concurrent-ll","owner":"sysprog21","description":"concurrent linked list implementation","archived":false,"fork":false,"pushed_at":"2024-06-02T15:20:24.000Z","size":68,"stargazers_count":73,"open_issues_count":1,"forks_count":54,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-08T23:53:44.914Z","etag":null,"topics":["atomics","concurrency","linked-list","lock-free","scalability"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysprog21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-23T23:11:34.000Z","updated_at":"2024-12-30T12:09:12.000Z","dependencies_parsed_at":"2022-09-11T09:52:12.064Z","dependency_job_id":null,"html_url":"https://github.com/sysprog21/concurrent-ll","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/sysprog21%2Fconcurrent-ll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fconcurrent-ll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fconcurrent-ll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fconcurrent-ll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysprog21","download_url":"https://codeload.github.com/sysprog21/concurrent-ll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166486,"owners_count":21864471,"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":["atomics","concurrency","linked-list","lock-free","scalability"],"created_at":"2025-05-08T23:53:49.563Z","updated_at":"2025-05-08T23:53:50.099Z","avatar_url":"https://github.com/sysprog21.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# concurrent-ll\n\nThe `concurrent-ll` package contains the skeleton code for implementing and\nevaluating two concurrent linked lists: a lock-free and a lock-based.\nThe implementations should work on any Linux-based `x86`/`x86_64`/`Arm64`/`riscv32`/`riscv64`\nenvironments.\n\nBoth lists are sorted and provide three main operations: \n* adding an element to the list (if not already in the list)\n* removing an element from the list (if already in the list)\n* looking for an element in the list\n\nIn our case, a node of the list contains at least an integer key.\n\nThe lock-based implementation will use a technique called \"hand-over-hand\nlocking\", while the lock-free will be based on Harris' algorithm (reference\nbelow).\n\n## Reference\nLock-free linkedlist implementation of Harris' algorithm\n\u003e \"A Pragmatic Implementation of Non-Blocking Linked Lists\" \n\u003e T. Harris, p. 300-314, DISC 2001.\n\n## Build\nYou can compile the code (in Linux) by calling:\n```shell\n$ make\n```\nin the base directory.\n\nIf the number of cores on your processor is not recognized properly, fix it\nin `include/utils.h`.\n\nYou can verify by calling:\n```shell\n$ make check\n```\n\n## Benchmarking\nYou can invoke the benchmarking scripts by calling:\n```shell\n$ make bench\n```\n\n## Tools\nYou can find several useful scripts that will help you test and evaluate your implementations.\n\nIn details:\n* `scripts/test_correctness.sh`: test the correctness of an implementation, by stressing it\n* `scripts/scalability1.sh`: benchmark 1 application and get its throughput and scalability\n  E.g., `scripts/scalability1.sh all out/test-lock -i128`\n* `scripts/scalability2.sh`: benchmark 2 applications and get their throughput and scalability\n  E.g., `scripts/scalability2.sh all out/test-lock out/test-lockfree -i100`\n* `scripts/run_ll.sh`: execute the workloads that will be part of the deliverable\n* `scripts/create_plots_ll.sh`: generate the plots (int plots folder) of the data generated with\n  `scripts/run_ll.sh`\n  Note: You need [gnuplot](http://gnuplot.info/) installed\t\t  \n\n## Implementation\nYou can find an easy-to-use interface for atomic operations in\n`include/atomics.h`.\n\n* `list.h`: contains the interface and the structures of the list. \n\n* `list.c`: contains the implementations of the operations of the list, i.e.,\ncreating a new list and a new bucket, freeing the list, and, of course,\nadding, removing, and looking for an element in the list.\n\nYou might change the `list` and `node` structures to reflect the list and\na node of a list of your implementations respectively.\n\nAdditionally, for the lock-based version, you need to implement and use some\nlocks. You can find the skeletons for initializing, freeing, locking, and\nunlocking a lock in `include/lock.h`.\n\nMemory management is one of most cumbersome problems on lock-free data\nstructures. In other words, when a thread removes an element (a node) from\nthe structure, it cannot always free the memory for that node, because other\nthreads might be holding a reference to this memory. \n\nWhen using locks, memory management is rather straightforward, because of the\nmutual exclusion property of locks. You can optionally implement memory\nmanagement on the lock-based version.\n\n## License\n\n`concurrent-ll` is released under the BSD 2 clause license. Use of this\nsource code is governed by a BSD-style license that can be found in the\nLICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fconcurrent-ll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysprog21%2Fconcurrent-ll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fconcurrent-ll/lists"}