-
Notifications
You must be signed in to change notification settings - Fork 31
Renaming lockfree #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,6 @@ tmp | |
*.install | ||
*.native | ||
*.byte | ||
*.merlin | ||
*.merlin | ||
*.json | ||
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
profile = default | ||
version = 0.23.0 | ||
version = 0.25.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"bracketSpacing": false, | ||
"printWidth": 80, | ||
"semi": false, | ||
"singleQuote": true, | ||
"proseWrap": "always", | ||
"overrides": [ | ||
{ | ||
"files": ["*.md"], | ||
"excludeFiles": "_build/*" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## Contributing | ||
|
||
Any contributions are appreciated! Please create issues/PRs to this repo. | ||
|
||
### Maintainers | ||
|
||
The current list of maintainers is as follows: | ||
|
||
- @kayceesrk KC Sivaramakrishnan | ||
- @lyrm Carine Morel | ||
- @Sudha247 Sudha Parimala | ||
|
||
### Guidelines for new data structures implementation | ||
|
||
Reviewing most implementation takes times. Here are a few guidelines to make it | ||
easier for the reviewers : | ||
|
||
- the issue tracker has a good list of data structures to choose from | ||
- implement a well know algorithm (there are a lot !) | ||
- from a _reviewed_ paper, ideally with proof of main claimed properties (like | ||
lock-freedom, deadlock freedom etc..) | ||
- from a well known and used concurrent library (like `java.util.concurrent`) | ||
- write tests with **multiple** domains. All the following tests are expected to | ||
be provided before a proper review is done, especially for implementations | ||
that do not come from a well-know algorithm : | ||
- unitary tests and `qcheck tests` : with one and multiple domains. If domains | ||
have specific roles (producer, consumer, stealer, etc..), it should appear | ||
in the tests. | ||
- tests using `STM` from `multicoretest` | ||
- (_optional_) `dscheck` tests (for non-blocking implementation) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
Benchmarks for lockfree | ||
Benchmarks for Saturn | ||
|
||
# General usage | ||
# General usage | ||
|
||
Execute `make bench` from root of the repository to run the standard set of benchmarks. The output is in JSON, as it is intended to be consumed by ocaml-benchmark CI (in progress). | ||
Execute `make bench` from root of the repository to run the standard set of | ||
benchmarks. The output is in JSON, as it is intended to be consumed by | ||
ocaml-benchmark CI (in progress). | ||
|
||
# Specific structures | ||
# Specific structures | ||
|
||
Some benchmarks expose commandline interface targeting particular structures: | ||
|
||
* [mpmc_queue.exe](mpmc_queue_cmd.ml) | ||
- [mpmc_queue.exe](mpmc_queue_cmd.ml) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open Lockfree | ||
module Spsc_queue = Saturn.Single_prod_single_cons_queue | ||
|
||
let item_count = 2_000_000 | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
(executables | ||
(names main mpmc_queue_cmd) | ||
(libraries lockfree unix yojson)) | ||
(libraries saturn unix yojson)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,37 @@ | ||
(** Helper library that ensures all workers have started before any | ||
(** Helper library that ensures all workers have started before any | ||
starts making progress on the benchmark. *) | ||
|
||
type t | ||
(** An orchestrator is similar to a counter that ensures each domain | ||
has started and complete each round simultanously. All domains | ||
wait for the other before beginning the next round. *) | ||
|
||
val init : total_domains:int -> rounds:int -> t | ||
(** [init ~total_domains:nd ~rounds:nr] create an orchestrator that | ||
will run [nr] rounds for a test that uses exactly [nd] worker | ||
domains *) | ||
|
||
val worker : t -> (unit -> unit) -> unit | ||
(** [worker t f] builds the function to pass to [Domain.spawn] while | ||
using the orchestrator [t]. Doing [Domain.spawn (fun () -> worker | ||
t f)] is similar to [Domain.spawn f] except that the orchestrator | ||
is used to synchronize all domains progress. | ||
*) | ||
|
||
val run : ?drop_first:bool -> t -> float List.t | ||
(** [run t] is launching the benchmark by enabling domains to progress. Benchmarks code should have the following structure : | ||
|
||
{[ | ||
(* Initialize the orchestrator, with [nd] the number of domains we want. *) | ||
let orchestrator = init ~total_domain:nd ~round:100 in | ||
(* Spawn domains with [worker] *) | ||
let domains = | ||
List.init nd (fun _ -> | ||
Domain.spawn (fun () -> | ||
worker orchestrator (fun () -> some_function ()))) in | ||
(* Run the benchmarks by freeing domains round by round. *) | ||
let times = run orchestrator in | ||
... | ||
]} | ||
|
||
*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(lang dune 3.0) | ||
(name lockfree) | ||
(name saturn) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
opam-version: "2.0" | ||
maintainer: "KC Sivaramakrishnan <[email protected]>" | ||
maintainer:"KC Sivaramakrishnan <[email protected]>" | ||
authors: ["KC Sivaramakrishnan <[email protected]>"] | ||
homepage: "https://github.com/ocaml-multicore/lockfree" | ||
doc: "https://ocaml-multicore.github.io/lockfree" | ||
synopsis: "Lock-free data structures for multicore OCaml" | ||
homepage: "https://github.com/ocaml-multicore/saturn" | ||
doc: "https://ocaml-multicore.github.io/saturn" | ||
synopsis: "Parallelism-safe data structures for multicore OCaml" | ||
license: "ISC" | ||
dev-repo: "git+https://github.com/ocaml-multicore/lockfree.git" | ||
bug-reports: "https://github.com/ocaml-multicore/lockfree/issues" | ||
dev-repo: "git+https://github.com/ocaml-multicore/saturn.git" | ||
bug-reports: "https://github.com/ocaml-multicore/saturn/issues" | ||
tags: [] | ||
depends: [ | ||
"ocaml" {>= "4.12"} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
(executable | ||
(name seqtest) | ||
(libraries monolith lockfree) | ||
(libraries monolith saturn) | ||
(modules seqtest) | ||
(enabled_if | ||
(= %{profile} seqtest))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(library | ||
(name lockfree) | ||
(public_name lockfree) | ||
(name saturn) | ||
(public_name saturn) | ||
(libraries domain_shims)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.