DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

Upper bound for realtime application

Started by Unknown ●June 10, 2014
robert bristow-johnson <rbj@audioimagination.com> writes:

> On 6/11/14 12:30 AM, Randy Yates wrote: >> robert bristow-johnson<rbj@audioimagination.com> writes: >> >>> i might suggest taking a look at the wikipedia article about >>> "real-time computing". >>> https://en.wikipedia.org/wiki/Real-time_computing >>> >>> there is a variation in the definition for the case of >>> continuous-input, continuous-output (the "DSP" definition). >>> >>> Raph, if your application is set up to process images as fast as they >>> are thrown at it, then it's real-time. but if it takes *more* time to >>> process the images than the average (or, worst case, depends on the >>> buffering) time between images being input, then it's not real-time. >>> you've mentioned that it takes about "1.5s per image" to process. if >>> images are being input to the process at a rate slower than 2/3 image >>> per second, then your application can process images in real-time. >>> but if your image rate is faster than 2/3 image per second, then your >>> process is not real-time. >>> >>> i guess that would be closer to the "soft real-time" definition, but >>> it's really not either. if latency is not an issue, then "soft" is >>> the definition. but if there is a hard limit on the latency, then >>> "hard" is the definition. >> >> The wikipedia article says "real-time DSP" can have delay (latency). > > but that the latency is *bounded* by some unspecified finite value. > it ain't real-time DSP if the output gets further and further behind > the input.
Well, it wouldn't be real-time by my definition either. I should say that implicit in my definition is that the latency is constant.
>> I'm not sure I would split the DSP/non-DSP real-time hair. I would >> consider latency a separate issue from real-time. That is, if the time >> required to process an event is less than or equal to the event period, >> you're real-time, even if it takes a week to come out the pipe. > > well, that's the "Real-time in DSP" definition there. but the Hard > Real-time guys would say that ain't good enough. if you have an > object recognition algorithm in an image processor connected to a > robotic arm that's intended to pick up that object, a week of latency > might not be good enough for that algorithm to be useful.
Of course; that is a use-case scenario where latency matters. But there are many others where is doesn't matter, or it doesn't matter as long as it's less than some time. For example, consider playing a CD (do folks still use CDs?), where the moment the laser hits the pits/flats starts the clock. So what if it takes 100 milliseconds to reach the listener? -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On Wed, 11 Jun 2014 00:30:27 -0400, Randy Yates wrote:

> robert bristow-johnson <rbj@audioimagination.com> writes: > >> i might suggest taking a look at the wikipedia article about "real-time >> computing". https://en.wikipedia.org/wiki/Real-time_computing >> >> there is a variation in the definition for the case of >> continuous-input, continuous-output (the "DSP" definition). >> >> Raph, if your application is set up to process images as fast as they >> are thrown at it, then it's real-time. but if it takes *more* time to >> process the images than the average (or, worst case, depends on the >> buffering) time between images being input, then it's not real-time. >> you've mentioned that it takes about "1.5s per image" to process. if >> images are being input to the process at a rate slower than 2/3 image >> per second, then your application can process images in real-time. but >> if your image rate is faster than 2/3 image per second, then your >> process is not real-time. >> >> i guess that would be closer to the "soft real-time" definition, but >> it's really not either. if latency is not an issue, then "soft" is the >> definition. but if there is a hard limit on the latency, then "hard" >> is the definition. > > The wikipedia article says "real-time DSP" can have delay (latency). > > I'm not sure I would split the DSP/non-DSP real-time hair. I would > consider latency a separate issue from real-time. That is, if the time > required to process an event is less than or equal to the event period, > you're real-time, even if it takes a week to come out the pipe.
The real-world limitation to real time is that there is some guaranteed upper bound on delay. If you can't guarantee an upper bound, then you're not selling real time. Getting into the hard/soft hair-splitting is pretty much an issue of whether you can guarantee the bound absolutely and always, or just sometimes, or on average, or whatever. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott <tim@seemywebsite.really> writes:

> On Wed, 11 Jun 2014 00:30:27 -0400, Randy Yates wrote: > >> robert bristow-johnson <rbj@audioimagination.com> writes: >> >>> i might suggest taking a look at the wikipedia article about "real-time >>> computing". https://en.wikipedia.org/wiki/Real-time_computing >>> >>> there is a variation in the definition for the case of >>> continuous-input, continuous-output (the "DSP" definition). >>> >>> Raph, if your application is set up to process images as fast as they >>> are thrown at it, then it's real-time. but if it takes *more* time to >>> process the images than the average (or, worst case, depends on the >>> buffering) time between images being input, then it's not real-time. >>> you've mentioned that it takes about "1.5s per image" to process. if >>> images are being input to the process at a rate slower than 2/3 image >>> per second, then your application can process images in real-time. but >>> if your image rate is faster than 2/3 image per second, then your >>> process is not real-time. >>> >>> i guess that would be closer to the "soft real-time" definition, but >>> it's really not either. if latency is not an issue, then "soft" is the >>> definition. but if there is a hard limit on the latency, then "hard" >>> is the definition. >> >> The wikipedia article says "real-time DSP" can have delay (latency). >> >> I'm not sure I would split the DSP/non-DSP real-time hair. I would >> consider latency a separate issue from real-time. That is, if the time >> required to process an event is less than or equal to the event period, >> you're real-time, even if it takes a week to come out the pipe. > > The real-world limitation to real time is that there is some guaranteed > upper bound on delay. If you can't guarantee an upper bound, then you're > not selling real time.
Tim, For any system you see in the real world, there's ALWAYS an upper bound on delay, whether that system is "real-time" or not. If it takes 200 years for my computer to boot, that's unacceptable, even if it then runs 1024 cores at 8 THz each. (a ridiculous example just to show the point...) However, it has been my observation that there are many, many instances where latency is much less important than the ability to meet an "event interval." Therefore I would classify delay (latency) and the ability to meet an event interval as two separate requirements, whether common terminology supports this or not. DEFINITION: In a system that requires a periodic event to be processed indefinitely, "event interval" is the period of the event.
> Getting into the hard/soft hair-splitting is pretty much an issue of > whether you can guarantee the bound absolutely and always, or just > sometimes, or on average, or whatever.
I would say that those types of things are more "event interval" issues than latency issues. Sometimes they are both important, as in rb-j's example case, but often the ability to meet an event interval is much more important than latency. Hence the utility in separating these two things. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Randy Yates wrote:
> robert bristow-johnson <rbj@audioimagination.com> writes: > >> On 6/11/14 12:30 AM, Randy Yates wrote: >>> robert bristow-johnson<rbj@audioimagination.com> writes: >>> >>>> i might suggest taking a look at the wikipedia article about >>>> "real-time computing". >>>> https://en.wikipedia.org/wiki/Real-time_computing >>>> >>>> there is a variation in the definition for the case of >>>> continuous-input, continuous-output (the "DSP" definition). >>>> >>>> Raph, if your application is set up to process images as fast as they >>>> are thrown at it, then it's real-time. but if it takes *more* time to >>>> process the images than the average (or, worst case, depends on the >>>> buffering) time between images being input, then it's not real-time. >>>> you've mentioned that it takes about "1.5s per image" to process. if >>>> images are being input to the process at a rate slower than 2/3 image >>>> per second, then your application can process images in real-time. >>>> but if your image rate is faster than 2/3 image per second, then your >>>> process is not real-time. >>>> >>>> i guess that would be closer to the "soft real-time" definition, but >>>> it's really not either. if latency is not an issue, then "soft" is >>>> the definition. but if there is a hard limit on the latency, then >>>> "hard" is the definition. >>> >>> The wikipedia article says "real-time DSP" can have delay (latency). >> >> but that the latency is *bounded* by some unspecified finite value. >> it ain't real-time DSP if the output gets further and further behind >> the input. > > Well, it wouldn't be real-time by my definition either. I should say > that implicit in my definition is that the latency is constant. > >>> I'm not sure I would split the DSP/non-DSP real-time hair. I would >>> consider latency a separate issue from real-time. That is, if the time >>> required to process an event is less than or equal to the event period, >>> you're real-time, even if it takes a week to come out the pipe. >> >> well, that's the "Real-time in DSP" definition there. but the Hard >> Real-time guys would say that ain't good enough. if you have an >> object recognition algorithm in an image processor connected to a >> robotic arm that's intended to pick up that object, a week of latency >> might not be good enough for that algorithm to be useful. > > Of course; that is a use-case scenario where latency matters. But > there are many others where is doesn't matter, or it doesn't matter > as long as it's less than some time. > > For example, consider playing a CD (do folks still use CDs?), where the > moment the laser hits the pits/flats starts the clock. So what if it > takes 100 milliseconds to reach the listener? >
With anti-skip, buffered ones, it might take seconds. -- Les Cargill
On 2014-06-10 23:55, HelveticusMaximus@gmx.ch wrote:
[...]
> I think you misunderstood my question. I know how much it takes for my algorithm to compute. I takes around 1.5s per image. > > Now I want just a statement that e.g. if the runtime is < 2s it can be called realtime or can be used for realtime purposes. >
I make it short, 1.5s per image is *not* real-time, *never*, there is *no* use case where it will be. Of course, people can nitpicking on definition of real-time and so on, an maybe find cases where it could be 1.5s, but *nobody*, which it is not in state of sin, will call 1.5s per image real-time. Especially at 1024x1024 resolution. You should try with 33ms (milliseconds), in order to start to claim real-time, maybe 66ms will do too. bye, -- piergiorgio
On 11/06/14 17:42, Tim Wescott wrote:
> The real-world limitation to real time is that there is some guaranteed > upper bound on delay. If you can't guarantee an upper bound, then you're > not selling real time.
Just so.
> Getting into the hard/soft hair-splitting is pretty much an issue of > whether you can guarantee the bound absolutely and always, or just > sometimes, or on average, or whatever.
It isn't hair-splitting: the difference is important theoretically, practically, and commercially. It is much more difficult to specify and verify soft real-time specifications, but that doesn't mean they are invalid. Some processes and some applications are inherently statistical, and it is only reasonable that they be defined statistically. The canonical example is telephone calls, where the very unit used to define the capacity of exchanges (the Erlang) is statistical and based on Poisson distributions. Typically telecom systems will be defined in terms of an acceptable mean delay and an acceptable proportion of "dropped calls". Telecom systems cannot practically/commercially be hard real-time without intolerable capital cost - and soft real-time requirements are acceptable.
On 6/11/14 1:44 PM, Piergiorgio Sartor wrote:
> On 2014-06-10 23:55, HelveticusMaximus@gmx.ch wrote: > [...] >> I think you misunderstood my question. I know how much it takes for my algorithm to compute. I takes around 1.5s per image. >> >> Now I want just a statement that e.g. if the runtime is< 2s it can be called realtime or can be used for realtime purposes. >> > > I make it short, 1.5s per image is *not* real-time, > *never*, there is *no* use case where it will be.
so what if it were a satellite in polar orbit snapping a picture once every 1500 ms as it makes swaths over the Earth? if Raph's algorithm can process those images and spit out the "inpainted" images (whatever that means) without a backlog of unprocessed images piling up and the pile growing larger and larger in the input queue (until that queue gets full and bad things start happening), if his algorithm does that, is it or is it not "real-time"?
> Of course, people can nitpicking on definition of > real-time and so on, an maybe find cases where it > could be 1.5s, but *nobody*, which it is not in > state of sin, will call 1.5s per image real-time. > Especially at 1024x1024 resolution. > > You should try with 33ms (milliseconds), in order to > start to claim real-time, maybe 66ms will do too.
remember "real-time computing" is not synonymous with "high-performance computing", even if they may have a relationship to each other. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 11/06/14 18:44, Piergiorgio Sartor wrote:
> On 2014-06-10 23:55, HelveticusMaximus@gmx.ch wrote: > [...] >> I think you misunderstood my question. I know how much it takes for my algorithm to compute. I takes around 1.5s per image. >> >> Now I want just a statement that e.g. if the runtime is < 2s it can be called realtime or can be used for realtime purposes. >> > > I make it short, 1.5s per image is *not* real-time, > *never*, there is *no* use case where it will be. > > Of course, people can nitpicking on definition of > real-time and so on, an maybe find cases where it > could be 1.5s, but *nobody*, which it is not in > state of sin, will call 1.5s per image real-time. > Especially at 1024x1024 resolution. > > You should try with 33ms (milliseconds), in order to > start to claim real-time, maybe 66ms will do too.
Not true: consider video surveillance - a reasonable specification is that one frame every second has to be captured at full resolution and stored somewhere offsite. An expanded specification might include the latency between capture and storage.
On 2014-06-11 20:06, robert bristow-johnson wrote:
[...]
> so what if it were a satellite in polar orbit snapping a picture once > every 1500 ms as it makes swaths over the Earth? if Raph's algorithm > can process those images and spit out the "inpainted" images (whatever > that means) without a backlog of unprocessed images piling up and the > pile growing larger and larger in the input queue (until that queue gets > full and bad things start happening), if his algorithm does that, is it > or is it not "real-time"?
As I wrote: nitpicking! Clearly, one can always have an application where one hour is real-time, I belivied that's was clear. Nevertheless, the *vast* majority does not fall in that category. [...]
> remember "real-time computing" is not synonymous with "high-performance > computing", even if they may have a relationship to each other.
High performance is not 33ms, that would be 10ms or less. bye, -- piergiorgio
On 2014-06-11 20:25, Tom Gardner wrote:
[...]
> Not true: consider video surveillance - a reasonable > specification is that one frame every second has to > be captured at full resolution and stored somewhere > offsite. An expanded specification might include > the latency between capture and storage.
And two: nitpicking. Again, there are, of course, applications which do well (real-time), in the "second" range (for video processing), but that's not the *norm*. bye, -- piergiorgio