views:

247

answers:

4

I'm taking an introductory course about real time systems design, but any implementation.

I would like to build something that let me understand better what I'll learn in theory, but since I have never done any real time system I can't estimate how long will take any project. It would be a concept proof project, or something like that, given my available time and knowledge.

Please, could you give me some idea? Thank you in advance.

I programm in TSQL, Delphi and C#, but I'll not have any problem in learning another language.

+2  A: 

Try to think of real-time tasks that are time-critical, for instance video-playing, which fails if tasks are not finished (e.g. calculating the next frame) in time.

You can also think of some industrial solutions, but they are probably more difficult to study in your local environment.

Roalt
A: 

As most realtime systems are still implemented in C or C++ it may be good to brush up your knowledge of these programming languages. Many realtime systems are also embedded systems, so you might want to play around with a cheap open source one like BeagleBoard (http://beagleboard.org/). This will also give you a chance to learn about cross compiling etc.

lothar
+2  A: 

Suggest you consider exploring the Real-Time Specification for Java (RTSJ). While it is not a traditional environment for constructing real-time software, it is an up-and-coming technology with a lot of interest. Even better, you can witness some of the ongoing debate about what matters and what doesn't in real-time systems.

Sun's JavaRTS is freely available for download, and has some interesting demonstrations available to show deterministic behavior, and show off their RT garbage collector.

In terms of a specific project, I suggest you start simple: 1) Build a work-generator that you can tune to consume a given amount of CPU time; 2) Put this into a framework that can produce a distribution of work-generator tasks (as threads, or as chunks of work executed in a thread) and a mechanism for logging the work produced; 3) Produce charts of the execution time, sojourn time, deadline, slack/overrun of these tasks versus their priority; 4) demonstrate that tasks running in the context of real-time threads (vice timesharing) behave differently.

Bonus points if you can measure the overhead in the scheduler by determining at what supplied load (total CPU time produced by your work generator tasks divided by wall-clock time) your tasks begin missing deadlines.

andersoj
Very educational and Dibble's book is good.
Tim Williscroft
+1  A: 

You should definitely consider building your system using a hardware development board equipped with a small processor (ARM, PIC, AVR, any one will do). This really helped remove my fear of the low-level when I started developing. You'll have to use C or C++ though.

You will then have two alternatives : either go bare-metal, or use a real-time OS.

Going bare-metal, you can learn :

  • How to initalize your processor from scratch and most importantly how to use interrupts, which are the fastest way you have to respond to an externel event
  • How to implement lightweight threads with fast context switching, something every real-time OS implements
  • In order to ease this a bit, look for a dev kit which comes with lots of documentation and source code. I used Embedded Artists ARM boards and they give you a lot of material.

Going with the RT OS :

  • You'll fast-track your project, and will be able to learn how to fine-tune a RT OS
  • You may try your hand at an open-source OS, such as Linux or the BSDs, and learn a lot from the source code

Either choice is good, you will get a really cool hands-on project to show off and hopefully better understand your course material. Good luck!

joelr