Re: Open Transport and MultiProcessing Services
Re: Open Transport and MultiProcessing Services
- Subject: Re: Open Transport and MultiProcessing Services
- From: Igor garnov <email@hidden>
- Date: Wed, 19 May 2004 23:25:54 +0400
Hello Mr. Quinn
and thanks for your quick reply.
Can I use Open Transport in synchronous mode in MP tasks?
OTMP will allow you to use OT is synchronous mode in an MP task.
<http://developer.apple.com/samplecode/OTMP/OTMP.html>
The workaround (at least for Mac OS 9 and higher, except Mac OS 9.1 of
course, where MPRemoteCall is horribly broken) is to have your MP code
use MPRemoteCall with the kMPInterruptRemoteContext flag to post work
for your Blue code to do. That's basically how OTMP works. Take a
look at the documentation that comes with the sample. It's fully of
interesting goodies.
Yes, I have downloaded this sample some time ago, but its complexity
frightened me a little.
In reply to my mail a couple of months ago you wrote that Open
Transport routines in OTMP sample utilize slightly different technique,
which has something to do with deferred tasks, but not MPRemoteCall.
You said that:
"The difference in performance relates to the latency between when you
issue the request from the OTMP thread and when that request runs on
the 'blue' thread. When you use MPRemoteCall, you generally have to
wait until some cooperative process calls SystemTask (or something that
calls it, such as WaitNextEvent), as which point the system processes
your request. This latency, typically in the tens of milliseconds but
often much higher, would be very bad in a high performance application.
OTOH, when you use OTMP, the request is passed from MP to blue via a
deferred task, which has a radically lower latency."
Now my question is - in your personal opinion, is it worth it to use
the approach with deferred task rather than just use MPRemoteCall? Of
course it depends on the nature of application being developed. In my
case this is the application that under some circumstances will
probably have to deal with relatively large amounts of data, so network
performance is not one of the things that I can easily neglect.
I am asking this because having a look at OTMP I understand that it is
rather complex and will take some time to understand.
Again, thanks very much for your vigilance in this list.
Regards,
Igor
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.