Sponsored Content
Top Forums UNIX for Advanced & Expert Users The UNIX clock/timer interrupt Post 302958811 by Corona688 on Monday 26th of October 2015 03:01:33 PM
Old 10-26-2015
The IBM PC has had a pulse generator/timer from the beginning (which also used to drive the PC speaker.) In the olden days, before LSI, it was its own separate chip attached to the data bus. It was very flexible, but generally configured to generate hardware interrupts at 18ms intervals. This hardware interrupt is an IRQ, pretty much hardwired into the CPU, causing it to stop whatever it's doing and jump to a hardwired location in RAM. The OS can do whatever it pleases with that interrupt by putting code in that location.

The hardware is going to be very different on non-PC architectures but the idea is the same, a pulse generator wired to the CPU.

If you're really curious about historical PC architecture, and have a bent towards electronics, I suggest The 8088 book. The 8088 as much as anything else is responsible for why the PC is the way it is.

Last edited by Corona688; 10-26-2015 at 04:21 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

7 segement LCD unix clock

Hi, Anyone ever write a unix clock program that display the clock out in 7 segment LCD style. I tried doing one with case statements: !/usr/bin/ksh clock=`date` case $clock in #This prints out the number 0 0) echo " -" echo "| |" echo echo "| |" echo " -" ;; ... (4 Replies)
Discussion started by: Astudent
4 Replies

2. UNIX for Dummies Questions & Answers

erase and interrupt keys

This is on our Ultra 5/10 Sparc with Solaris 9. I need to store the following (stty) keys in the .profile and /etc/profile files as shown here. erase "Back Space Key" Interrupt "Ctrl + C" I need the exact syntax/procudure as I have to set these two keys whenever I login to the terminal... (1 Reply)
Discussion started by: chrs0302
1 Replies

3. UNIX for Dummies Questions & Answers

sincronization clock unix with windows server..

hi all... how i can sincronization clock solaris server with windows server....both servers i connected in the same network... thank you.... Best Regards... (4 Replies)
Discussion started by: chanfle
4 Replies

4. UNIX for Dummies Questions & Answers

timer interrupt

hello all since a process running in kernel mode cannnot be preempted by any other process what would be the status of Timer interrupt that occurs when the time quantum of a process is elapsed? thanks (2 Replies)
Discussion started by: compbug
2 Replies

5. UNIX for Dummies Questions & Answers

Clock in Unix using awk

Hey everyone! Can someone help me, i need to make a program using awk, that displays the current time (hh/mm/ss), i would really apreciate it! Thanks! Alex. (4 Replies)
Discussion started by: alex_omul
4 Replies

6. Shell Programming and Scripting

Sending an interrupt in a script?

Is it possible to sent a ^C interrupt via the command line? For example if I want to tail a log for 10 minutes at a time, kill the tail and then start it again is there a way to go about that? I would imagine there would be some way to do it by finding and killing the PID, but I'm curious if... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

7. UNIX for Dummies Questions & Answers

Real time of a clock for every 60 seconds in unix

hi can any one guide me on how to display real time of a clock in unix for every 60 seconds (2 Replies)
Discussion started by: ramnadh_babu
2 Replies

8. UNIX for Advanced & Expert Users

Interrupt storm detected on "irq 20" throttling interrupt source

I receive the following warning messages on a very new machine which has FreeBSD 8.1 x64 installed on it: Interrupt storm detected on "irq 20" throttling interrupt source It is unclear what this means and what its origins are (motherboard? CPU? RAM?). I can start the desktop and the message is... (4 Replies)
Discussion started by: figaro
4 Replies

9. UNIX for Advanced & Expert Users

Is there any shell command to show which interrupt handler handle which interrupt number?

Hi, all: Is there any shell command to show which interrupt handler handle which interrupt number in the system? li,kunlun (5 Replies)
Discussion started by: liklstar
5 Replies

10. UNIX for Advanced & Expert Users

Xt timer call, XtAppAddTimeout, hangs on system clock jump backwards

Hi, I've got an issue which I've been 'google-fu'ing without much luck. We have a legacy program which has been plagued by an issue for a long time and I've been tasked to investigate/fix. The program uses XMotif2.1 (required due to dependency on an old GUI designer) and runs on a RHEL7... (4 Replies)
Discussion started by: altrefrain
4 Replies
HZ(9)							   BSD Kernel Developer's Manual						     HZ(9)

NAME
hz, tick, tickadj, stathz, profhz -- system time model SYNOPSIS
#include <sys/kernel.h> extern int hz; extern int tick; extern int tickadj; extern int stathz; extern int profhz; DESCRIPTION
The essential clock handling routines in NetBSD are written to operate with two timers that run independently of each other. The main clock, running hz times per second, is used to keep track of real time. In another words, hz specifies the number of times the hardclock(9) timer ticks per second. Normally hardclock(9) increments time by tick each time it is called. If the system clock has drifted, adjtime(2) may be used to skew this increment based on the rate of tickadj. The second timer is used to gather timing statistics. It also handles kernel and user profiling. If the second timer is programmable, it is randomized to avoid aliasing between the two clocks. The mean frequency of the second timer is stathz. If a separate clock is not avail- able, stathz is set to hz. If profiling is enabled, the clock normally used to drive stathz may be run at a higher rate profhz, which is required to be a multiple of stathz. This will give higher resolution profiling information. These system variables are also available as struct clockinfo from sysctl(3) and kern.clockrate from sysctl(8). The hz is hardware-depen- dent; it can be overridden (if the machine dependent code supports this) by defining HZ in the kernel configuration file (see options(4)). Only override the default value if you really know what you are doing. SEE ALSO
adjtime(2), callout(9), hardclock(9), microtime(9), time_second(9) BSD
March 25, 2010 BSD
All times are GMT -4. The time now is 11:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy