• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OTSndUData - problem on Mac OS 9
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OTSndUData - problem on Mac OS 9


  • Subject: Re: OTSndUData - problem on Mac OS 9
  • From: Quinn <email@hidden>
  • Date: Tue, 17 Feb 2004 12:05:21 +0000

At 13:04 +0300 17/2/04, Igor garnov wrote:
But, upon evanescent look at MoreIsBetter sample, namely OTMP.c, I realized that technique utilized in it is much more complicated than just MPRemoteCall.
Honestly, I got scared of this sample. I believe that I have to take a closer look at it, and I certainly will, but for now - is the approach which uses MPRemoteCall right in my case? Or are there some caveats, and is there some better way to implement the same functionality?

It depends on the performance requirements of your application. Here's how it breaks down.

o The way to get the best possible OT performance on traditional Mac OS is to use asynchronous mode with a complex state machine. OTVirtualServer is an example of this.

o OTMP is a good way to get good performance from threaded code (thus avoiding the complexities of the state machine).

o The MPRemoteCall approach that propose will work just fine but it will yield pretty poor performance. That's fine for implementing something like "ping", but I wouldn't not recommend it on the data path.

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. OTOOH, if all you're doing is sending a few pings, that's not a problem.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.

References: 
 >Re: OTSndUData - problem on Mac OS 9 (From: Igor garnov <email@hidden>)

  • Prev by Date: Re: OTSndUData - problem on Mac OS 9
  • Next by Date: Re: UDP broadcast address
  • Previous by thread: Re: OTSndUData - problem on Mac OS 9
  • Next by thread: Trying to make a simple xinetd app run
  • Index(es):
    • Date
    • Thread