LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Reply
  Search this Thread
Old 06-14-2007, 05:52 AM   #1
c0mrade
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Rep: Reputation: 0
Unhappy real time


hi,
Why the object-oriented design is not suitable for real time system?

Any hints? Thank you
 
Old 06-14-2007, 05:57 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Homework???

What is the context of your question?
What kind of real-time system?
 
Old 06-14-2007, 07:10 AM   #3
c0mrade
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Homework???

What is the context of your question?
What kind of real-time system?
Not a homework its just something I need to discuss in the next lecture. I mean real-time systems in general, ex: anti-burglar system. My question is why the object oriented languages are not better choice for implementing such systems since for the time constraint is important. I'm not very familiar with this thats why I ask, but I have some basic ideas, all I need is a little nudge
 
Old 06-14-2007, 07:17 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Discuss in the lecture??? Are you the teacher? (If you are a student, then preparing for a class discussion IS homework.)

What is your background in programming? Have you ever programmed a real-time system?

I am not well-versed in object-oriented programming, but I can't think why it would make a difference. Isn't the main issue knowing how long different processes will take and/or having the time be consistent?
 
Old 06-28-2007, 03:46 PM   #5
Kintail
LQ Newbie
 
Registered: Nov 2006
Location: Scotland
Distribution: SUSE 10.1
Posts: 16

Rep: Reputation: 0
Real-time

A real-time system is one where software, and its associated control system, has to respond to a real-world situation where 'time' is critical in the proper sense of the word. One example is where a tool in a machine-tool system (operating at full speed) is cutting a circle which has to be accurate to one-tenth of a thousandth of an inch. I've done that. Realise that not only the tool but the electronics, and the drive systems in the machine tool, have to respond to software which, itself, is highly complex. In fact, any system such as aircraft and the like, have the tiniest margin of error, else it is disaster. I suggest that a burglar system is not in that category!
 
Old 06-30-2007, 07:52 AM   #6
Kintail
LQ Newbie
 
Registered: Nov 2006
Location: Scotland
Distribution: SUSE 10.1
Posts: 16

Rep: Reputation: 0
Real time and Object Oriented

I should have added in my previous post that, in my view, object oriented (OO) programming is entirely suitable for a burglar alarm system because the time constraints are not as critical as in fast real-time control software/electronic systems. The objects in OO programs are generalised but seldom for speed. I suppose one could have real-time objects, but I would prefer to write real-time software in assembler, or possibly C, even C++ with care, Ada, and I used Pascal many years ago.
 
Old 06-30-2007, 11:20 PM   #7
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
There is no reason OO languages can not be used in a real-time context.

Most real-time applications are done in C, with assembly optimizations, but it could also be done in C++, or even Java. The important thing in real-time operating systems is the ability to determine how long something will take - not necessarily raw speed. As long as the language has a good compiler, and allows the programmer to determine how long each task will take, it can be used for a real-time application.

Having said that, C is generally used because it allows for optimizations, and can be very predictable. Also, most of the benefits of OO would not be required in a real-time environment.

If you need to prepare for a lecture, read the relevant chapters of your text, other texts and resources available on the internet (Like IEEE Xplore).

--Ian
 
  


Reply



Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Real-time garbage collection with Real-time Java LXer Syndicated Linux News 0 05-05-2007 12:16 PM
LXer: Real-time Linux gains real-time JVM LXer Syndicated Linux News 0 10-12-2006 10:54 AM
LXer: Real Time Coming to Linux Real Soon LXer Syndicated Linux News 1 08-23-2006 06:30 PM
real time recompiling kris273 Programming 3 08-09-2004 10:12 PM
real-time OS h/w Programming 11 01-24-2004 08:28 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration