green@b17a.ingr.com (Daniel Green) (05/25/91)
I've got a few (possibly simple) questions about passing data in messages between threads in the same task: I'd like to set up a communication path intended to be between two threads and involving potentially large amounts of data. I'd expect to use ports to do this, cause I'd like to be able to handle the case where the treads are NOT in the same address space (NOT in same task). In this case I expect that the data is actually copied around. (is it?) Now, without changing the send/receive code in my threads, I'd like to be able to also do this for the case where the two threads ARE in the same task. And finally, the question: does this mean that the data is NOT copied around? -- that no data is actually going into/out-of a port? You see, I want to have the o/s make it be effecient when that's possible, or to have it NOT be effecient when that's necessary, WITHOUT MY HAVING TO hard-wire this into my code. To change the subject to OSF/1, are C threads considered part of the "standard Mach interface" in OSF/1, or is it strictly the POSIX Threads Extension standard that will be supported in OSF/1. Thanks. I apologize if these topics have been discussed before or are inappropriate to thiis newsgroup. -- dan ****************************************************************************** * Daniel Green green@daniel.b17a.ingr.com|_ /| UUCP: ~!uunet!ingr!greendl * * Intergraph Corporation Mail Stop IW17A1 |\'o.O` Internet: greendl@ingr.com * * Huntsville, AL 35894-0001 (205)730-1770|=(___)= "Ack Thippfft!" -- Bill * **********************************************U*******************************
fkittred@bbn.com (Fletcher Kittredge) (05/28/91)
In article <1991May24.174732.6353@infonode.ingr.com> green@daniel.b17a.ingr.com writes: > >To change the subject to OSF/1, are C threads considered part of the "standard >Mach interface" in OSF/1, or is it strictly the POSIX Threads Extension >standard >that will be supported in OSF/1. > The version of OSF/1 which I am running, DEC's version, does not have C threads as a supported interface. I hope that C threads will *not* be supported in OSF/1. There are already too many different mechanisms for doing essentially the same thing... regards, fletcher Fletcher Kittredge BBN Software Products 150 CambridgePark Dr, Cambridge, MA. 02140 617-873-3465 / fkittred@bbn.com / fkittred@das.harvard.edu
sp@mirabeau.osf.fr (Simon Patience) (05/29/91)
> > > >To change the subject to OSF/1, are C threads considered part of the "standard > >Mach interface" in OSF/1, or is it strictly the POSIX Threads Extension > >standard > >that will be supported in OSF/1. > > > The version of OSF/1 which I am running, DEC's version, does not have > C threads as a supported interface. I hope that C threads will *not* > be supported in OSF/1. There are already too many different mechanisms > for doing essentially the same thing... I did try and post something before but it seems to have disappeared into the ether. OSF/1 only provides the Posix pthread interfaces. In 1.0 that is the Draft 4 specification as draft 5 wasn't out. Future versions of OSF/1 will follow the POSIX work. The Cthreads library is neither supplied nor supported but if you got the source from a Mach distribution and compiled it, I am pretty sure that it would work. You wouldn't be able to use the reentrant libraries with it though. While not technically imposible, you need header files that are not shipped with the end user system, which define the interface between the reentrant library and the thread provider, in order to write the functions used to supply the synchronization the library uses. The other problem is that crt0 does not call cthread_init for you so you would have to do that youself as the first thing in main(). I believe that CMU are changing cthreads to export the pthread interfaces eventually but I don't know that for certain and I certainly wouldn't like to say when 'eventually' is. I will leave them to comment on that. Simon. Simon Patience Open Software Foundation Phone: +33-76-63-48-72 Research Institute FAX: +33-76-51-05-32 2 Avenue De Vignate Email: sp@gr.osf.org 38610 Gieres, France uunet!gr.osf.org!sp