time critical programming

  • Thread starter Thread starter Peter Sprenger
  • Start date Start date
P

Peter Sprenger

Hi,

I have no experience in doing time critical things in a .NET language. I
need to modify 8 ISDN streams (each 64kbit) in realtime with max. 30ms
delay. Has somebody experience in doing time ctritical things in C# or
another .NET language? Could the garbage collector be a problem?

Any suggestion would be helpful.

Regards,

Peter
 
I have no experience in doing time critical things in a .NET language. I
need to modify 8 ISDN streams (each 64kbit) in realtime with max. 30ms
delay. Has somebody experience in doing time ctritical things in C# or
another .NET language? Could the garbage collector be a problem?

Well, the garbage collector could be an issue - but so could Windows
in general. It's not a real-time operating system, so you can't make
any guarantees.

Jon
 
In .NET 3.5 you will be able to set:
System.Runtime.GCSettings.LatencyMode = GCLatencyMode.LowLatency
to fix this problem. In prior versions you have no way to influence how much
time the GC consumes and when.


Martin
 
Hi Peter,

to be honest: Forget about Time Critical Programming
in .NET and C#, even the Windows Kernel is a
"Soft" Time Critical Operating System. There are a
lot of real RealTime OS. Do a google search or see here:
http://www.netrino.com/Articles/RTOSes/index.php
There are a lot of commercial os (we use VxWorks for
High-End Image and Video processing) and also a lot
of exceptional open source and free implementations.
just do a google search and you will be lucky or maybe
not ;-)

Regards

Kerem


---------
New Open Source Tools from me:
Calculate MD5 or SHA1 Hash for Files!
KHash Tools 1.0 Englisch:
http://download.chip.eu/de/KHash-Tools-1.0_1317168.html
http://entwicklung.junetz.de/projects/opensource/khashtools/khashtools v.1.0.zip
---------

Beste Grüsse / Best regards / Votre bien devoue

Kerem Gümrükcü
(e-mail address removed)

Best Quote: "Ain't nobody a badass with a double dose
of rock salt...", Kill Bill Vol.2

Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
Sign my guestbook: http://entwicklung.junetz.de/guestbook/
 
martin said:
In .NET 3.5 you will be able to set:
System.Runtime.GCSettings.LatencyMode = GCLatencyMode.LowLatency
to fix this problem. In prior versions you have no way to influence how much
time the GC consumes and when.

As Jon Skeet pointed out, the whole platform (Windows) is not a real
time operating system so any kind of guarantee on latency goes out the
window once you target Windows in general, .NET or otherwise. Sure, the
GC system in .NET adds more to the mix, but even a native C++
application can't have any guarantees.

You can optimize and pray, but that's about it.

Note that I'm talking about application space. I have no idea wether
anything running on ring 0 would be able to make any such guarantees.
 
I have run lots of 'soft' realtime applications on Windows. In a
recent application I wrote, our tasks took about 30ms to complete, and
the deadline was 80ms. It is extremely rare for us to miss our
realtime deadline (not sure it's ever happened in production). If we
miss the deadline, then we have ways to recover, which is why our
deadline is soft.

Still, if you have a realtime application with a 'hard' deadline, and
no way to deal with missing the hard deadline, then Windows may not be
for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top