[193] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

Re: Scheme binding?

daemon@ATHENA.MIT.EDU (Bill Sommerfeld)
Thu Nov 2 00:14:32 1995

To: Clifford Beshers <beshers@cs.columbia.edu>
Cc: pthreads@MIT.EDU
In-Reply-To: Your message of "Wed, 1 Nov 1995 11:51:31 -0500 ."
             <199511011651.LAA15321@tune.cs.columbia.edu> 
Date: Wed, 01 Nov 1995 23:38:03 -0500
From: Bill Sommerfeld <sommerfeld@orchard.medford.ma.us>

-----BEGIN PGP SIGNED MESSAGE-----

> Has anyone created a Scheme binding for pthreads?  I'm starting one now,
> and wondered if I was reinventing.

Which scheme?

There isn't a common scheme binding for POSIX.1 in general; there are
several attempts (scsh, elk, and guile, if you consider guile to be
scheme) but they're all different and I'm not sure that any of them
are complete yet.

There are threads packages in several existing schemes, including
scheme48 and MIT scheme.  You may wish to look at those for
inspiration for a "schemely" API for threads.

The intersection of continuations, dynamic-wind, GC, and preemptively
scheduled threads on a multiprocessor should prove to be most
interesting research project.  

If you leave out a few of them (e.g. preemptive scheduling .. oops,
that's not really pthreads any more ..) the problem gets manageable.

Because of GC and other related issues, I don't think that a scheme
implementation can be cleanly, portably, and efficiently layered on
top of the standard pthreads API, which, if I'm not mistaken, doesn't
provide a way to disable time-slicing.  I'd love to be proved wrong,
but the comments about needing to scan C stacks for GC purposes
doesn't give me a lot of confidence there.

					- Bill

-----BEGIN PGP SIGNATURE-----
Version: 2.6.1

iQCVAwUBMJhLJ7T+rHlVUGpxAQHCogP/Y4YduK4g0cLTbZNVXxO72+e75Q5KvJpQ
nJyvLoM9MOHHGEt0VehrXwKQXBK9mLk3eGi/r8G8nG44HSPAwsWILgVUo5iGd9ge
4UhIxv3m8I/GYOGln2Z0xRDH5/RYvNJfn5+vWMueEwcTMfd+GZfBRwYQ+nDA2xNM
VbiHg/aa3jE=
=zogL
-----END PGP SIGNATURE-----

home help back first fref pref prev next nref lref last post