From: Nils Faerber <nils@unix-ag.uni-siegen.de>
Subject: Re: What is HZ value for?
Date: 1999/12/22 [thread overview]
Message-ID: <38609b0d@rainbow.hrz.uni-siegen.de> (raw)
In-Reply-To: m3emcf23u8.fsf@plantpath.snu.ac.kr
Kyu Rang Kim <tester@hello.to> wrote:
: Hi,
Hello!
: I'm using redhat alphalinux 6.0 with all security fixes applied.
: Kernel version is 2.2.5-22 that was recompiled by myself.
: As of uptime from 48 days, I got some unusual messages when executing
: 'ps' or 'top' like this:
: $ ps
: Unknown HZ value! (2027) Assume 1024.
: PID TTY TIME CMD
: 19426 pts/0 00:00:03 bash
: 13566 pts/0 00:00:00 ps
Err ... how on earth could this be changed? Some userspace program must have
changed the envrionment variable HZ.
: Whis is HZ value and why this phenomenon happen?
: Is there any side-effect of "Unknown HZ value"?
The HZ value gives the number of timer interrupts per second. This is the
base for all time measurements in the system. On most systems the clock
ticks at 100Hz (like on i386) but the Alphas use to have 1024Hz. On the one
hand this gives somewhat better responsivenes because the scheduler is also
dependant on clock ticks and so gets called more often on the other this
causes from drivers to fail. Some programmers use clock ticks to measure
time directly in their drivers. In kernel this can simply be done by using
the variable 'jifffies' which is in fact a timer tick counter. If you then do
not take into account the HZ value your time measurement is false on all
systems that do not share your HZ value. One example is/was the MIDI driver
on Alphas. MIDI uses a similar timing scheme with MIDI-ticks. Those are
derived from the system ticks. If a program now wants to time events it may
ask the MIDI layer how many ticks there are per second. If it does not do so
it will only work on any system which has the same MIDI-tick value as the
development system. One bad example for this is xmp a MOD file player which
can use a wavetable card like the SB AWE cards. It plays ten times faster on
Alphas than on ix86 because it relies on the assumption that there are 100
ticks per second ;) A patched version of xmp can be found here:
http://www.home.unix-ag.org/nils/Alpha/Packages/index.html
: ### Kyu Rang Kim ### http://i.am/krkim ### ICQ:27474092 ###
CU
nils
--
Nils Faerber (Linux Nils) eMail: nils@unix-ag.org
Student of computer science http://www.si.unix-ag.org/~nils/
Unix user group, University of Siegen, Germany
Siegen ... the arctic rain forest!
--
next prev parent reply other threads:[~1999-12-22 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-22 5:00 What is HZ value for? Kyu Rang Kim
1999-12-22 5:00 ` Nils Faerber [this message]
1999-12-23 5:00 ` Kyu Rang Kim
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox