{"id":18019566,"url":"https://github.com/laysakura/lock-free_work-stealing_deque_in_c","last_synced_at":"2025-03-26T20:31:23.653Z","repository":{"id":139146855,"uuid":"1809782","full_name":"laysakura/Lock-free_work-stealing_deque_in_C","owner":"laysakura","description":"Lock-free work stealing deque written in C. This is implemented after Chapter 16 of \"The Art of Multiprocessor Programming.\"","archived":false,"fork":false,"pushed_at":"2011-05-27T16:29:27.000Z","size":94,"stargazers_count":19,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-22T10:42:27.208Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://d.hatena.ne.jp/laysakura","language":"C","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/laysakura.png","metadata":{"files":{"readme":"README.org","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":"2011-05-27T13:39:19.000Z","updated_at":"2023-03-01T21:23:09.000Z","dependencies_parsed_at":"2023-03-11T12:50:59.235Z","dependency_job_id":null,"html_url":"https://github.com/laysakura/Lock-free_work-stealing_deque_in_C","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/laysakura%2FLock-free_work-stealing_deque_in_C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laysakura%2FLock-free_work-stealing_deque_in_C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laysakura%2FLock-free_work-stealing_deque_in_C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laysakura%2FLock-free_work-stealing_deque_in_C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laysakura","download_url":"https://codeload.github.com/laysakura/Lock-free_work-stealing_deque_in_C/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245731422,"owners_count":20663182,"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":[],"created_at":"2024-10-30T05:11:11.874Z","updated_at":"2025-03-26T20:31:23.296Z","avatar_url":"https://github.com/laysakura.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"* What is this?\n  This is an implemenation of Lock-free Work-stealing Deque written in C.\n\n  - There are a number of tasks\n  - Tasks are the same number of task queues as CPUs\n  - A `worker' has a task queue\n  - A worker pops/pushes tasks from its own task queue\n  - A worker takes tasks from other workers\n  - `Pop'/`push' accesses the bottom of task queues\n  - `Take ' accesses the top of task queues\n\n  This is a part of [[http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/laysakura/1][my project in Google Summer of Code 2011]].\n\n* Features\n  - Task queue is implemented as `unbound circular array',\n    which doesn't have start and end points and expands when the size\n    is less than the number of tasks.\n  - There are already some implementation of Lock-free Work-stealing Deque.\n    But one written in C is not so common.\n    Unlike some languages like Java, the support of `volatile' variable is\n    limited in C. This implementation covers it by using memory barriers.\n  - This uses compare-and-swap (CAS) instruction instead of mutex lock.\n\n* Compile and Test\n  1. All files (except this README ;-) ) is required to build.\n\n  2. Compile the deque source and unit tests.\n     #+BEGIN_SRC sh\nmake\n     #+END_SRC\n  3. To test the deque, just type\n     #+BEGIN_SRC sh\nmake TEST_gsoc_taskqueue\n     #+END_SRC\n     You can see the number of CPUs used in test and calculation time by\n     #+BEGIN_SRC sh\n./test_gsoc_taskqueue \u003e /dev/null\n     #+END_SRC\n\n     If you also want to test circular array, type\n     #+BEGIN_SRC sh\nmake TEST_gsoc_task_circular_array\n     #+END_SRC\n     Note that it will fail if you use 32-bit CPUs.\n\n     Or if you want to test all of them,\n     #+BEGIN_SRC sh\nmake test\n     #+END_SRC\n  4. `make clean' to clean the directory.\n\n\n* Welcoming Your Comments\n  I appreciate any of your advice and comments.\n  Feel free to contact me on twitter [[http://twitter.com/laysakura][@laysakura]] .\n\n* Reference\n  1. The Art of Multiprocessor Programming.  Maurice Herlihy, Nir Shavit / Morgan Kaufmann\n  2. Dynamic Circular Work-Stealing Deque.  David Chase, David Chase\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaysakura%2Flock-free_work-stealing_deque_in_c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaysakura%2Flock-free_work-stealing_deque_in_c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaysakura%2Flock-free_work-stealing_deque_in_c/lists"}