Real Time Interrupt - a piece of hardware requires immediate attention for
service. A reset button typically generates a real time interrupt, as it is
normally connected to a pin on the processor that cannot be ignored.
Generally, Real Time Interrupts are related to things that cannot wait for
service to be scheduled by the kernel. So depending upon how the OS is
designed a Real Time Interrupt could jam a process into the execution queue
for immediate execution.
In hardware, on the actual processor, there will by a NMI (non maskable
interrupt) pin and a MI (maskable interrupt) pin. The NMI pin cannot be
ignored, but the MI pin can have a flag set in the processor registers that
ignores the pin except under specific circumstances. If we look at the small
processor inside the keyboard, we would probably find that the NMI pin is
triggered when you press a key. This would cause the processor to look up
what key was pressed and communicate that information back to the keyboard
processor inside the computer. So, lets say you press the caps lock key. A
NMI is generated, the internal keyboard processor does something to
recognize which key was pressed, and then sends this information to the
computer, where the computers keyboard processor acknowledges the data
receipt and interrupts the systems processor that reads the key data and
sticks it somewhere in memory and figures out what to do. As you had pressed
the caps lock key, the system must make note of that fact, but must now also
send information to the computers keyboard processor that the caps lock LED
is to be turned on. This is then passed back to the keyboard and the
keyboards internal processor turns on the caps lock light.
In Intel PC's a single processor chip is responsible for the keyboard,
mouse, floppy, serial ports and parallel port. So if one was interested in
whether or not Windows was still running when it appeared to be hung, if you
pressed the caps lock key and the caps lock LED came on, that would be a
good indication that Windows was still running but occupied and of course,
this would also be a Real Time Interrupt, because almost always without
exception, no matter what windows is doing, it has to change the state of
that LED when you press the caps lock key. The only time it just won't do
this is when it's stuck inside a tight execution loop, running code in the
kernel, at which point, you could assume that Windows is out to lunch. This
is of course where a watchdog timer would probably reboot the system and
start things all over again.
Watchdog Timer - A watchdog is generally piece of hardware that counts down
from a preset limit and if it reaches zero, it will do something.
So, one thing a watchdog is good for is to ensure that the operating system
is alive and well and if not reboot it. For example, the system boots, the
watchdog hardware is preset and enabled. Periodically, within a predicted
period of time, a process is executed by the OS that resets the Watchdog
timer before it reaches zero. If the process does not execute, then it is
assumed that the OS has crashed and requires reboot.
An application that this might be associated with could be a lighthouse on a
remote island. At dusk, the lighthouse comes on and a device is used to
measure that the light is on and blinking at the rate that it is supposed
to. If for some reason the lighthouse is not functioning a watchdog could
restart the process. Presumably after a few failures there would be a signal
sent to someone to replace the light.
> i m a fresher and would like 2 know the purpose of a real time
> interrupt and a watchdog timer
kitcha - 22 Dec 2005 03:26 GMT
thanks Richard..but there are systems where there are two watch dog
timers why is it so??
kitcha - 22 Dec 2005 03:26 GMT
thanks Richard..but there are systems where there are two watch dog
timers why is it so??
Richard Tomkins - 22 Dec 2005 16:55 GMT
If I were to be dealing with a critical system, I don't have an example, I
might be inclined to place a watch dog on the application and another on the
OS.
> thanks Richard..but there are systems where there are two watch dog
> timers why is it so??
Richard Tomkins - 22 Dec 2005 17:04 GMT
http://www.elecdesign.com/Articles/ArticleID/4745/4745.html
http://www.embedded.com/2000/0011/0011feat4.htm
http://www.embedded.com/story/OEG20010920S0064
http://www.jaluna.com/doc/c5/html/AppliDevGuide/x5260.html
There is some good science in the above articles on Watchdog timers.
I pretty well forgot but a great example of systems that would contain
watchdog timers would be satellites and of course the Mars Rovers, which
proved to prescient as the watchdog timer enabled a recovery process to be
made for the flash memory overflow problem encountered.
> thanks Richard..but there are systems where there are two watch dog
> timers why is it so??
kitcha - 26 Dec 2005 11:37 GMT
the links u sent r good..but b4 i start into it seriously..why do v
require an analog watchdog a digital watchdog
and the same with analog and digital RTI
kitcha - 26 Dec 2005 11:40 GMT
y do v have two watchdog timers a digital and an anlaog watchdog
timer...and the same with analog and digital RTI
Richard Tomkins - 28 Dec 2005 20:21 GMT
You are getting into some sophisticated stuff here that is beyond the scope
of discussion for this forum.
I suspect that traffic light controllers may make use of analog watchdog
timers.
I'll say they are typically used in voltage monitoring situations.
The best thing you could do is to read up on this stuff on the internet,
there are a large number of sites, personal and industrial that cover this
subject matter in depth.
> y do v have two watchdog timers a digital and an anlaog watchdog
> timer...and the same with analog and digital RTI