Csound Csound-dev Csound-tekno Search About

Re: Dual or more Pentium's - threaded csound

Date1998-04-13 18:45
FromRichard Dobson
SubjectRe: Dual or more Pentium's - threaded csound
Probably very difficult, and I do wonder what the advantage would be for the
commandline versions of Csound. The overhead of managing communications between
threads, especially given the large number of global variables in Csound, avoiding
deadlock etc, might wipe out most of the presumed efficiency.  For a GUI, there is
an obvious argument for implementing Csound itself as a (single) worker thread,
exchanging messages with the main user-interface thread. In any case, it would have
to be done according to the thread mechanism on each platform - Win32 threads are
quite different from unix threads (indeed Microsoft introduced 'lightweight'
threads called 'fibers' to ease the porting of unix code to Win32) - so a portable
solution might be especially tricky. If the goal is just to exploit multiple
processors, I   am under the impression that on Widows NT this is supported
semi-transparently by a combination of the compiler (e.g by using the
multi-threaded standard libraries) and the OS. Windows95 cannot take advantage of
multiple processors anyway.


Richard Dobson

Laszlo Vecsey wrote:

> How difficult would it be to create a threaded csound?
> i.e. how much more spaghetti would that add to the code :>
>
> - lv
>
> On Mon, 13 Apr 1998, Piche Jean wrote:
>
> > >
> > > From what I understand, the processors run in parallel.  So if you have a
> > > dual Pentium 200, then it is the equivalent of a 400 mhz machine.
> >
> > hmmm, that would be nice, but reality is otherwise... The software has to
> > implement processing routines in a very specific way to take advantage of
> > parallelism. My hunch is that you *may* be able to run two distinct csound
> > processes at the same time, writing to separate files, but even that is not
> > at all clear... However, some advantage may be gained from being able to
> > fully dedicate a CPU to synthesis duties but not much beyond that.
> >
> >
> >