Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-02-2004, 03:53 AM
|
#1
|
LQ Newbie
Registered: Sep 2003
Posts: 28
Rep:
|
how to do real time programs?
how do i implement it using general linux? is it possible to do it?
if possible can some one tell me how to write it?
Or must i use a rtlinux to do it?
|
|
|
02-02-2004, 08:56 AM
|
#2
|
Member
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590
Rep:
|
It totally depends on how strict your real time requirement is. If you're writing a hard real time app, an ordinary Linux kernel may not be a good choice. If you're writing a soft real time app, it could work quite well. In the end you just have to try it and see. This looks quite informative: http://www.metrowerks.com/pdf/Metrow...as_RTOS_v2.pdf
Alex
|
|
|
02-02-2004, 10:20 AM
|
#3
|
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Rep:
|
I took a closer look at your timing schemes and since .5 second is the tightest you need you can probably handle the just fine. In fact, if you are using a linux kernel with the enhanced real time clock you could set the frequency of that and use it for timing. I am not sure exactly how that works but mplayer uses that for video timing so you can probably look at there code.
What kind of server is this? As I said before, only use timing to define a network protocol if there is absolutely no other way.
|
|
|
02-02-2004, 11:42 AM
|
#4
|
LQ Newbie
Registered: Sep 2003
Posts: 28
Original Poster
Rep:
|
I data - 13888 usecs
P data - 2777 usecs
B data - 555 usecs
tighest is .5 secs?
hmm , it a udp protocol server
i comparing the system time with the time above everytime i send
|
|
|
02-02-2004, 11:53 AM
|
#5
|
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Rep:
|
oh duh... I don't know where I get .5 seconds from.
I am not sure what the resolution of the rtc is, but 555 usecs is pretty tight timing you could easily miss if the kernel decides it needs to do something else. If I personally had to have timing like that I would write an RTLinux kernel module. But that doesn't mean that you could possibly do it another way.
Is there something external that is dictating that timing?
|
|
|
All times are GMT -5. The time now is 08:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|