Article View: comp.lang.modula2
Article #3076Re: Are Concurrent Processes the same as threads?
From: Jeff Ledermann
Date: Thu, 30 Nov 1995 23:56
Date: Thu, 30 Nov 1995 23:56
38 lines
2575 bytes
2575 bytes
Jan Walter (centurion@infomatch.com) wrote:
: lotu@wam.umd.edu (Arcadio Alivio Sincero) writes:
[snip]
: >Are M2's concurrent processes and threads the same thing or are they
: >different?
: >
: >Arcadio
[snip]
: not sure about how they implemented this in OS/2 though, nor am I familiar
: how Gardens Point implemented their co-routine structure in their 32 bit OS/2
: compiler. I have hunch though that their co-routines are now asynchronous,
: with their TRANSFER routine coming down to the OS/2 system call of DosSleep()
: to make the thread yield it's CPU time slice. The other possibility is that
: their RTL adds another thread or something like this to allow threads to run
: in a synchronous fashion. Anyone have the source to the GPM system module?
Not so - though I think your idea has some merit. Currently GPM implements
synchronous co-routines on all supported platforms. All co-routines run in
the same thread and TRANSFER() is just a stack swap. This is not the same
as multi-threading, but can be a useful paradigm in fetch --> process type
applications. GPM OS/2 programs can use multiple threads just like anybody
else, it just isn't built in.
We have toyed with the concept of asynchronous co-routines (multi-threading),
but absence of an equivalent to C's volatile marker makes this problematic.
It is probably possible for the compiler with sufficient effort to work this
out for itself. Synchronous co-routines can introduce hidden aliases, but at
least the language semantics are preserved for each co-routine individually.
Jeff.
---
Jeffrey Ledermann lederman@dstc.qut.edu.au
http://www.dstc.qut.edu.au/~lederman/
_--_|\ Faculty of Information Technology
/ QUT Queensland University of Technology
\_.--._/ Box 2434 Brisbane 4001 AUSTRALIA
v Ph: +61 7 3864 5337 Fax: +61 7 3864 1282
Technical Details
Message-ID:
<49lgbu$hfr@stork.qut.edu.au>Path:
arc1-ca.pugleaf.net!news.qut.edu.au!ledermanReferences:
<497qmr$3sf@cville-srv.wam.umd.edu> <49aqp9$4fl@berlin.infomatch.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.qut.edu.au!lederman From: lederman@dstc.qut.edu.au (Jeff Ledermann) Newsgroups: comp.lang.modula2 Subject: Re: Are Concurrent Processes the same as threads? Date: 30 Nov 1995 23:56:46 GMT Organization: Queensland University of Technology, Australia Distribution: world Message-ID: <49lgbu$hfr@stork.qut.edu.au> References: <497qmr$3sf@cville-srv.wam.umd.edu> <49aqp9$4fl@berlin.infomatch.com> NNTP-Posting-Host: typhoon.dstc.qut.edu.au Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Newsreader: TIN [version 1.2 PL2]