package picos

  1. Overview
  2. Docs
Pico scheduler interface

Install

Dune Dependency

Authors

Maintainers

Sources

picos-0.4.0.tbz
sha256=343a8b4759239ca0c107145b8e2cc94c14625fecc0b0887d3c40a9ab7537b8da
sha512=db22b0a5b3adc603c0e815c9011c779f892b9ace76be018b2198d3e24a7d96727c999701025fe5a5fd07d0b452cb7286fc50c939aba0e4dce809941e9ebc12a6

Description

A systems programming interface between effects based schedulers and concurrent abstractions.

Published: 06 Jun 2024

README

README.md

API reference · Benchmarks · Stdlib Benchmarks

Picos — Interoperable effects based concurrency

Picos is a systems programming interface between effects based schedulers and concurrent abstractions. Picos is designed to enable an ecosystem of interoperable elements of effects based cooperative concurrent programming models such as

The picos package is divided into many small(er) libraries. The core is a small library, picos, that defines the essential scheduler interface. The rest of the libraries are either sample schedulers (e.g. picos.fifos, picos.lwt, picos.randos, and picos.threaded), scheduler agnostic libraries (e.g. picos.structured, picos.sync, picos.stdio, and picos.select), or auxiliary libraries.

⚠️ Please note that Picos is still considered experimental and unstable.

Why?

There are already several concrete effects-based concurrent programming libraries and models being developed. Here is a list of some such publicly available projects:*

  1. Affect — "Composable concurrency primitives with OCaml effects handlers (unreleased)",

  2. Domainslib — "Nested-parallel programming",

  3. Eio — "Effects-Based Parallel IO for OCaml",

  4. Fuseau — "Lightweight fiber library for OCaml 5",

  5. Miou — "A simple scheduler for OCaml 5",

  6. Moonpool — "Commodity thread pools for OCaml 5", and

  7. Riot — "An actor-model multi-core scheduler for OCaml 5".

All of the above libraries are mutually incompatible with each other with the exception that Domainslib, Eio, and Moonpool implement an earlier interoperability proposal called domain-local-await or DLA, which allows a concurrent programming library like Kcas* to work on all of those. Unfortunately, DLA, by itself, is known to be insufficient and the design has not been universally accepted.

By introducing a scheduler interface and key libraries, such as an IO library, implemented on top of the interface, we hope that the scarce resources of the OCaml community are not further divided into mutually incompatible ecosystems built on top of such mutually incompatible concurrent programming libraries, while, simultaneously, making it possible to experiment with many kinds of concurrent programming models.

It should be technically* possible to

  1. make all of the previously mentioned libraries Picos compatible, i.e. to handle the Picos effects, and

  2. have their elements implemented in Picos, i.e. to make them usable on other Picos-compatible schedulers.

Please read the reference manual for further information.

Dependencies (8)

  1. ocaml >= "4.14.0"
  2. lwt >= "5.7.0"
  3. multicore-magic >= "2.2.0"
  4. psq >= "0.2.1"
  5. mtime >= "2.0.0"
  6. thread-local-storage >= "0.1"
  7. backoff >= "0.1.0"
  8. dune >= "3.14"

Dev Dependencies (13)

  1. odoc >= "2.4.1" & with-doc
  2. sherlodoc >= "0.2" & with-doc
  3. dscheck >= "0.4.0" & with-test
  4. conf-npm arch != "x86_32" & arch != "riscv64" & with-test
  5. js_of_ocaml >= "5.4.0" & with-test
  6. domain_shims >= "0.1.0" & with-test
  7. ocaml-version >= "3.6.4" & with-test
  8. mdx >= "2.4.0" & with-test
  9. qcheck-multicoretests-util >= "0.3" & with-test
  10. qcheck-stm >= "0.3" & with-test
  11. qcheck-core >= "0.21.2" & with-test
  12. alcotest >= "1.7.0" & with-test
  13. multicore-bench >= "0.1.3" & with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.