🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #3069

Re: Are Concurrent Processes the same as threads?

#3069
From: Jan Walter
Date: Mon, 27 Nov 1995 23:53
50 lines
2702 bytes
In <49cmc1$1db@cville-srv.wam.umd.edu>, lotu@wam.umd.edu (Arcadio Alivio Sincero) writes:
>Jan Walter (centurion@infomatch.com) wrote:
>: >Are M2's concurrent processes and threads the same thing or are they 
>: >different?
>: >Arcadio
>
>: Whether concurrent processes are implemented as threads or as separate processes
>: in a multi-tasking OS depends on the compiler implementation for that OS. The idea
>: behind it was to give a platform independent ability to do concurrent processing.
>
>
>	Hmm ... so it's up to the compiler author to whether or not to 
>implement coroutines using the host operating system's multithreading 
>facility or not, 'eh?  (In the case of MS-DOS, the compiler author has no 
>choice.)  So the answer to the question "are coroutines the same as 
>threads" depends on how coroutines are implemented on the system, right?
>

There is a way to set up synchronous threads under OS/2. If it's well done, it
can work well. Personally I would think that the compiler writer would stick close
to Wirth's definition of Modula-2 - coroutines are synchonous. This would ensure
portability, but then you would have to do a different API call to implement
a real thread.

>	So I what I read in the Modula 3 FAQ about how "lightweight
>processes are now implemented" means that a Modula 3 system can only be a
>true Modula 3 system on an operating system that support multithreading? 
>Hmm ... I guess I should take that question over to the Modula 3 newsgroup
>... 
>
>	Thanks ...
>
>Arcadio

I have not seen a 16 bit DOS M3 system. Most DPMI 32 bit systems implement some sort
of threading, so it should be alright. Also, remember that you're writing to the
extender's API rather than that of DOS in that environment. Interrupt handling and all
that stuff works quite differently in Intel Protected Mode. Add to that the lack
of DOS's re-entrancy, well, you get the picture.

Cheers,

Jan


//   Centurion Services & Wholesale     //
//   "Quality from the Start"           //
//   Fax: (604) 279-1800                //
  *** PLEASE NOTE NEW EMAIL ADDRESS ***
//   centurion@infomatch.com            //
Technical Details
Message-ID: <49dj2n$4ms@berlin.infomatch.com>
Path: arc1-ca.pugleaf.net!berlin.infomatch.com!usenet
References: <497qmr$3sf@cville-srv.wam.umd.edu> <49aqp9$4fl@berlin.infomatch.com> <49cmc1$1db@cville-srv.wam.umd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!berlin.infomatch.com!usenet
From: centurion@infomatch.com   (Jan Walter)
Newsgroups: comp.lang.modula2
Subject: Re: Are Concurrent Processes the same as threads?
Date: 27 Nov 1995 23:53:58 GMT
Organization: Centurion Services
Message-ID: <49dj2n$4ms@berlin.infomatch.com>
References: <497qmr$3sf@cville-srv.wam.umd.edu> <49aqp9$4fl@berlin.infomatch.com> <49cmc1$1db@cville-srv.wam.umd.edu>
Reply-To: centurion@infomatch.com  (Jan Walter)
NNTP-Posting-Host: 199.60.99.226
X-Newsreader: IBM NewsReader/2 v1.2