• 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: How to set scheduling in NSThread based application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set scheduling in NSThread based application


  • Subject: Re: How to set scheduling in NSThread based application
  • From: "Shawn Erickson" <email@hidden>
  • Date: Mon, 12 Feb 2007 08:57:12 -0800

On 2/12/07, Shawn Erickson <email@hidden> wrote:
On 2/12/07, Gilles Celli <email@hidden> wrote:
> Hi,
>
> I've written a data acquisition-program under Cocoa which detach 2
> new NSThreads:
>
> One which collects data every 0.5 seconds (full second and
> millisecond 500 via gettimeofday()) from a multimeter via USB-to-
> Serial Adapter,
>   and another one which displays the graph of the data in NSTableView
> and with the Open-Source-Based
> SM2DGraphView.
...snip...
> Any suggestions are greatly appreciated.

500 milliseconds is 50 times larger then the current scheduling
quantum. I really don't think thread scheduling is an issue.... unless
you have to capture something in a relatively narrow time period (i.e.
500 ms +/- a few to 10s of milliseconds).

Are you sure you are not affected by clock skew introduced in the way
you are calculating times? Or by some contested lock you are using to
protect the data you are capturing and displaying?

Another possibility, not knowing how your capture thread is coded, is that your capture thread is chewing to much CPU time (polling to quickly) and as a result its priority gets suppressed due to fairness and every now and then due to it lower priority loses out to another thread with higher priority at just the wrong time.

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to set scheduling in NSThread based application
      • From: Gilles Celli <email@hidden>
References: 
 >How to set scheduling in NSThread based application (From: Gilles Celli <email@hidden>)
 >Re: How to set scheduling in NSThread based application (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: How to set scheduling in NSThread based application
  • Next by Date: Re: how to set the shortcut key in the interface builder?
  • Previous by thread: Re: How to set scheduling in NSThread based application
  • Next by thread: Re: How to set scheduling in NSThread based application
  • Index(es):
    • Date
    • Thread