Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Realtime programming?

Realtime programming?
Thread Tools
JBL
Junior Member
Join Date: Sep 2000
Status: Offline
Reply With Quote
Mar 27, 2001, 02:02 AM
 
I have heard that OS X has some features that make it possible to do realtime programming on it. Is that true and where would I find out more about it?

(The kind of application I have in mind is one where you are tracking someone's eye position and making changes in on the display depending on where they are looking. Such applications require that you be able to detect an eye-movement and update the screen appropriately within 10 ms (at most).
     
Fresh-Faced Recruit
Join Date: Mar 2001
Status: Offline
Reply With Quote
Mar 27, 2001, 02:32 AM
 
The term realtime is not appropriate here. Realtime usually refers to guarantees of the scheduler to give the processor back to a task in a specifiable maximum time. With a realtime-capable scheduler you can install tasks which are guaranteed to get processor time after, say, 50 ms after they have been preempted.
Multitasking on OS X is preemptive, but, AFAIK, not realtime. So you do not get any guarantees about processor time. (Heavy load results in less processing time for your task.)
To find out more, have a look at the developer pages: http://developer.apple.com Look for the kernel documentation.

Update: The document http://developer.apple.com/techpubs/...nvironment.pdf

is not very clear about real-time scheduling. If you find out if true real-time is supported in OS X, please answer here...

cu
Lars



[This message has been edited by Lars -1 (edited 03-27-2001).]
     
JBL  (op)
Junior Member
Join Date: Sep 2000
Status: Offline
Reply With Quote
Mar 27, 2001, 11:30 AM
 
Well, I admit I am not sure of the terminology. However, what you are describing as "realtime" is exactly what I think I need. Let me put it another way, I need to be garrenteed processor time several milliseconds before every screen refresh in order to check the eye-position and update the screen accordingly.
     
Fresh-Faced Recruit
Join Date: Mar 2001
Status: Offline
Reply With Quote
Mar 28, 2001, 08:58 AM
 
Originally posted by JBL:
Well, I admit I am not sure of the terminology. However, what you are describing as "realtime" is exactly what I think I need. Let me put it another way, I need to be garrenteed processor time several milliseconds before every screen refresh in order to check the eye-position and update the screen accordingly.
You do not need realtime scheduling. You need that for time-critical things like burning a CD. If the data stream gets interrupted for too long, the burning process will fail (not with burn-proof drives, though).

Pre-emptive scheduling is ok for you, since your application is not really time-critical. If you drop a frame every now and then: so what? Just update afterwards. Pre-emptive scheduling should be enough here.

cu
Lars
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:49 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2