Application I/O Interface

    • A device that can be used to trigger operations and to measure elapsed time is called the programmable interrupt timer or PIT.
    • It could, for example, be set to trigger an interrupt at a specific future time, or to trigger interrupts periodically on a regular basis.
    • PIT has several uses in an OS. For instance, the CPU scheduler uses a PIT to trigger interrupts when the time that was given for a program to run on the CPU ends (in order to select another program to run on the CPU.)
    • An OS could implement the system clock by using services from the PIT. However, this could result in time drift. As such, a better solution would be to use high-frequency hardware counters, which provide much higher resolution and accuracy, but do not support interrupts.