From 0ae9bacd638d8705dc930cba37f8c2ec6f1d9dbd Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Tue, 31 Aug 2021 11:40:42 +0300 Subject: [PATCH 1/5] Start threads survey --- surveys/threads.md | 26 ++++++++++++++++++++++++++ www-index.scm | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 surveys/threads.md diff --git a/surveys/threads.md b/surveys/threads.md new file mode 100644 index 0000000..857b84c --- /dev/null +++ b/surveys/threads.md @@ -0,0 +1,26 @@ +# Threads + +|Scheme|Virtual threads|OS threads|Re-entrant interpreter +|------|---------------|----------|---------------------- +|Bigloo|?|?|? +|Chez Scheme|?|?|? +|Chibi-Scheme|?|?|? +|CHICKEN|Yes|No|? +|Cyclone|None|pthreads|? +|Gambit|Yes|None|? +|Gauche|None|pthreads|? +|Gerbil|?|?|? +|Guile|?|?|? +|Iron|?|?|? +|Kawa|?|?|? +|Larceny|?|?|? +|Loko|?|?|? +|MIT Scheme|?|?|? +|Racket|?|?|? +|Sagittarius|?|?|? +|Scheme48|?|?|? +|STKlos|None|pthreads|? +|Tiny|None|?|?|? +|Unsyntax|?|?|? +|Vicare|?|?|? +|Ypsilon|?|?|? diff --git a/www-index.scm b/www-index.scm index 8cbd079..4ecdf37 100644 --- a/www-index.scm +++ b/www-index.scm @@ -8,7 +8,8 @@ "minischeme-history" "optionality" "scheme-on-windows" - "standalone-executables") + "standalone-executables" + "threads") ("Macros" "macroexpand" From 4d4e5d8f35485e8515eaca81bfda896b61ba7b36 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Tue, 31 Aug 2021 11:51:56 +0300 Subject: [PATCH 2/5] Expand threads survey --- surveys/threads.md | 48 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/surveys/threads.md b/surveys/threads.md index 857b84c..7c8e9a0 100644 --- a/surveys/threads.md +++ b/surveys/threads.md @@ -1,26 +1,26 @@ # Threads -|Scheme|Virtual threads|OS threads|Re-entrant interpreter -|------|---------------|----------|---------------------- -|Bigloo|?|?|? -|Chez Scheme|?|?|? -|Chibi-Scheme|?|?|? -|CHICKEN|Yes|No|? -|Cyclone|None|pthreads|? -|Gambit|Yes|None|? -|Gauche|None|pthreads|? -|Gerbil|?|?|? -|Guile|?|?|? -|Iron|?|?|? -|Kawa|?|?|? -|Larceny|?|?|? -|Loko|?|?|? -|MIT Scheme|?|?|? -|Racket|?|?|? -|Sagittarius|?|?|? -|Scheme48|?|?|? -|STKlos|None|pthreads|? -|Tiny|None|?|?|? -|Unsyntax|?|?|? -|Vicare|?|?|? -|Ypsilon|?|?|? +|Scheme|Standard API|Custom API|Virtual threads|OS threads|Re-entrant interpreter +|------|------------|----------|---------------|----------|---------------------- +|Bigloo|?|?|?|?|? +|Chez Scheme|?|?|?|?|? +|Chibi-Scheme|?|?|?|?|? +|CHICKEN|SRFI 18|?|Yes|No|?|?|? +|Cyclone|SRFI 18|?|None|pthreads|?|?|? +|Gambit|SRFI 18|?|Yes|None|?|?|? +|Gauche|SRFI 18|?|None|pthreads|?|?|? +|Gerbil|?|?|?|?|? +|Guile|?|?|?|?|? +|Iron|?|?|?|?|? +|Kawa|?|?|?|?|? +|Larceny|?|?|?|?|? +|Loko|?|?|?|?|? +|MIT Scheme|?|?|?|?|? +|Racket|?|?|?|?|? +|Sagittarius|?|?|?|?|? +|Scheme48|?|?|?|?|? +|STKlos|SRFI 18|?|None|pthreads|Yes +|TinyScheme|None|?|?|?|?|Yes +|Unsyntax|?|?|?|?|? +|Vicare|?|?|?|?|? +|Ypsilon|?|?|Yes|?|? From be81357b2f418460d6b14ef0b5f9ee559883bb4f Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Tue, 31 Aug 2021 12:07:39 +0300 Subject: [PATCH 3/5] Explain thread types --- surveys/threads.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/surveys/threads.md b/surveys/threads.md index 7c8e9a0..d8c3bf3 100644 --- a/surveys/threads.md +++ b/surveys/threads.md @@ -1,5 +1,14 @@ # Threads +Using _OS threads_, also known as _native threads_, there is exactly +one operating system thread for each virtual machine thread. + +Using _virtual threads_, also known as _green threads_ (after the +_Green Team_ working on Java threads at Sun), each OS thread can +switche between multiple VM threads using co-operative multitasking. +The threads visible to the Scheme program are the VM threads; the OS +threads are an internal implementation detail. + |Scheme|Standard API|Custom API|Virtual threads|OS threads|Re-entrant interpreter |------|------------|----------|---------------|----------|---------------------- |Bigloo|?|?|?|?|? From 44f8e360b0ad0e1f02c44d8f6004c353e58618e5 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Tue, 31 Aug 2021 12:28:00 +0300 Subject: [PATCH 4/5] Update based on mailing list --- surveys/threads.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/surveys/threads.md b/surveys/threads.md index d8c3bf3..398b61e 100644 --- a/surveys/threads.md +++ b/surveys/threads.md @@ -15,9 +15,9 @@ threads are an internal implementation detail. |Chez Scheme|?|?|?|?|? |Chibi-Scheme|?|?|?|?|? |CHICKEN|SRFI 18|?|Yes|No|?|?|? -|Cyclone|SRFI 18|?|None|pthreads|?|?|? -|Gambit|SRFI 18|?|Yes|None|?|?|? -|Gauche|SRFI 18|?|None|pthreads|?|?|? +|Cyclone|SRFI 18*|?|No|pthreads|?|?|? +|Gambit|SRFI 18|?|Yes|No|?|?|? +|Gauche|SRFI 18|?|No|pthreads|?|?|? |Gerbil|?|?|?|?|? |Guile|?|?|?|?|? |Iron|?|?|?|?|? @@ -28,8 +28,10 @@ threads are an internal implementation detail. |Racket|?|?|?|?|? |Sagittarius|?|?|?|?|? |Scheme48|?|?|?|?|? -|STKlos|SRFI 18|?|None|pthreads|Yes -|TinyScheme|None|?|?|?|?|Yes +|STKlos|SRFI 18|?|No|pthreads|Yes +|TinyScheme|No|?|?|?|?|Yes |Unsyntax|?|?|?|?|? |Vicare|?|?|?|?|? |Ypsilon|?|?|Yes|?|? + +*) Partial support From 7e3ad3170e139d724ccff1425695b3bba0fc0e7c Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Tue, 31 Aug 2021 18:24:47 +0300 Subject: [PATCH 5/5] Add more stuff --- surveys/threads.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/surveys/threads.md b/surveys/threads.md index 398b61e..d0cd5fb 100644 --- a/surveys/threads.md +++ b/surveys/threads.md @@ -4,23 +4,23 @@ Using _OS threads_, also known as _native threads_, there is exactly one operating system thread for each virtual machine thread. Using _virtual threads_, also known as _green threads_ (after the -_Green Team_ working on Java threads at Sun), each OS thread can -switche between multiple VM threads using co-operative multitasking. -The threads visible to the Scheme program are the VM threads; the OS +_Green Team_ working on Java at Sun), each OS thread can switch +between multiple VM threads using co-operative multitasking. The +threads visible to the Scheme program are the VM threads; the OS threads are an internal implementation detail. -|Scheme|Standard API|Custom API|Virtual threads|OS threads|Re-entrant interpreter -|------|------------|----------|---------------|----------|---------------------- -|Bigloo|?|?|?|?|? +|Scheme|Standard API|Custom API|OS threads|Virtual threads|Re-entrant interpreter +|------|------------|----------|----------|---------------|---------------------- +|Bigloo|SRFI 18|?|["POSIX threads"][bigloo-pthread]|["Fair threads"][bigloo-fthread]|? |Chez Scheme|?|?|?|?|? |Chibi-Scheme|?|?|?|?|? |CHICKEN|SRFI 18|?|Yes|No|?|?|? |Cyclone|SRFI 18*|?|No|pthreads|?|?|? |Gambit|SRFI 18|?|Yes|No|?|?|? -|Gauche|SRFI 18|?|No|pthreads|?|?|? +|Gauche|SRFI 18|?|No|pthreads, Win32|?|?|? |Gerbil|?|?|?|?|? -|Guile|?|?|?|?|? -|Iron|?|?|?|?|? +|Guile|SRFI 18|[Here][guile-custom]|[pthreads][guile-pthreads]|[`(ice-9 futures)`][guile-futures]|Yes +|IronScheme|?|?|?|?|? |Kawa|?|?|?|?|? |Larceny|?|?|?|?|? |Loko|?|?|?|?|? @@ -35,3 +35,10 @@ threads are an internal implementation detail. |Ypsilon|?|?|Yes|?|? *) Partial support + +[bigloo-fthread]: https://www-sop.inria.fr/mimosa/fp/Bigloo/manual-chapter16.html#Fair%20Threads +[bigloo-pthread]: [https://www-sop.inria.fr/mimosa/fp/Bigloo/manual-chapter16.html#Posix%20Threads] + +[guile-pthreads]: https://www.gnu.org/software/guile/manual/html_node/Scheduling.html +[guile-custom]: https://www.gnu.org/software/guile/manual/html_node/Threads.html +[guile-futures]: https://www.gnu.org/software/guile/manual/html_node/Futures.html