Latency (engineering) - Computer Hardware and Operating System Latency

Computer Hardware and Operating System Latency

Further information: Access time

Computers run on a set of instructions called an executable. In operating systems, the execution of the executable can be postponed if other executables (a.k.a. processes) are also executing. In addition, the operating system can schedule when to perform the action that the executable is commanding. For example, suppose a process commands that a computer card's voltage output be set high-low-high-low and so on at a rate of 1000 Hz. The operating system may choose to adjust the scheduling of each transition (high-low or low-high) based on an internal clock. The latency is the delay between the executable instruction commanding the transition and the hardware actually transitioning the voltage from high to low or low to high.

On Microsoft Windows, it appears that the timing of commands to hardware is not exact. Empirical data suggest that Windows (using the Windows sleep timer which accepts millisecond sleep times) will schedule on a 1024 Hz clock and will delay 24 of 1024 transitions per second to make an average of 1000 Hz for the update rate. This can have serious ramifications for discrete-time algorithms that rely on fairly consistent timing between updates such as those found in control theory. The sleep function or similar windows API were at no point designed for accurate timing purposes. Certain multimedia-oriented API routines like timeGetTime and its siblings provide better timing consistency. However, consumer- and server-grade Windows (as of 2011 those based on NT kernel) were not to be real-time operating systems. Drastically more accurate timings could be achieved by using dedicated hardware extensions and control-loop cards.

Linux may have the same problems with scheduling of hardware I/O. The problem in Linux is mitigated by the fact that the operating system kernel's process scheduler can be replaced by a real-time scheduler.

On embedded systems, the real-time execution of instructions is expected from the low-level embedded operating system.

Read more about this topic:  Latency (engineering)

Famous quotes containing the words computer, hardware, operating and/or system:

    Family life is not a computer program that runs on its own; it needs continual input from everyone.
    Neil Kurshan (20th century)

    A friend of mine spoke of books that are dedicated like this: “To my wife, by whose helpful criticism ...” and so on. He said the dedication should really read: “To my wife. If it had not been for her continual criticism and persistent nagging doubt as to my ability, this book would have appeared in Harper’s instead of The Hardware Age.”
    Brenda Ueland (1891–1985)

    I love meetings with suits. I live for meetings with suits. I love them because I know they had a really boring week and I walk in there with my orange velvet leggings and drop popcorn in my cleavage and then fish it out and eat it. I like that. I know I’m entertaining them and I know that they know. Obviously, the best meetings are with suits that are intelligent, because then things are operating on a whole other level.
    Madonna [Madonna Louise Ciccione] (b. 1959)

    There are obvious places in which government can narrow the chasm between haves and have-nots. One is the public schools, which have been seen as the great leveler, the authentic melting pot. That, today, is nonsense. In his scathing study of the nation’s public school system entitled “Savage Inequalities,” Jonathan Kozol made manifest the truth: that we have a system that discriminates against the poor in everything from class size to curriculum.
    Anna Quindlen (b. 1952)