Re: Do threads support SMP?
[email protected] (Alan Burlison) Wed, 23 Aug 2000 11:27:53 +0100
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected]> |
Steven W McDougall wrote: > > Does Perl6 support Symmetric MultiProcessing (SMP)? > > This is a *huge* issue. It affects everything else that we do with > threads. Umm... I don't know what you think you mean by 'SMP', but it doesn't mean what you think it does. SMP means 'Symmetric Multi Processing' and describes a hardware architecture where each processor shares the same memory and IO. I think you are confusing the OS threading model with the hardware implementation on which it runs. Most OSs now support a threading model that allows a single program to have several concurrent threads of execution. In the case of a uniprocessor this concurrency is pseudo-concurrency, and is implemented by the threads library & OS cooperating to timeslice between the individual threads. On a multiprocessor this concurrency is real, as threads within a single program may be running on seperate CPUs simultaneously. Again, this is organised by the threads library and underlying OS. There is a POSIX standard for threading libraries, and I believe that this is what is used by the existing perl5 threading support, at least on Unix. Writing your own threading library as part of perl6 is a non-starter, because to do so requires cooperation from and intimate knowledge of the OS - for example the way threding is implemented on Linux and Solaris are radically different. That's why the POSIX threads library is there - to make such platform dependent implementation mechanisms invisible to applications. -- Alan Burlison